--- jsr166/src/test/tck/JSR166TestCase.java 2017/05/14 00:37:42 1.226 +++ jsr166/src/test/tck/JSR166TestCase.java 2017/05/14 03:14:25 1.228 @@ -1066,8 +1066,8 @@ public class JSR166TestCase extends Test * Checks that thread eventually enters the expected blocked thread state. */ void assertThreadBlocks(Thread thread, Thread.State expected) { - // always sleep at least 1 ms, avoiding transitional states - // with high probability + // always sleep at least 1 ms, with high probability avoiding + // transitory states for (long retries = LONG_DELAY_MS * 3 / 4; retries-->0; ) { try { delay(1); } catch (InterruptedException fail) { @@ -1101,28 +1101,6 @@ public class JSR166TestCase extends Test } catch (InterruptedException fail) { threadFail("Unexpected InterruptedException"); } - } - - /** - * 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"); - } } /**