626 |
|
pleaseTake.countDown(); |
627 |
|
q.put(86); |
628 |
|
|
629 |
+ |
Thread.currentThread().interrupt(); |
630 |
+ |
try { |
631 |
+ |
q.put(99); |
632 |
+ |
shouldThrow(); |
633 |
+ |
} catch (InterruptedException success) {} |
634 |
+ |
assertFalse(Thread.interrupted()); |
635 |
+ |
|
636 |
|
pleaseInterrupt.countDown(); |
637 |
|
try { |
638 |
|
q.put(99); |
768 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
769 |
|
public void realRun() throws InterruptedException { |
770 |
|
long startTime = System.nanoTime(); |
771 |
< |
for (int i = 0; i < SIZE; ++i) { |
771 |
> |
for (int i = 0; i < SIZE; i++) |
772 |
|
assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); |
773 |
< |
} |
773 |
> |
|
774 |
> |
Thread.currentThread().interrupt(); |
775 |
> |
try { |
776 |
> |
q.poll(LONG_DELAY_MS, MILLISECONDS); |
777 |
> |
shouldThrow(); |
778 |
> |
} catch (InterruptedException success) {} |
779 |
> |
assertFalse(Thread.interrupted()); |
780 |
|
|
781 |
|
pleaseInterrupt.countDown(); |
782 |
|
try { |
1076 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1077 |
|
public void realRun() throws InterruptedException { |
1078 |
|
long startTime = System.nanoTime(); |
1079 |
< |
for (int i = 0; i < SIZE; ++i) { |
1079 |
> |
for (int i = 0; i < SIZE; i++) |
1080 |
|
assertEquals(i, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); |
1068 |
– |
} |
1081 |
|
|
1082 |
|
Thread.currentThread().interrupt(); |
1083 |
|
try { |
1343 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1344 |
|
public void realRun() throws InterruptedException { |
1345 |
|
long startTime = System.nanoTime(); |
1346 |
< |
for (int i = 0; i < SIZE; ++i) { |
1346 |
> |
for (int i = 0; i < SIZE; i++) |
1347 |
|
assertEquals(SIZE - i - 1, |
1348 |
|
q.pollLast(LONG_DELAY_MS, MILLISECONDS)); |
1337 |
– |
} |
1349 |
|
|
1350 |
|
Thread.currentThread().interrupt(); |
1351 |
|
try { |