468 |
|
final LinkedBlockingQueue q = new LinkedBlockingQueue(2); |
469 |
|
Thread t = new Thread(new CheckedRunnable() { |
470 |
|
public void realRun() throws InterruptedException { |
471 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
472 |
– |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
471 |
|
try { |
472 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
473 |
+ |
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
474 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
475 |
|
shouldThrow(); |
476 |
|
} catch (InterruptedException success) {} |