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.66 by jsr166, Sun Oct 4 02:21:43 2015 UTC vs.
Revision 1.67 by jsr166, Sun Oct 4 02:24:49 2015 UTC

# Line 549 | Line 549 | public class ThreadPoolExecutorSubclassT
549              new CustomTPE(1, 1,
550                            LONG_DELAY_MS, MILLISECONDS,
551                            new ArrayBlockingQueue<Runnable>(10));
552 <        final CountDownLatch threadStarted = new CountDownLatch(1);
553 <        final CountDownLatch done = new CountDownLatch(1);
554 <        try {
552 >        try (PoolCleaner cleaner = cleaner(p)) {
553 >            final CountDownLatch threadStarted = new CountDownLatch(1);
554 >            final CountDownLatch done = new CountDownLatch(1);
555              assertEquals(0, p.getTaskCount());
556              p.execute(new CheckedRunnable() {
557                  public void realRun() throws InterruptedException {
# Line 561 | Line 561 | public class ThreadPoolExecutorSubclassT
561                  }});
562              assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
563              assertEquals(1, p.getTaskCount());
564        } finally {
564              done.countDown();
566            joinPool(p);
565          }
566      }
567  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines