663 |
|
q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); |
664 |
|
shouldThrow(); |
665 |
|
} catch (InterruptedException success) {} |
666 |
+ |
assertFalse(Thread.interrupted()); |
667 |
|
}}); |
668 |
|
|
669 |
|
await(pleaseInterrupt); |
761 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
762 |
|
public void realRun() throws InterruptedException { |
763 |
|
long startTime = System.nanoTime(); |
764 |
< |
for (int i = 0; i < SIZE; ++i) { |
764 |
> |
for (int i = 0; i < SIZE; i++) |
765 |
|
assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); |
766 |
< |
} |
766 |
> |
|
767 |
> |
Thread.currentThread().interrupt(); |
768 |
> |
try { |
769 |
> |
q.poll(LONG_DELAY_MS, MILLISECONDS); |
770 |
> |
shouldThrow(); |
771 |
> |
} catch (InterruptedException success) {} |
772 |
> |
assertFalse(Thread.interrupted()); |
773 |
|
|
774 |
|
pleaseInterrupt.countDown(); |
775 |
|
try { |
900 |
|
q.offerFirst(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); |
901 |
|
shouldThrow(); |
902 |
|
} catch (InterruptedException success) {} |
903 |
+ |
assertFalse(Thread.interrupted()); |
904 |
|
}}); |
905 |
|
|
906 |
|
await(pleaseInterrupt); |
1069 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1070 |
|
public void realRun() throws InterruptedException { |
1071 |
|
long startTime = System.nanoTime(); |
1072 |
< |
for (int i = 0; i < SIZE; ++i) { |
1072 |
> |
for (int i = 0; i < SIZE; i++) |
1073 |
|
assertEquals(i, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); |
1066 |
– |
} |
1074 |
|
|
1075 |
|
Thread.currentThread().interrupt(); |
1076 |
|
try { |
1123 |
|
q.pollFirst(LONG_DELAY_MS, MILLISECONDS); |
1124 |
|
shouldThrow(); |
1125 |
|
} catch (InterruptedException success) {} |
1126 |
+ |
assertFalse(Thread.interrupted()); |
1127 |
|
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
1128 |
|
}}); |
1129 |
|
|
1336 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1337 |
|
public void realRun() throws InterruptedException { |
1338 |
|
long startTime = System.nanoTime(); |
1339 |
< |
for (int i = 0; i < SIZE; ++i) { |
1339 |
> |
for (int i = 0; i < SIZE; i++) |
1340 |
|
assertEquals(SIZE - i - 1, |
1341 |
|
q.pollLast(LONG_DELAY_MS, MILLISECONDS)); |
1334 |
– |
} |
1342 |
|
|
1343 |
|
Thread.currentThread().interrupt(); |
1344 |
|
try { |