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.62 by jsr166, Sun Oct 4 02:04:56 2015 UTC vs.
Revision 1.63 by jsr166, Sun Oct 4 02:07:32 2015 UTC

# Line 503 | Line 503 | public class ThreadPoolExecutorSubclassT
503       * otherwise set
504       */
505      public void testGetMaximumPoolSize() {
506 <        ThreadPoolExecutor p = new CustomTPE(2, 2, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
507 <        assertEquals(2, p.getMaximumPoolSize());
508 <        joinPool(p);
506 >        final ThreadPoolExecutor p =
507 >            new CustomTPE(2, 3,
508 >                          LONG_DELAY_MS, MILLISECONDS,
509 >                          new ArrayBlockingQueue<Runnable>(10));
510 >        try (PoolCleaner cleaner = cleaner(p)) {
511 >            assertEquals(3, p.getMaximumPoolSize());
512 >            p.setMaximumPoolSize(5);
513 >            assertEquals(5, p.getMaximumPoolSize());
514 >            p.setMaximumPoolSize(4);
515 >            assertEquals(4, p.getMaximumPoolSize());
516 >        }
517      }
518  
519      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines