115 |
|
assertEquals(1, p.getActiveCount()); |
116 |
|
done.await(); |
117 |
|
}}); |
118 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
118 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
119 |
|
assertEquals(1, p.getActiveCount()); |
120 |
|
done.countDown(); |
121 |
|
} |
344 |
|
done.await(); |
345 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
346 |
|
}}); |
347 |
< |
assertTrue(threadsStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
347 |
> |
assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
348 |
|
assertEquals(THREADS, p.getLargestPoolSize()); |
349 |
|
done.countDown(); // release pool |
350 |
|
} |
388 |
|
assertEquals(1, p.getPoolSize()); |
389 |
|
done.await(); |
390 |
|
}}); |
391 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
391 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
392 |
|
assertEquals(1, p.getPoolSize()); |
393 |
|
done.countDown(); // release pool |
394 |
|
} |
497 |
|
threadStarted.countDown(); |
498 |
|
done.await(); |
499 |
|
}}); |
500 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
500 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
501 |
|
assertFalse(p.isTerminating()); |
502 |
|
done.countDown(); |
503 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
525 |
|
threadStarted.countDown(); |
526 |
|
done.await(); |
527 |
|
}}); |
528 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
528 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
529 |
|
assertFalse(p.isTerminating()); |
530 |
|
done.countDown(); |
531 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
559 |
|
tasks[i] = new FutureTask(task); |
560 |
|
p.execute(tasks[i]); |
561 |
|
} |
562 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
562 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
563 |
|
assertSame(q, p.getQueue()); |
564 |
|
assertFalse(q.contains(tasks[0])); |
565 |
|
assertTrue(q.contains(tasks[tasks.length - 1])); |
589 |
|
}}; |
590 |
|
p.execute(tasks[i]); |
591 |
|
} |
592 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
592 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
593 |
|
assertFalse(p.remove(tasks[0])); |
594 |
|
assertTrue(q.contains(tasks[4])); |
595 |
|
assertTrue(q.contains(tasks[3])); |
1045 |
|
p.submit(task).get(); |
1046 |
|
}}); |
1047 |
|
|
1048 |
< |
assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS)); |
1048 |
> |
assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS)); |
1049 |
|
t.interrupt(); |
1050 |
|
awaitTermination(t, MEDIUM_DELAY_MS); |
1051 |
|
done.countDown(); |