You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test was failing intermittently 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)
- When hidePart() is called, it triggers events that schedule async cleanup
tasks on the event queue
- The test was calling waitForCondition() immediately after hiding parts,
before the async cleanup tasks were even posted to the event queue
- This created a race where the wait could timeout before cleanup started
Fix:
- Add contextRule.spinEventLoop() after hiding partB and partC to ensure
async cleanup tasks are processed before waiting for the condition
- Wrap waitForCondition() in assertTrue() to fail immediately with a clear
message if cleanup doesn't complete within timeout
- Remove redundant assertFalse() statements
This matches the pattern used in the adjacent testBug332463 test which calls
spinEventLoop() after each hidePart() call.
Verified with 5 consecutive test runs - all passed (consistently completing
in ~0.028-0.036s).
Fixes#751
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments