66 |
|
try (PoolCleaner cleaner = cleaner(p)) { |
67 |
|
final long startTime = System.nanoTime(); |
68 |
|
final CountDownLatch done = new CountDownLatch(1); |
69 |
< |
Callable<Boolean> task = new CheckedCallable<Boolean>() { |
69 |
> |
Callable<Boolean> task = new CheckedCallable<>() { |
70 |
|
public Boolean realCall() { |
71 |
|
done.countDown(); |
72 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); |
1275 |
|
public void testTimedInvokeAll6() throws Exception { |
1276 |
|
for (long timeout = timeoutMillis();;) { |
1277 |
|
final CountDownLatch done = new CountDownLatch(1); |
1278 |
< |
final Callable<String> waiter = new CheckedCallable<String>() { |
1278 |
> |
final Callable<String> waiter = new CheckedCallable<>() { |
1279 |
|
public String realCall() { |
1280 |
|
try { done.await(LONG_DELAY_MS, MILLISECONDS); } |
1281 |
|
catch (InterruptedException ok) {} |