--- jsr166/src/test/tck/ThreadPoolExecutorTest.java 2015/10/06 00:41:47 1.105 +++ jsr166/src/test/tck/ThreadPoolExecutorTest.java 2015/10/06 05:12:16 1.106 @@ -113,7 +113,7 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { threadStarted.countDown(); assertEquals(1, p.getActiveCount()); - done.await(); + await(done); }}); assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); assertEquals(1, p.getActiveCount()); @@ -341,7 +341,7 @@ public class ThreadPoolExecutorTest exte p.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { threadsStarted.countDown(); - done.await(); + await(done); assertEquals(THREADS, p.getLargestPoolSize()); }}); assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); @@ -385,7 +385,7 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { threadStarted.countDown(); assertEquals(1, p.getPoolSize()); - done.await(); + await(done); }}); assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); assertEquals(1, p.getPoolSize()); @@ -409,7 +409,7 @@ public class ThreadPoolExecutorTest exte p.execute(new CheckedRunnable() { public void realRun() throws InterruptedException { threadStarted.countDown(); - done.await(); + await(done); }}); assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); assertEquals(1, p.getTaskCount()); @@ -420,7 +420,7 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { threadStarted.countDown(); assertEquals(1 + TASKS, p.getTaskCount()); - done.await(); + await(done); }}); } assertEquals(1 + TASKS, p.getTaskCount()); @@ -493,7 +493,7 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { assertFalse(p.isTerminating()); threadStarted.countDown(); - done.await(); + await(done); }}); assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); assertFalse(p.isTerminating()); @@ -521,7 +521,7 @@ public class ThreadPoolExecutorTest exte public void realRun() throws InterruptedException { assertFalse(p.isTerminating()); threadStarted.countDown(); - done.await(); + await(done); }}); assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); assertFalse(p.isTerminating()); @@ -551,7 +551,7 @@ public class ThreadPoolExecutorTest exte public Boolean realCall() throws InterruptedException { threadStarted.countDown(); assertSame(q, p.getQueue()); - done.await(); + await(done); return Boolean.TRUE; }}; tasks[i] = new FutureTask(task); @@ -583,7 +583,7 @@ public class ThreadPoolExecutorTest exte tasks[i] = new CheckedRunnable() { public void realRun() throws InterruptedException { threadStarted.countDown(); - done.await(); + await(done); }}; p.execute(tasks[i]); } @@ -618,7 +618,7 @@ public class ThreadPoolExecutorTest exte Callable task = new CheckedCallable() { public Boolean realCall() throws InterruptedException { threadStarted.countDown(); - done.await(); + await(done); return Boolean.TRUE; }}; tasks[i] = new FutureTask(task); @@ -1037,7 +1037,7 @@ public class ThreadPoolExecutorTest exte Callable task = new CheckedCallable() { public Boolean realCall() throws InterruptedException { threadStarted.countDown(); - done.await(); + await(done); return Boolean.TRUE; }}; p.submit(task).get(); @@ -1061,7 +1061,7 @@ public class ThreadPoolExecutorTest exte final CountDownLatch done = new CountDownLatch(1); Runnable task = new CheckedRunnable() { public void realRun() throws InterruptedException { - done.await(); + await(done); }}; for (int i = 0; i < 2; ++i) p.execute(task); @@ -1088,7 +1088,7 @@ public class ThreadPoolExecutorTest exte final CountDownLatch done = new CountDownLatch(1); Runnable task = new CheckedRunnable() { public void realRun() throws InterruptedException { - done.await(); + await(done); }}; for (int i = 0; i < 2; ++i) p.submit(task); @@ -1115,7 +1115,7 @@ public class ThreadPoolExecutorTest exte final CountDownLatch done = new CountDownLatch(1); Runnable task = new CheckedRunnable() { public void realRun() throws InterruptedException { - done.await(); + await(done); }}; for (int i = 0; i < 2; ++i) p.submit(Executors.callable(task)); @@ -1144,7 +1144,7 @@ public class ThreadPoolExecutorTest exte final CountDownLatch done = new CountDownLatch(1); Runnable blocker = new CheckedRunnable() { public void realRun() throws InterruptedException { - done.await(); + await(done); }}; p.execute(blocker); TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5];