diff options
author | John Arthorne | 2013-05-13 14:53:29 +0000 |
---|---|---|
committer | John Arthorne | 2013-05-13 14:53:29 +0000 |
commit | 4982b24a410823d36e2a49fcad28d68d8e55a7c2 (patch) | |
tree | 288b3525b6a0ce0b970dee9f97a7b08abe964c91 | |
parent | f0d6fa2c08cab12b1bd91e405717062c5ccf9130 (diff) | |
download | eclipse.platform.runtime-4982b24a410823d36e2a49fcad28d68d8e55a7c2.tar.gz eclipse.platform.runtime-4982b24a410823d36e2a49fcad28d68d8e55a7c2.tar.xz eclipse.platform.runtime-4982b24a410823d36e2a49fcad28d68d8e55a7c2.zip |
Bug 406829 - Race condition in IJobManagerTest.testJobFamilyWakeUpI20130513-2000
-rw-r--r-- | tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java index 1bc18abb3..e9e740f0f 100644 --- a/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java +++ b/tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java @@ -1447,10 +1447,13 @@ public class IJobManagerTest extends AbstractJobManagerTest { //ensure all jobs in second family are either running or waiting int runningCount = 0; for (int i = 0; i < JOBS_PER_FAMILY; i++) { - if (family2[i].getState() == Job.RUNNING) + int state = family2[i].getState(); + if (state == Job.RUNNING) { runningCount++; - else - assertState("4.2." + i, family2[i], Job.WAITING); + } else { + if (state != Job.WAITING) + assertTrue("4.2." + i + ": expected state: " + printState(Job.WAITING) + " actual state: " + printState(state), false); + } } //ensure only one job is running (it is possible that none have started yet) assertTrue("4.running", runningCount <= 1); |