diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java index bc6ef9778d0..e04084626d2 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java @@ -12,6 +12,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -168,7 +169,7 @@ private void startRemoteClipboardCommands() throws Exception { }); assertNotEquals(0, port); Registry reg = LocateRegistry.getRegistry("127.0.0.1", port); - long stopTime = System.currentTimeMillis() + 1000; + long stopTime = System.currentTimeMillis() + 10000; do { try { remote = (ClipboardCommands) reg.lookup(ClipboardCommands.ID); @@ -177,6 +178,7 @@ private void startRemoteClipboardCommands() throws Exception { // try again because the remote app probably hasn't bound yet } } while (System.currentTimeMillis() < stopTime); + assertNotNull(remote); // Run a no-op on the Swing event loop so that we know it is idle // and we can continue startup