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.64 by jsr166, Mon Oct 5 20:45:41 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      /**
# Line 630 | Line 632 | public class ScheduledExecutorTest exten
632          final AtomicInteger ran = new AtomicInteger(0);
633          final ScheduledThreadPoolExecutor p =
634              new ScheduledThreadPoolExecutor(poolSize);
635 <        CountDownLatch threadsStarted = new CountDownLatch(poolSize);
635 >        final CountDownLatch threadsStarted = new CountDownLatch(poolSize);
636          Runnable waiter = new CheckedRunnable() { public void realRun() {
637              threadsStarted.countDown();
638              try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines