Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackRendererTest should remove the used window before each test #668

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

vogella
Copy link
Contributor

@vogella vogella commented Mar 29, 2023

During debugging of this test I realized that we never cleanup the model elements after a test, add this to the test method.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2023

Test Results

 1 815 files  ±0   1 815 suites  ±0   1h 29m 42s ⏱️ -50s
 7 700 tests ±0   7 459 ✅  - 13  228 💤 ±0  2 ❌ +2  11 🔥 +11 
24 261 runs  ±0  23 501 ✅  - 13  747 💤 ±0  2 ❌ +2  11 🔥 +11 

For more details on these failures and errors, see this check.

Results for commit 323ea9c. ± Comparison against base commit 8a8979f.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the stackrenderer-test-reset-after-each-test branch from 7a17dae to fa75317 Compare March 30, 2023 10:21
@marcushoepfner
Copy link
Contributor

After having written tests in StackRendererTest in #689, I'm able to understand and review this PR.
LGTM

@vogella
Copy link
Contributor Author

vogella commented Apr 4, 2023

Thanks @marcushoepfner IIRC is noticed this while looking for potential places for unit tests for the onboarding stuff. Version update is done in 692

@marcushoepfner
Copy link
Contributor

Can this be merged?

@iloveeclipse
Copy link
Member

Can this be merged?

This PR shows 10 commits and 60 changed files. I guess something is wrong here. Can we have one commit rebased on top of master?

@vogella
Copy link
Contributor Author

vogella commented Apr 18, 2023

Yes, not sure that happened here. Will update or abondon.

@vogella vogella force-pushed the stackrenderer-test-reset-after-each-test branch from d2d198f to 3f1ef79 Compare April 18, 2023 08:19
@BeckerWdf
Copy link
Contributor

Yes, not sure that happened here. Will update or abondon.

@vogella: Any updates here?

@After
public void cleanUp() throws Exception {
ems.deleteModelElement(partStack);
ems.deleteModelElement(window);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laeubi why does github think this is JRE 11 source? (line 173)

@vogella vogella force-pushed the stackrenderer-test-reset-after-each-test branch from 3f1ef79 to 747ad3f Compare May 9, 2023 07:24
@akurtakov akurtakov force-pushed the stackrenderer-test-reset-after-each-test branch from 747ad3f to 00e131f Compare July 1, 2023 06:15
@marcushoepfner marcushoepfner force-pushed the stackrenderer-test-reset-after-each-test branch from 00e131f to c7e1056 Compare July 26, 2023 06:21
@BeckerWdf
Copy link
Contributor

@vogella: What's the state of this PR?

@BeckerWdf
Copy link
Contributor

@vogella: What's the state of this PR?

@vogella: Do you wanna finish this one?

@marcushoepfner marcushoepfner force-pushed the stackrenderer-test-reset-after-each-test branch 2 times, most recently from d2728ce to 39a8a86 Compare December 13, 2023 08:15
@HannesWell HannesWell force-pushed the stackrenderer-test-reset-after-each-test branch 2 times, most recently from 39a8a86 to 323ea9c Compare September 29, 2024 22:42
StackRendererTest should remove the used window before each test
Before this change the the model
elements were not removed after a test.
@marcushoepfner marcushoepfner force-pushed the stackrenderer-test-reset-after-each-test branch from 323ea9c to 973f1ad Compare September 30, 2024 09:59
@marcushoepfner
Copy link
Contributor

I have rebased. Let's wait for the results and merge this afterwards.
Ok from your side @vogella ?

@vogella
Copy link
Contributor Author

vogella commented Sep 30, 2024

Thanks @marcushoepfner and @hannesN for finishing this one. The change is (of course) fine with me.

@vogella vogella merged commit f9b743f into master Sep 30, 2024
9 of 12 checks passed
@vogella vogella deleted the stackrenderer-test-reset-after-each-test branch September 30, 2024 10:38
@BeckerWdf BeckerWdf added this to the 4.34 M2 milestone Sep 30, 2024
@HeikoKlare
Copy link
Contributor

Was it intended that this PR is merged despite test failures on MacOS? Subsequent PRs show test failures in StackRendererTest and TabStateHandlerTest (which also uses a StackRendererTest internally) in the cleanUp() method, which has been changed by this PR. See, e.g. https://github.com/eclipse-platform/eclipse.platform.ui/pull/2337/checks?check_run_id=30870517513

The final GitHub Actions run for MacOS of this PR before merging shows the same test failures in the logs (https://github.com/eclipse-platform/eclipse.platform.ui/actions/runs/11103802200/job/30846537413), so I guess they were introduced by this PR.
This is one of multiple according stack traces in the logs:

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4922)
	at org.eclipse.swt.SWT.error(SWT.java:4837)
	at org.eclipse.swt.SWT.error(SWT.java:4808)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:853)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:632)
	at org.eclipse.swt.widgets.Control.getParent(Control.java:1846)
	at org.eclipse.swt.widgets.Shell.getShells(Shell.java:1190)
	at org.eclipse.swt.widgets.Shell.updateParent(Shell.java:2269)
	at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:2135)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:1386)
	at org.eclipse.jface.window.Window.open(Window.java:795)
	at org.eclipse.jface.dialogs.ErrorDialog.open(ErrorDialog.java:347)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.openDialog(WorkbenchStatusReporter.java:124)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.report(WorkbenchStatusReporter.java:62)
	at org.eclipse.e4.core.services.statusreporter.StatusReporter.show(StatusReporter.java:133)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5$1.eventLoopException(PartRenderingEngine.java:1128)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.handle(PartRenderingEngine.java:1171)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.lambda$1(PartRenderingEngine.java:1146)
	at org.eclipse.swt.internal.ExceptionStash.stash(ExceptionStash.java:63)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:1432)
	at org.eclipse.swt.widgets.Control.release(Control.java:2938)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:730)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:186)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:934)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:857)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:841)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.subscribeTopicToBeRendered(PartRenderingEngine.java:184)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:92)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:206)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:201)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:131)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:73)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
	at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:316)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.deleteModelElement(ModelServiceImpl.java:164)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRendererTest.cleanUp(StackRendererTest.java:99)

@vogella
Copy link
Contributor Author

vogella commented Oct 1, 2024

Was it intended that this PR is merged despite test failures on MacOS?

IIRC everything was green before the merge. Now it looks like this memory was is. We should obviously not merge PR with new test errors. I will revert

@vogella
Copy link
Contributor Author

vogella commented Oct 1, 2024

#2348

@vogella
Copy link
Contributor Author

vogella commented Oct 1, 2024

Ah, these days Mac test results are out-of-sight. Sorry did not notice that.

image

@jukzi
Copy link
Contributor

jukzi commented Oct 1, 2024

Depends on where you look. Somehow it's not consistent. Especially after rebuilding something i have seen test result was not updated appropriately sometimes.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants