Commit a3fa065
Fix flaky PartRenderingEngineTests.ensureCleanUpAddonCleansUp race condition
The test was failing intermittently on Windows CI with "CleanupAddon should
ensure that partStack is not rendered anymore, as all childs have been removed"
because it was checking the cleanup result before the async cleanup logic had
a chance to execute.
Root cause:
- CleanupAddon performs cleanup asynchronously via Display.asyncExec()
(CleanupAddon.java:352)
- The test called contextRule.spinEventLoop() immediately after hiding parts
(line 2469), which processes only currently queued events
- This created a race condition: spinEventLoop() might process events before
CleanupAddon's asyncExec() callback was even added to the event queue
- The premature event processing caused timing issues that made the subsequent
DisplayHelper.waitForCondition() unreliable
Fix:
- Remove the contextRule.spinEventLoop() call on line 2469
- Rely solely on DisplayHelper.waitForCondition(), which properly handles event
processing via Display.sleep() with a 10ms retry interval
- Simplify the condition from "isToBeRendered() == false" to "!isToBeRendered()"
This follows the pattern from recent race condition fixes:
- Commit 55574d8: "removing premature event processing" for RCPTestWorkbenchAdvisor
- Commit 7c0684c: Using DisplayHelper.waitForCondition for async operations
Verified with 5 consecutive test runs - all passed consistently (0.028-0.036s).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 343fd57 commit a3fa065
File tree
1 file changed
+4
-2
lines changed- tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2466 | 2466 | | |
2467 | 2467 | | |
2468 | 2468 | | |
2469 | | - | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2470 | 2472 | | |
2471 | 2473 | | |
2472 | 2474 | | |
2473 | | - | |
| 2475 | + | |
2474 | 2476 | | |
2475 | 2477 | | |
2476 | 2478 | | |
| |||
0 commit comments