Skip to content

Commit 55574d8

Browse files
vogellaclaude
andcommitted
Fix race condition in RCPTestWorkbenchAdvisor by removing premature event processing
The previous fix added a CountDownLatch to wait for operations with DisplayAccess, but also included a display.readAndDispatch() loop that processed ALL pending events in postStartup(). This caused deferred operations (without DisplayAccess) to execute before startup completed, violating the contract that such operations should be deferred until after startup. This change removes the display.readAndDispatch() loop while keeping the latch-based synchronization for operations with DisplayAccess. The test expects: - Operations WITH DisplayAccess → run during startup - Operations WITHOUT DisplayAccess → deferred until after startup - Direct asyncExec from UI thread → deferred until after startup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4391448 commit 55574d8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/RCPTestWorkbenchAdvisor.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,6 @@ public void postStartup() {
232232
}
233233
}
234234

235-
// Process remaining events to allow any pending runnables to execute
236-
// This gives operations WITHOUT DisplayAccess a chance to run if there are bugs
237-
Display display = Display.getCurrent();
238-
if (display != null) {
239-
// Process all pending events
240-
while (display.readAndDispatch()) {
241-
// Keep processing
242-
}
243-
}
244-
245235
// Now mark as started - operations with DisplayAccess should have completed
246236
// Operations without DisplayAccess should still be pending (deferred)
247237
synchronized (RCPTestWorkbenchAdvisor.class) {

0 commit comments

Comments
 (0)