--- jsr166/src/test/tck/CompletableFutureTest.java 2014/06/25 15:32:10 1.95 +++ jsr166/src/test/tck/CompletableFutureTest.java 2014/11/01 14:50:26 1.96 @@ -584,6 +584,9 @@ public class CompletableFutureTest exten } } + static final boolean defaultExecutorIsCommonPool + = ForkJoinPool.getCommonPoolParallelism() > 1; + /** * Permits the testing of parallel code for the 3 different * execution modes without copy/pasting all the test methods. @@ -665,8 +668,8 @@ public class CompletableFutureTest exten ASYNC { public void checkExecutionMode() { - assertSame(ForkJoinPool.commonPool(), - ForkJoinTask.getPool()); + assertEquals(defaultExecutorIsCommonPool, + (ForkJoinPool.commonPool() == ForkJoinTask.getPool())); } public CompletableFuture runAsync(Runnable a) { return CompletableFuture.runAsync(a);