ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/CompletableFutureTest.java
(Generate patch)

Comparing jsr166/src/test/tck/CompletableFutureTest.java (file contents):
Revision 1.95 by jsr166, Wed Jun 25 15:32:10 2014 UTC vs.
Revision 1.96 by jsr166, Sat Nov 1 14:50:26 2014 UTC

# Line 584 | Line 584 | public class CompletableFutureTest exten
584          }
585      }
586  
587 +    static final boolean defaultExecutorIsCommonPool
588 +        = ForkJoinPool.getCommonPoolParallelism() > 1;
589 +
590      /**
591       * Permits the testing of parallel code for the 3 different
592       * execution modes without copy/pasting all the test methods.
# Line 665 | Line 668 | public class CompletableFutureTest exten
668  
669          ASYNC {
670              public void checkExecutionMode() {
671 <                assertSame(ForkJoinPool.commonPool(),
672 <                           ForkJoinTask.getPool());
671 >                assertEquals(defaultExecutorIsCommonPool,
672 >                             (ForkJoinPool.commonPool() == ForkJoinTask.getPool()));
673              }
674              public CompletableFuture<Void> runAsync(Runnable a) {
675                  return CompletableFuture.runAsync(a);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines