--- jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java 2009/11/21 19:31:58 1.11 +++ jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java 2009/11/21 19:44:50 1.12 @@ -1353,6 +1353,7 @@ public class ThreadPoolExecutorSubclassT * timed invokeAny(c) throws NPE if c has null elements */ public void testTimedInvokeAny3() throws Exception { + final CountDownLatch latch = new CountDownLatch(1); ExecutorService e = new CustomTPE(2, 2, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue(10)); try { ArrayList> l = new ArrayList>(); @@ -1368,6 +1369,7 @@ public class ThreadPoolExecutorSubclassT shouldThrow(); } catch (NullPointerException success) { } finally { + latch.countDown(); joinPool(e); } }