123 |
|
final CustomExecutor p = new CustomExecutor(1); |
124 |
|
try (PoolCleaner cleaner = cleaner(p, done)) { |
125 |
|
final long startTime = System.nanoTime(); |
126 |
< |
Callable<Boolean> task = new CheckedCallable<Boolean>() { |
126 |
> |
Callable<Boolean> task = new CheckedCallable<>() { |
127 |
|
public Boolean realCall() { |
128 |
|
done.countDown(); |
129 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); |
1316 |
|
public void testTimedInvokeAll6() throws Exception { |
1317 |
|
for (long timeout = timeoutMillis();;) { |
1318 |
|
final CountDownLatch done = new CountDownLatch(1); |
1319 |
< |
final Callable<String> waiter = new CheckedCallable<String>() { |
1319 |
> |
final Callable<String> waiter = new CheckedCallable<>() { |
1320 |
|
public String realCall() { |
1321 |
|
try { done.await(LONG_DELAY_MS, MILLISECONDS); } |
1322 |
|
catch (InterruptedException ok) {} |