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.83 by jsr166, Wed Jan 4 06:09:58 2017 UTC vs.
Revision 1.85 by jsr166, Wed Mar 22 20:19:55 2017 UTC

# Line 507 | Line 507 | public class ScheduledExecutorTest exten
507      }
508  
509      /**
510 +     * The default rejected execution handler is AbortPolicy.
511 +     */
512 +    public void testDefaultRejectedExecutionHandler() {
513 +        final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
514 +        try (PoolCleaner cleaner = cleaner(p)) {
515 +            assertTrue(p.getRejectedExecutionHandler()
516 +                       instanceof ThreadPoolExecutor.AbortPolicy);
517 +        }
518 +    }
519 +
520 +    /**
521       * isShutdown is false before shutdown, true after
522       */
523      public void testIsShutdown() {
# Line 814 | Line 825 | public class ScheduledExecutorTest exten
825                  assertTrue(periodic.isDone());
826              }
827          }
828 +        for (Future<?> blocker : blockers) assertNull(blocker.get());
829          assertTrue(p.awaitTermination(LONG_DELAY_MS, MILLISECONDS));
830          assertTrue(p.isTerminated());
831          assertEquals(2 + (effectiveDelayedPolicy ? 1 : 0), ran.get());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines