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.74 by jsr166, Sun May 14 04:02:06 2017 UTC vs.
Revision 1.75 by jsr166, Sun May 14 04:14:09 2017 UTC

# Line 350 | Line 350 | public class LinkedBlockingQueueTest ext
350              public void realRun() throws InterruptedException {
351                  q.put(new Object());
352                  q.put(new Object());
353 +
354                  long startTime = System.nanoTime();
355                  assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS));
356                  assertTrue(millisElapsedSince(startTime) >= timeoutMillis());
357 +
358 +                Thread.currentThread().interrupt();
359 +                try {
360 +                    q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);
361 +                    shouldThrow();
362 +                } catch (InterruptedException success) {}
363 +                assertFalse(Thread.interrupted());
364 +
365                  pleaseInterrupt.countDown();
366                  try {
367                      q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines