479 |
|
final ArrayBlockingQueue q = new ArrayBlockingQueue(2); |
480 |
|
Thread t = new Thread(new CheckedRunnable() { |
481 |
|
public void realRun() throws InterruptedException { |
482 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
483 |
– |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
482 |
|
try { |
483 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
484 |
+ |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
485 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
486 |
|
shouldThrow(); |
487 |
|
} catch (InterruptedException success) {} |