452 |
|
final PriorityBlockingQueue q = new PriorityBlockingQueue(2); |
453 |
|
Thread t = new Thread(new CheckedRunnable() { |
454 |
|
public void realRun() throws InterruptedException { |
455 |
– |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
456 |
– |
assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
455 |
|
try { |
456 |
+ |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
457 |
+ |
assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
458 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
459 |
|
shouldThrow(); |
460 |
|
} catch (InterruptedException success) {} |