From 6cb3fcc457d8f060fcfeb17fda18e1755dd82886 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Fri, 9 Oct 2026 08:21:54 +0200 Subject: [PATCH] Do not require a workbench in SafeRunnableErrorTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The I-build runs org.eclipse.jface.tests without a workbench, so UITestUtil.processEvents() failed with "Workbench has not been created yet". Process the events of the default display, where JFace posts the error dialog. Assisted-by: multiple AI agents and layers of automated tooling 🤖 --- .../eclipse/jface/tests/dialogs/SafeRunnableErrorTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/dialogs/SafeRunnableErrorTest.java b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/dialogs/SafeRunnableErrorTest.java index d29156d7c33..ebbdf255b0d 100644 --- a/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/dialogs/SafeRunnableErrorTest.java +++ b/tests/org.eclipse.jface.tests/src/org/eclipse/jface/tests/dialogs/SafeRunnableErrorTest.java @@ -13,7 +13,6 @@ ******************************************************************************/ package org.eclipse.jface.tests.dialogs; -import static org.eclipse.ui.tests.harness.util.UITestUtil.processEvents; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; @@ -22,6 +21,7 @@ import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.jface.util.SafeRunnable; +import org.eclipse.swt.widgets.Display; import org.junit.jupiter.api.Test; /** @@ -70,7 +70,10 @@ public void testSafeRunnableHandlerOtherThread() throws Exception { assertNull(uncaught.get()); assertEquals(1, count); // the error dialog is posted with asyncExec from the other thread - processEvents(); + Display display = Display.getDefault(); + while (display.readAndDispatch()) { + // process the posted dialog + } } @Test