--- jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java 2015/10/04 01:27:32 1.54 +++ jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java 2015/10/04 01:29:09 1.55 @@ -354,9 +354,13 @@ public class ThreadPoolExecutorSubclassT * getCorePoolSize returns size given in constructor if not otherwise set */ public void testGetCorePoolSize() { - ThreadPoolExecutor p = new CustomTPE(1, 1, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue(10)); - assertEquals(1, p.getCorePoolSize()); - joinPool(p); + ThreadPoolExecutor p = + new CustomTPE(1, 1, + LONG_DELAY_MS, MILLISECONDS, + new ArrayBlockingQueue(10)); + try (PoolCleaner cleaner = cleaner(p)) { + assertEquals(1, p.getCorePoolSize()); + } } /**