437 |
|
await(done); |
438 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
439 |
|
}}); |
440 |
< |
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
440 |
> |
await(threadsStarted); |
441 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
442 |
|
} |
443 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
610 |
|
Runnable r = new CheckedRunnable() { |
611 |
|
public void realRun() throws InterruptedException { |
612 |
|
threadStarted.countDown(); |
613 |
< |
done.await(); |
613 |
> |
await(done); |
614 |
|
}}; |
615 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
616 |
|
} |
635 |
|
Runnable r = new CheckedRunnable() { |
636 |
|
public void realRun() throws InterruptedException { |
637 |
|
threadStarted.countDown(); |
638 |
< |
done.await(); |
638 |
> |
await(done); |
639 |
|
}}; |
640 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
641 |
|
} |
702 |
|
}}; |
703 |
|
for (int i = 0; i < count; i++) |
704 |
|
p.execute(waiter); |
705 |
< |
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
705 |
> |
await(threadsStarted); |
706 |
|
assertEquals(poolSize, p.getActiveCount()); |
707 |
|
assertEquals(0, p.getCompletedTaskCount()); |
708 |
|
final List<Runnable> queuedTasks; |