ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/Collection8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/Collection8Test.java (file contents):
Revision 1.33 by jsr166, Mon Nov 28 15:31:40 2016 UTC vs.
Revision 1.35 by jsr166, Mon Nov 28 17:53:59 2016 UTC

# Line 557 | Line 557 | public class Collection8Test extends JSR
557          if (!impl.isConcurrent()) return;
558          final ThreadLocalRandom rnd = ThreadLocalRandom.current();
559          final Collection c = impl.emptyCollection();
560 <        final long testDurationMillis = timeoutMillis();
560 >        final long testDurationMillis
561 >            = expensiveTests ? LONG_DELAY_MS : timeoutMillis();
562          final AtomicBoolean done = new AtomicBoolean(false);
563          final Object one = impl.makeElement(1);
564          final Object two = impl.makeElement(2);
565 +        final Consumer checkSanity = x -> assertTrue(x == one || x == two);
566          final Object[] emptyArray =
567              (Object[]) java.lang.reflect.Array.newInstance(one.getClass(), 0);
568          final List<Future<?>> futures;
569          final Phaser threadsStarted = new Phaser(1); // register this thread
568        final Consumer checkSanity = x -> assertTrue(x == one || x == two);
570          final Runnable[] frobbers = {
571              () -> c.forEach(checkSanity),
572              () -> c.stream().forEach(checkSanity),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines