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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.115 by jsr166, Mon Mar 20 00:21:54 2017 UTC vs.
Revision 1.116 by jsr166, Wed Mar 22 20:19:55 2017 UTC

# Line 274 | Line 274 | public class ThreadPoolExecutorTest exte
274      }
275  
276      /**
277 +     * The default rejected execution handler is AbortPolicy.
278 +     */
279 +    public void testDefaultRejectedExecutionHandler() {
280 +        final ThreadPoolExecutor p =
281 +            new ThreadPoolExecutor(1, 2,
282 +                                   LONG_DELAY_MS, MILLISECONDS,
283 +                                   new ArrayBlockingQueue<Runnable>(10));
284 +        try (PoolCleaner cleaner = cleaner(p)) {
285 +            assertTrue(p.getRejectedExecutionHandler()
286 +                       instanceof ThreadPoolExecutor.AbortPolicy);
287 +        }
288 +    }
289 +
290 +    /**
291       * getRejectedExecutionHandler returns handler in constructor if not set
292       */
293      public void testGetRejectedExecutionHandler() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines