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

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

# Line 645 | Line 645 | public class ThreadPoolExecutorSubclassT
645              new CustomTPE(1, 1,
646                            LONG_DELAY_MS, MILLISECONDS,
647                            q);
648 <        final CountDownLatch threadStarted = new CountDownLatch(1);
649 <        final CountDownLatch done = new CountDownLatch(1);
650 <        try {
648 >        try (PoolCleaner cleaner = cleaner(p)) {
649 >            final CountDownLatch threadStarted = new CountDownLatch(1);
650 >            final CountDownLatch done = new CountDownLatch(1);
651              FutureTask[] tasks = new FutureTask[5];
652              for (int i = 0; i < tasks.length; i++) {
653                  Callable task = new CheckedCallable<Boolean>() {
# Line 665 | Line 665 | public class ThreadPoolExecutorSubclassT
665              assertFalse(q.contains(tasks[0]));
666              assertTrue(q.contains(tasks[tasks.length - 1]));
667              assertEquals(tasks.length - 1, q.size());
668        } finally {
668              done.countDown();
670            joinPool(p);
669          }
670      }
671  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines