ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadPoolExecutorTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.85 by jsr166, Sun Oct 4 02:33:09 2015 UTC vs.
Revision 1.86 by jsr166, Sun Oct 4 02:34:48 2015 UTC

# Line 530 | Line 530 | public class ThreadPoolExecutorTest exte
530              new ThreadPoolExecutor(1, 1,
531                                     LONG_DELAY_MS, MILLISECONDS,
532                                     q);
533 <        final CountDownLatch threadStarted = new CountDownLatch(1);
534 <        final CountDownLatch done = new CountDownLatch(1);
535 <        try {
533 >        try (PoolCleaner cleaner = cleaner(p)) {
534 >            final CountDownLatch threadStarted = new CountDownLatch(1);
535 >            final CountDownLatch done = new CountDownLatch(1);
536              FutureTask[] tasks = new FutureTask[5];
537              for (int i = 0; i < tasks.length; i++) {
538                  Callable task = new CheckedCallable<Boolean>() {
# Line 550 | Line 550 | public class ThreadPoolExecutorTest exte
550              assertFalse(q.contains(tasks[0]));
551              assertTrue(q.contains(tasks[tasks.length - 1]));
552              assertEquals(tasks.length - 1, q.size());
553        } finally {
553              done.countDown();
555            joinPool(p);
554          }
555      }
556  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines