diff --git a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java index f3566e2f314..9e665f33667 100644 --- a/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java +++ b/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java @@ -19,7 +19,6 @@ import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; import java.util.ArrayList; -import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -223,8 +222,9 @@ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs, } jobs.forEach(Job::wakeUp); - if (!Collections.disjoint(runningJobs, jobs)) { - // There is a job which runs already quite some time, don't wait for it to avoid test timeouts + if (runningJobs.containsAll(jobs)) { + // There are only jobs which runs already quite some time, don't + // wait for them to avoid test timeouts dumpRunningOrWaitingJobs(owner, jobs); return true; } diff --git a/debug/org.eclipse.debug.tests/test.xml b/debug/org.eclipse.debug.tests/test.xml index d9d9fe624f4..fb14c8a2c36 100644 --- a/debug/org.eclipse.debug.tests/test.xml +++ b/debug/org.eclipse.debug.tests/test.xml @@ -37,6 +37,7 @@ +