640 |
|
|
641 |
|
ASYNC { |
642 |
|
public void checkExecutionMode() { |
643 |
< |
assertEquals(defaultExecutorIsCommonPool, |
644 |
< |
(ForkJoinPool.commonPool() == ForkJoinTask.getPool())); |
643 |
> |
// If tests are added that may run across different |
644 |
> |
// pools, this needs to be weakened to no-op. |
645 |
> |
ForkJoinPool p = ForkJoinTask.getPool(); |
646 |
> |
assertTrue(p == null || |
647 |
> |
(defaultExecutorIsCommonPool && |
648 |
> |
p == ForkJoinPool.commonPool())); |
649 |
|
} |
650 |
|
public CompletableFuture<Void> runAsync(Runnable a) { |
651 |
|
return CompletableFuture.runAsync(a); |
3299 |
|
() -> f.obtrudeException(null), |
3300 |
|
|
3301 |
|
() -> CompletableFuture.delayedExecutor(1L, SECONDS, null), |
3302 |
< |
() -> CompletableFuture.delayedExecutor(1L, null, new ThreadExecutor()), |
3302 |
> |
() -> CompletableFuture.delayedExecutor(1L, null, exec), |
3303 |
|
() -> CompletableFuture.delayedExecutor(1L, null), |
3304 |
|
|
3305 |
|
() -> f.orTimeout(1L, null), |