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 { |