453 |
|
Thread t = new Thread(new CheckedRunnable() { |
454 |
|
public void realRun() throws InterruptedException { |
455 |
|
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
456 |
< |
assertEquals(0, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
456 |
> |
assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS)); |
457 |
|
try { |
458 |
|
q.poll(LONG_DELAY_MS, MILLISECONDS); |
459 |
< |
threadShouldThrow(); |
459 |
> |
shouldThrow(); |
460 |
|
} catch (InterruptedException success) {} |
461 |
|
}}); |
462 |
|
|
463 |
|
t.start(); |
464 |
|
Thread.sleep(SMALL_DELAY_MS); |
465 |
< |
assertTrue(q.offer(new Integer(0), SHORT_DELAY_MS, MILLISECONDS)); |
465 |
> |
assertTrue(q.offer(zero, SHORT_DELAY_MS, MILLISECONDS)); |
466 |
|
t.interrupt(); |
467 |
|
t.join(); |
468 |
|
} |