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

Comparing jsr166/src/test/tck/ArrayBlockingQueueTest.java (file contents):
Revision 1.94 by jsr166, Tue Aug 13 00:54:51 2019 UTC vs.
Revision 1.97 by jsr166, Mon Dec 16 21:16:08 2019 UTC

# Line 411 | Line 411 | public class ArrayBlockingQueueTest exte
411  
412                  pleaseInterrupt.countDown();
413                  try {
414 <                    q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS);
414 >                    q.offer(new Object(), LONGER_DELAY_MS, MILLISECONDS);
415                      shouldThrow();
416                  } catch (InterruptedException success) {}
417                  assertFalse(Thread.interrupted());
418
419                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
418              }});
419  
420          await(pleaseInterrupt);
# Line 514 | Line 512 | public class ArrayBlockingQueueTest exte
512          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
513          Thread t = newStartedThread(new CheckedRunnable() {
514              public void realRun() throws InterruptedException {
517                long startTime = System.nanoTime();
515                  for (int i = 0; i < SIZE; i++)
516                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
517  
# Line 527 | Line 524 | public class ArrayBlockingQueueTest exte
524  
525                  pleaseInterrupt.countDown();
526                  try {
527 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
527 >                    q.poll(LONGER_DELAY_MS, MILLISECONDS);
528                      shouldThrow();
529                  } catch (InterruptedException success) {}
530                  assertFalse(Thread.interrupted());
534
535                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
531              }});
532  
533          await(pleaseInterrupt);
# Line 693 | Line 688 | public class ArrayBlockingQueueTest exte
688              Integer x = (Integer) it.next();
689              assertEquals(s + i, (int) x);
690              for (Object[] a : as)
691 <                assertSame(a1[i], x);
691 >                assertSame(a[i], x);
692          }
693      }
694  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines