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

Comparing jsr166/src/test/tck/PriorityBlockingQueueTest.java (file contents):
Revision 1.81 by jsr166, Mon May 28 21:19:50 2018 UTC vs.
Revision 1.83 by jsr166, Thu Sep 5 20:54:24 2019 UTC

# Line 319 | Line 319 | public class PriorityBlockingQueueTest e
319      }
320  
321      /**
322 <     * timed offer does not time out
322 >     * Queue is unbounded, so timed offer never times out
323       */
324      public void testTimedOffer() {
325          final PriorityBlockingQueue q = new PriorityBlockingQueue(2);
# Line 370 | Line 370 | public class PriorityBlockingQueueTest e
370              }});
371  
372          await(pleaseInterrupt);
373 <        assertThreadBlocks(t, Thread.State.WAITING);
373 >        if (randomBoolean()) assertThreadBlocks(t, Thread.State.WAITING);
374          t.interrupt();
375          awaitTermination(t);
376      }
# Line 428 | Line 428 | public class PriorityBlockingQueueTest e
428  
429                  Thread.currentThread().interrupt();
430                  try {
431 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
431 >                    q.poll(randomTimeout(), randomTimeUnit());
432                      shouldThrow();
433                  } catch (InterruptedException success) {}
434                  assertFalse(Thread.interrupted());
# Line 444 | Line 444 | public class PriorityBlockingQueueTest e
444              }});
445  
446          await(pleaseInterrupt);
447 <        assertThreadBlocks(t, Thread.State.TIMED_WAITING);
447 >        if (randomBoolean()) assertThreadBlocks(t, Thread.State.TIMED_WAITING);
448          t.interrupt();
449          awaitTermination(t);
450      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines