254 |
|
public void testTimedCallable() throws Exception { |
255 |
|
final Runnable sleeper = new CheckedInterruptedRunnable() { |
256 |
|
public void realRun() throws InterruptedException { |
257 |
< |
Thread.sleep(LONG_DELAY_MS); |
257 |
> |
delay(LONG_DELAY_MS); |
258 |
|
}}; |
259 |
|
for (ExecutorService executor : |
260 |
|
new ExecutorService[] { |
313 |
|
} |
314 |
|
|
315 |
|
try { |
316 |
< |
Thread.sleep(SHORT_DELAY_MS); |
316 |
> |
delay(SHORT_DELAY_MS); |
317 |
|
} finally { |
318 |
|
joinPool(e); |
319 |
|
} |
349 |
|
ExecutorService e = Executors.newSingleThreadExecutor(Executors.privilegedThreadFactory()); |
350 |
|
e.execute(r); |
351 |
|
e.shutdown(); |
352 |
< |
Thread.sleep(SHORT_DELAY_MS); |
352 |
> |
delay(SHORT_DELAY_MS); |
353 |
|
joinPool(e); |
354 |
|
}}; |
355 |
|
|