--- jsr166/src/test/tck/JSR166TestCase.java 2016/02/22 20:41:59 1.187 +++ jsr166/src/test/tck/JSR166TestCase.java 2016/02/22 23:16:06 1.188 @@ -1466,16 +1466,20 @@ public class JSR166TestCase extends Test return new LatchAwaiter(latch); } - public void await(CountDownLatch latch) { + public void await(CountDownLatch latch, long timeoutMillis) { try { - if (!latch.await(LONG_DELAY_MS, MILLISECONDS)) + if (!latch.await(timeoutMillis, MILLISECONDS)) fail("timed out waiting for CountDownLatch for " - + (LONG_DELAY_MS/1000) + " sec"); + + (timeoutMillis/1000) + " sec"); } catch (Throwable fail) { threadUnexpectedException(fail); } } + public void await(CountDownLatch latch) { + await(latch, LONG_DELAY_MS); + } + public void await(Semaphore semaphore) { try { if (!semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS))