516 |
|
final CheckedBarrier barrier = new CheckedBarrier(2); |
517 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
518 |
|
public void realRun() throws InterruptedException { |
519 |
< |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
519 |
> |
assertNull(q.poll(timeoutMillis(), MILLISECONDS)); |
520 |
|
|
521 |
|
barrier.await(); |
522 |
|
assertSame(pdelay, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
841 |
|
public void testTimedPollDelayed() throws InterruptedException { |
842 |
|
DelayQueue q = new DelayQueue(); |
843 |
|
q.add(new NanoDelay(LONG_DELAY_MS * 1000000L)); |
844 |
< |
assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS)); |
844 |
> |
assertNull(q.poll(timeoutMillis(), MILLISECONDS)); |
845 |
|
} |
846 |
|
|
847 |
|
/** |