--- jsr166/src/test/tck/JSR166TestCase.java 2017/05/13 22:36:45 1.225 +++ jsr166/src/test/tck/JSR166TestCase.java 2017/05/14 03:12:05 1.227 @@ -1104,28 +1104,6 @@ public class JSR166TestCase extends Test } /** - * Checks that the threads do not terminate within the default - * millisecond delay of {@code timeoutMillis()}. - */ - void assertThreadsStayAlive(Thread... threads) { - assertThreadsStayAlive(timeoutMillis(), threads); - } - - /** - * Checks that the threads do not terminate within the given millisecond delay. - */ - void assertThreadsStayAlive(long millis, Thread... threads) { - try { - // No need to optimize the failing case via Thread.join. - delay(millis); - for (Thread thread : threads) - assertTrue(thread.isAlive()); - } catch (InterruptedException fail) { - threadFail("Unexpected InterruptedException"); - } - } - - /** * Checks that future.get times out, with the default timeout of * {@code timeoutMillis()}. */ @@ -1635,6 +1613,14 @@ public class JSR166TestCase extends Test } catch (Throwable fail) { threadUnexpectedException(fail); } + } + + public void await(CyclicBarrier barrier) { + try { + barrier.await(LONG_DELAY_MS, MILLISECONDS); + } catch (Throwable fail) { + threadUnexpectedException(fail); + } } // /**