--- jsr166/src/test/tck/Collection8Test.java 2016/11/28 15:31:40 1.33 +++ jsr166/src/test/tck/Collection8Test.java 2016/11/28 17:53:59 1.35 @@ -557,15 +557,16 @@ public class Collection8Test extends JSR if (!impl.isConcurrent()) return; final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final Collection c = impl.emptyCollection(); - final long testDurationMillis = timeoutMillis(); + final long testDurationMillis + = expensiveTests ? LONG_DELAY_MS : timeoutMillis(); final AtomicBoolean done = new AtomicBoolean(false); final Object one = impl.makeElement(1); final Object two = impl.makeElement(2); + final Consumer checkSanity = x -> assertTrue(x == one || x == two); final Object[] emptyArray = (Object[]) java.lang.reflect.Array.newInstance(one.getClass(), 0); final List> futures; final Phaser threadsStarted = new Phaser(1); // register this thread - final Consumer checkSanity = x -> assertTrue(x == one || x == two); final Runnable[] frobbers = { () -> c.forEach(checkSanity), () -> c.stream().forEach(checkSanity),