259 |
|
public void testisQuiescent() throws InterruptedException { |
260 |
|
ForkJoinPool p = new ForkJoinPool(2); |
261 |
|
try { |
262 |
+ |
assertTrue(p.isQuiescent()); |
263 |
|
p.invoke(new FibTask(20)); |
264 |
|
assertSame(ForkJoinPool.defaultForkJoinWorkerThreadFactory, |
265 |
|
p.getFactory()); |
266 |
< |
Thread.sleep(MEDIUM_DELAY_MS); |
266 |
> |
Thread.sleep(SMALL_DELAY_MS); |
267 |
|
assertTrue(p.isQuiescent()); |
268 |
|
assertFalse(p.getAsyncMode()); |
269 |
|
assertEquals(0, p.getActiveThreadCount()); |
531 |
|
*/ |
532 |
|
public void testExecuteNullRunnable() { |
533 |
|
ExecutorService e = new ForkJoinPool(1); |
533 |
– |
TrackedShortRunnable task = null; |
534 |
|
try { |
535 |
< |
Future<?> future = e.submit(task); |
535 |
> |
Future<?> future = e.submit((Runnable) null); |
536 |
|
shouldThrow(); |
537 |
|
} catch (NullPointerException success) { |
538 |
|
} finally { |
546 |
|
*/ |
547 |
|
public void testSubmitNullCallable() { |
548 |
|
ExecutorService e = new ForkJoinPool(1); |
549 |
– |
StringTask t = null; |
549 |
|
try { |
550 |
< |
Future<String> future = e.submit(t); |
550 |
> |
Future<String> future = e.submit((Callable) null); |
551 |
|
shouldThrow(); |
552 |
|
} catch (NullPointerException success) { |
553 |
|
} finally { |