587 |
|
threadStarted.countDown(); |
588 |
|
await(done); |
589 |
|
}}); |
590 |
< |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
590 |
> |
await(threadStarted); |
591 |
|
assertFalse(p.isTerminating()); |
592 |
|
done.countDown(); |
593 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
614 |
|
}}; |
615 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
616 |
|
} |
617 |
< |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
617 |
> |
await(threadStarted); |
618 |
|
BlockingQueue<Runnable> q = p.getQueue(); |
619 |
|
assertTrue(q.contains(tasks[tasks.length - 1])); |
620 |
|
assertFalse(q.contains(tasks[0])); |
639 |
|
}}; |
640 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
641 |
|
} |
642 |
< |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
642 |
> |
await(threadStarted); |
643 |
|
BlockingQueue<Runnable> q = p.getQueue(); |
644 |
|
assertFalse(p.remove((Runnable)tasks[0])); |
645 |
|
assertTrue(q.contains((Runnable)tasks[4])); |