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

Comparing jsr166/src/test/tck/ConcurrentLinkedDequeTest.java (file contents):
Revision 1.33 by jsr166, Fri Jun 22 00:04:58 2018 UTC vs.
Revision 1.36 by jsr166, Mon Dec 16 21:13:07 2019 UTC

# Line 913 | Line 913 | public class ConcurrentLinkedDequeTest e
913      }
914  
915      void runAsync(Runnable r1, Runnable r2) {
916 <        boolean b = ThreadLocalRandom.current().nextBoolean();
916 >        boolean b = randomBoolean();
917          CompletableFuture<Void> f1 = CompletableFuture.runAsync(b ? r1 : r2);
918          CompletableFuture<Void> f2 = CompletableFuture.runAsync(b ? r2 : r1);
919          f1.join();
# Line 976 | Line 976 | public class ConcurrentLinkedDequeTest e
976          }
977      }
978  
979    <T> T chooseRandomly(T... choices) {
980        return choices[ThreadLocalRandom.current().nextInt(choices.length)];
981    }
982
979      /**
980       * Non-traversing Deque operations (that return null) are linearizable.
981       * Don't return null when the deque is observably never empty.
# Line 987 | Line 983 | public class ConcurrentLinkedDequeTest e
983       * ant -Djsr166.expensiveTests=true -Djsr166.tckTestClass=ConcurrentLinkedDequeTest -Djsr166.methodFilter=testBug8189387 tck
984       */
985      public void testBug8189387() {
990        final ThreadLocalRandom rnd = ThreadLocalRandom.current();
986          Object x = new Object();
987          for (int n = expensiveTests ? 100_000 : 10; n--> 0; ) {
988              ConcurrentLinkedDeque<Object> d = new ConcurrentLinkedDeque<>();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines