--- jsr166/src/test/tck/ThreadPoolExecutorTest.java 2011/03/15 19:47:07 1.40 +++ jsr166/src/test/tck/ThreadPoolExecutorTest.java 2011/05/06 11:22:08 1.41 @@ -154,7 +154,7 @@ public class ThreadPoolExecutorTest exte assertEquals(0, p.getCompletedTaskCount()); threadProceed.countDown(); threadDone.await(); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); assertEquals(1, p.getCompletedTaskCount()); } finally { joinPool(p); @@ -1345,7 +1345,7 @@ public class ThreadPoolExecutorTest exte try { TrackedNoOpRunnable r = new TrackedNoOpRunnable(); p.execute(r); - Thread.sleep(SHORT_DELAY_MS); + delay(SHORT_DELAY_MS); assertTrue(r.done); assertTrue(p.beforeCalled); assertTrue(p.afterCalled); @@ -1919,7 +1919,7 @@ public class ThreadPoolExecutorTest exte for (int i = 0; i < (MEDIUM_DELAY_MS/10); i++) { if (p.getPoolSize() == 0) break; - Thread.sleep(10); + delay(10); } assertEquals(0, p.getPoolSize()); } finally { @@ -1943,7 +1943,7 @@ public class ThreadPoolExecutorTest exte threadStarted.countDown(); assertTrue(p.getPoolSize() >= 1); }}); - Thread.sleep(SMALL_DELAY_MS); + delay(SMALL_DELAY_MS); assertTrue(p.getPoolSize() >= 1); } finally { joinPool(p);