282 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
283 |
|
public void realRun() throws InterruptedException { |
284 |
|
long startTime = System.nanoTime(); |
285 |
< |
for (int i = 0; i < SIZE; ++i) |
285 |
> |
for (int i = 0; i < SIZE; i++) |
286 |
|
assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); |
287 |
|
|
288 |
+ |
Thread.currentThread().interrupt(); |
289 |
+ |
try { |
290 |
+ |
q.poll(LONG_DELAY_MS, MILLISECONDS); |
291 |
+ |
shouldThrow(); |
292 |
+ |
} catch (InterruptedException success) {} |
293 |
+ |
assertFalse(Thread.interrupted()); |
294 |
+ |
|
295 |
|
pleaseInterrupt.countDown(); |
296 |
|
try { |
297 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |