Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2013-04-29 17:44:15 +0000
committerJohn Arthorne2013-04-29 17:44:15 +0000
commitdeb0fa63c65ca4a42bad2b565cbeead62ef85944 (patch)
treecc030da1994688300574a3b65fe49e53e5e53158
parent193fdb394d85df7a74dad92845c4f04354611c82 (diff)
downloadeclipse.platform.runtime-deb0fa63c65ca4a42bad2b565cbeead62ef85944.tar.gz
eclipse.platform.runtime-deb0fa63c65ca4a42bad2b565cbeead62ef85944.tar.xz
eclipse.platform.runtime-deb0fa63c65ca4a42bad2b565cbeead62ef85944.zip
Bug 406829 - Race condition in IJobManagerTest.testJobFamilyWakeUp
-rw-r--r--tests/org.eclipse.core.tests.runtime/src/org/eclipse/core/tests/runtime/jobs/IJobManagerTest.java11
1 files changed, 7 insertions, 4 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 bacbcc99d..4daac4c45 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1251,10 +1251,13 @@ public class IJobManagerTest extends AbstractJobManagerTest {
//ensure all jobs in first family are either running or waiting
runningCount = 0;
for (int i = 0; i < JOBS_PER_FAMILY; i++) {
- if (family1[i].getState() == Job.RUNNING)
+ int state = family1[i].getState();
+ if (state == Job.RUNNING) {
runningCount++;
- else
- assertState("7.1." + i, family1[i], Job.WAITING);
+ } else {
+ if (state != Job.WAITING)
+ assertTrue("7.1." + 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("7.running", runningCount <= 1);

Back to the top