290 |
|
assertEquals(0, p.getCompletedTaskCount()); |
291 |
|
threadProceed.countDown(); |
292 |
|
threadDone.await(); |
293 |
< |
Thread.sleep(SHORT_DELAY_MS); |
293 |
> |
delay(SHORT_DELAY_MS); |
294 |
|
assertEquals(1, p.getCompletedTaskCount()); |
295 |
|
} finally { |
296 |
|
joinPool(p); |
1251 |
|
try { |
1252 |
|
TrackedNoOpRunnable r = new TrackedNoOpRunnable(); |
1253 |
|
p.execute(r); |
1254 |
< |
Thread.sleep(SHORT_DELAY_MS); |
1254 |
> |
delay(SHORT_DELAY_MS); |
1255 |
|
assertTrue(r.done); |
1256 |
|
assertTrue(p.beforeCalled); |
1257 |
|
assertTrue(p.afterCalled); |
1742 |
|
for (int i = 0; i < (MEDIUM_DELAY_MS/10); i++) { |
1743 |
|
if (p.getPoolSize() == 0) |
1744 |
|
break; |
1745 |
< |
Thread.sleep(10); |
1745 |
> |
delay(10); |
1746 |
|
} |
1747 |
|
assertEquals(0, p.getPoolSize()); |
1748 |
|
} finally { |
1766 |
|
threadStarted.countDown(); |
1767 |
|
assertTrue(p.getPoolSize() >= 1); |
1768 |
|
}}); |
1769 |
< |
Thread.sleep(SMALL_DELAY_MS); |
1769 |
> |
delay(SMALL_DELAY_MS); |
1770 |
|
assertTrue(p.getPoolSize() >= 1); |
1771 |
|
} finally { |
1772 |
|
joinPool(p); |