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

Comparing jsr166/src/test/tck/ScheduledExecutorTest.java (file contents):
Revision 1.62 by jsr166, Sun Oct 4 08:07:31 2015 UTC vs.
Revision 1.63 by jsr166, Sun Oct 4 18:28:51 2015 UTC

# Line 438 | Line 438 | public class ScheduledExecutorTest exten
438       * getThreadFactory returns factory in constructor if not set
439       */
440      public void testGetThreadFactory() throws InterruptedException {
441 <        ThreadFactory threadFactory = new SimpleThreadFactory();
442 <        ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1, threadFactory);
443 <        assertSame(threadFactory, p.getThreadFactory());
444 <        joinPool(p);
441 >        final ThreadFactory threadFactory = new SimpleThreadFactory();
442 >        final ScheduledThreadPoolExecutor p =
443 >            new ScheduledThreadPoolExecutor(1, threadFactory);
444 >        try (PoolCleaner cleaner = cleaner(p)) {
445 >            assertSame(threadFactory, p.getThreadFactory());
446 >        }
447      }
448  
449      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines