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

Comparing jsr166/src/test/tck/LinkedBlockingQueueTest.java (file contents):
Revision 1.79 by jsr166, Sun Aug 11 22:29:27 2019 UTC vs.
Revision 1.81 by jsr166, Thu Sep 5 21:11:13 2019 UTC

# Line 363 | Line 363 | public class LinkedBlockingQueueTest ext
363  
364                  pleaseInterrupt.countDown();
365                  try {
366 <                    q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS);
366 >                    q.offer(new Object(), LONGER_DELAY_MS, MILLISECONDS);
367                      shouldThrow();
368                  } catch (InterruptedException success) {}
369                  assertFalse(Thread.interrupted());
370
371                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
370              }});
371  
372          await(pleaseInterrupt);
# Line 465 | Line 463 | public class LinkedBlockingQueueTest ext
463          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
464          Thread t = newStartedThread(new CheckedRunnable() {
465              public void realRun() throws InterruptedException {
468                long startTime = System.nanoTime();
466                  for (int i = 0; i < SIZE; i++)
467                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
468  
# Line 478 | Line 475 | public class LinkedBlockingQueueTest ext
475  
476                  pleaseInterrupt.countDown();
477                  try {
478 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
478 >                    q.poll(LONGER_DELAY_MS, MILLISECONDS);
479                      shouldThrow();
480                  } catch (InterruptedException success) {}
481                  assertFalse(Thread.interrupted());
485
486                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
482              }});
483  
484          await(pleaseInterrupt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines