238 |
|
final Runnable task = new CheckedRunnable() { |
239 |
|
public void realRun() { done.countDown(); }}; |
240 |
|
p.execute(task); |
241 |
< |
assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); |
241 |
> |
await(done); |
242 |
|
} |
243 |
|
} |
244 |
|
|
332 |
|
public void realRun() throws InterruptedException { |
333 |
|
threadStarted.countDown(); |
334 |
|
assertEquals(0, p.getCompletedTaskCount()); |
335 |
< |
threadProceed.await(); |
335 |
> |
await(threadProceed); |
336 |
|
threadDone.countDown(); |
337 |
|
}}); |
338 |
|
await(threadStarted); |
339 |
|
assertEquals(0, p.getCompletedTaskCount()); |
340 |
|
threadProceed.countDown(); |
341 |
< |
threadDone.await(); |
341 |
> |
await(threadDone); |
342 |
|
long startTime = System.nanoTime(); |
343 |
|
while (p.getCompletedTaskCount() != 1) { |
344 |
|
if (millisElapsedSince(startTime) > LONG_DELAY_MS) |
1926 |
|
public void realRun() { |
1927 |
|
done.countDown(); |
1928 |
|
}}); |
1929 |
< |
assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); |
1929 |
> |
await(done); |
1930 |
|
} |
1931 |
|
} |
1932 |
|
|