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.67 by jsr166, Sun Oct 4 02:24:49 2015 UTC vs.
Revision 1.68 by jsr166, Sun Oct 4 02:26:47 2015 UTC

# Line 569 | Line 569 | public class ThreadPoolExecutorSubclassT
569       * isShutdown is false before shutdown, true after
570       */
571      public void testIsShutdown() {
572 <
573 <        ThreadPoolExecutor p = new CustomTPE(1, 1, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
574 <        assertFalse(p.isShutdown());
575 <        try { p.shutdown(); } catch (SecurityException ok) { return; }
576 <        assertTrue(p.isShutdown());
577 <        joinPool(p);
572 >        final ThreadPoolExecutor p =
573 >            new CustomTPE(1, 1,
574 >                          LONG_DELAY_MS, MILLISECONDS,
575 >                          new ArrayBlockingQueue<Runnable>(10));
576 >        try (PoolCleaner cleaner = cleaner(p)) {
577 >            assertFalse(p.isShutdown());
578 >            try { p.shutdown(); } catch (SecurityException ok) { return; }
579 >            assertTrue(p.isShutdown());
580 >        }
581      }
582  
583      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines