449 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
450 |
|
public void realRun() throws InterruptedException { |
451 |
|
long startTime = System.nanoTime(); |
452 |
< |
for (int i = 0; i < SIZE; ++i) { |
452 |
> |
for (int i = 0; i < SIZE; i++) |
453 |
|
assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); |
454 |
< |
} |
454 |
> |
|
455 |
> |
Thread.currentThread().interrupt(); |
456 |
> |
try { |
457 |
> |
q.poll(LONG_DELAY_MS, MILLISECONDS); |
458 |
> |
shouldThrow(); |
459 |
> |
} catch (InterruptedException success) {} |
460 |
> |
assertFalse(Thread.interrupted()); |
461 |
|
|
462 |
|
pleaseInterrupt.countDown(); |
463 |
|
try { |