410 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
411 |
|
public void realRun() throws InterruptedException { |
412 |
|
long startTime = System.nanoTime(); |
413 |
< |
for (int i = 0; i < SIZE; ++i) { |
413 |
> |
for (int i = 0; i < SIZE; i++) |
414 |
|
assertEquals(new PDelay(i), |
415 |
|
((PDelay)q.poll(LONG_DELAY_MS, MILLISECONDS))); |
416 |
– |
} |
416 |
|
|
417 |
|
Thread.currentThread().interrupt(); |
418 |
|
try { |
427 |
|
shouldThrow(); |
428 |
|
} catch (InterruptedException success) {} |
429 |
|
assertFalse(Thread.interrupted()); |
430 |
+ |
|
431 |
|
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
432 |
|
}}); |
433 |
|
|