Bug 435367 - ProgressContantsTest.testCommandProperty failed
Don't join() immediately after schedule(), to avoid immediate return if
the job wasn't started yet.
Change-Id: I5a99799626902c2a283a3b1b344631121f03cfa9
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java
index a119e99..23130b0 100644
--- a/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java
+++ b/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/progress/ProgressContantsTest.java
@@ -63,11 +63,17 @@
CommandHandler handler = new CommandHandler();
IHandlerActivation record = service.activateHandler(commandId, handler);
+ waitForJobs(100, 1000);
okJob.join();
-
processEvents();
ProgressInfoItem item = findProgressInfoItem(okJob);
+ if (item == null) {
+ waitForJobs(100, 1000);
+ okJob.join();
+ processEvents();
+ item = findProgressInfoItem(okJob);
+ }
assertNotNull(item);
item.executeTrigger();
assertTrue(handler.executed);