--- jsr166/src/test/tck/JSR166TestCase.java 2019/09/26 20:48:52 1.269 +++ jsr166/src/test/tck/JSR166TestCase.java 2019/09/29 20:18:35 1.270 @@ -704,6 +704,13 @@ public class JSR166TestCase extends Test /** * Returns a random element from given choices. */ + T chooseRandomly(List choices) { + return choices.get(ThreadLocalRandom.current().nextInt(choices.size())); + } + + /** + * Returns a random element from given choices. + */ T chooseRandomly(T... choices) { return choices[ThreadLocalRandom.current().nextInt(choices.length)]; } @@ -1772,7 +1779,7 @@ public class JSR166TestCase extends Test public int await() { try { - return super.await(2 * LONG_DELAY_MS, MILLISECONDS); + return super.await(LONGER_DELAY_MS, MILLISECONDS); } catch (TimeoutException timedOut) { throw new AssertionError("timed out"); } catch (Exception fail) {