--- jsr166/src/test/tck/ThreadPoolExecutorTest.java 2017/03/22 20:19:55 1.116 +++ jsr166/src/test/tck/ThreadPoolExecutorTest.java 2017/03/25 21:41:10 1.117 @@ -90,7 +90,7 @@ public class ThreadPoolExecutorTest exte final Runnable task = new CheckedRunnable() { public void realRun() { done.countDown(); }}; p.execute(task); - assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); + await(done); } } @@ -184,13 +184,13 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { threadStarted.countDown(); assertEquals(0, p.getCompletedTaskCount()); - threadProceed.await(); + await(threadProceed); threadDone.countDown(); }}); await(threadStarted); assertEquals(0, p.getCompletedTaskCount()); threadProceed.countDown(); - threadDone.await(); + await(threadDone); long startTime = System.nanoTime(); while (p.getCompletedTaskCount() != 1) { if (millisElapsedSince(startTime) > LONG_DELAY_MS) @@ -1941,7 +1941,7 @@ public class ThreadPoolExecutorTest exte public void realRun() { done.countDown(); }}); - assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); + await(done); } } @@ -2034,7 +2034,7 @@ public class ThreadPoolExecutorTest exte } } // enough time to run all tasks - assertTrue(done.await(nTasks * SHORT_DELAY_MS, MILLISECONDS)); + await(done, nTasks * SHORT_DELAY_MS); } }