374 |
|
assertEquals(1, p.getActiveCount()); |
375 |
|
done.await(); |
376 |
|
}}); |
377 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
377 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
378 |
|
assertEquals(1, p.getActiveCount()); |
379 |
|
done.countDown(); |
380 |
|
} |
439 |
|
done.await(); |
440 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
441 |
|
}}); |
442 |
< |
assertTrue(threadsStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
442 |
> |
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
443 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
444 |
|
done.countDown(); |
445 |
|
} |
462 |
|
assertEquals(1, p.getPoolSize()); |
463 |
|
done.await(); |
464 |
|
}}); |
465 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
465 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
466 |
|
assertEquals(1, p.getPoolSize()); |
467 |
|
done.countDown(); |
468 |
|
} |
567 |
|
threadStarted.countDown(); |
568 |
|
done.await(); |
569 |
|
}}); |
570 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
570 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
571 |
|
assertFalse(p.isTerminating()); |
572 |
|
done.countDown(); |
573 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
591 |
|
threadStarted.countDown(); |
592 |
|
done.await(); |
593 |
|
}}); |
594 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
594 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
595 |
|
assertFalse(p.isTerminating()); |
596 |
|
done.countDown(); |
597 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
618 |
|
}}; |
619 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
620 |
|
} |
621 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
621 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
622 |
|
BlockingQueue<Runnable> q = p.getQueue(); |
623 |
|
assertTrue(q.contains(tasks[tasks.length - 1])); |
624 |
|
assertFalse(q.contains(tasks[0])); |
643 |
|
}}; |
644 |
|
tasks[i] = p.schedule(r, 1, MILLISECONDS); |
645 |
|
} |
646 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
646 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
647 |
|
BlockingQueue<Runnable> q = p.getQueue(); |
648 |
|
assertFalse(p.remove((Runnable)tasks[0])); |
649 |
|
assertTrue(q.contains((Runnable)tasks[4])); |