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.87 by jsr166, Sun May 14 00:56:43 2017 UTC vs.
Revision 1.88 by jsr166, Sun May 14 01:30:34 2017 UTC

# Line 498 | Line 498 | public class ArrayBlockingQueueTest exte
498          Thread t = newStartedThread(new CheckedRunnable() {
499              public void realRun() throws InterruptedException {
500                  long startTime = System.nanoTime();
501 <                for (int i = 0; i < SIZE; ++i) {
501 >                for (int i = 0; i < SIZE; i++)
502                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
503 <                }
503 >
504 >                Thread.currentThread().interrupt();
505 >                try {
506 >                    q.poll(LONG_DELAY_MS, MILLISECONDS);
507 >                    shouldThrow();
508 >                } catch (InterruptedException success) {}
509 >                assertFalse(Thread.interrupted());
510  
511                  pleaseInterrupt.countDown();
512                  try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines