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

Comparing jsr166/src/test/tck/DelayQueueTest.java (file contents):
Revision 1.92 by jsr166, Thu Sep 5 20:54:24 2019 UTC vs.
Revision 1.93 by jsr166, Thu Sep 5 21:11:13 2019 UTC

# Line 409 | Line 409 | public class DelayQueueTest extends JSR1
409          final DelayQueue q = populatedQueue(SIZE);
410          Thread t = newStartedThread(new CheckedRunnable() {
411              public void realRun() throws InterruptedException {
412                long startTime = System.nanoTime();
412                  for (int i = 0; i < SIZE; i++)
413                      assertEquals(new PDelay(i),
414                                   ((PDelay)q.poll(LONG_DELAY_MS, MILLISECONDS)));
# Line 423 | Line 422 | public class DelayQueueTest extends JSR1
422  
423                  pleaseInterrupt.countDown();
424                  try {
425 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
425 >                    q.poll(LONGER_DELAY_MS, MILLISECONDS);
426                      shouldThrow();
427                  } catch (InterruptedException success) {}
428                  assertFalse(Thread.interrupted());
430
431                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
429              }});
430  
431          await(pleaseInterrupt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines