--- jsr166/src/test/tck/CompletableFutureTest.java 2015/09/03 11:45:34 1.103 +++ jsr166/src/test/tck/CompletableFutureTest.java 2015/09/03 17:45:22 1.108 @@ -3333,6 +3333,7 @@ public class CompletableFutureTest exten () -> f.exceptionally(null), () -> f.handle(null), + () -> CompletableFuture.allOf((CompletableFuture)null), () -> CompletableFuture.allOf((CompletableFuture[])null), () -> CompletableFuture.allOf(f, null), @@ -3359,7 +3360,7 @@ public class CompletableFutureTest exten } // jdk9 - + /** * newIncompleteFuture returns an incomplete CompletableFuture */ @@ -3389,8 +3390,8 @@ public class CompletableFutureTest exten public void testDefaultExecutor() { CompletableFuture f = new CompletableFuture<>(); Executor e = f.defaultExecutor(); - Executor c = ForkJoinPool.commonPool(); - if (ForkJoinPool.getCommonPoolParallelism() > 0) + Executor c = ForkJoinPool.commonPool(); + if (ForkJoinPool.getCommonPoolParallelism() > 1) assertSame(e, c); } @@ -3410,8 +3411,8 @@ public class CompletableFutureTest exten public void testFailedFuture2() { try { CompletableFuture f = CompletableFuture.failedFuture(null); - } catch(NullPointerException success) { - } + shouldThrow(); + } catch (NullPointerException success) {} } /** @@ -3512,8 +3513,7 @@ public class CompletableFutureTest exten try { f.join(); shouldThrow(); - } catch(Exception success) { - } + } catch (Exception success) {} checkCompletedWithWrappedCFException(f); } @@ -3538,13 +3538,12 @@ public class CompletableFutureTest exten try { f.join(); shouldThrow(); - } catch(Exception success) { - } + } catch (Exception success) {} checkCompletedWithWrappedCFException(f); } /** - * orTimeout completes with TimeoutException if not complete + * orTimeout completes with TimeoutException if not complete */ public void testOrTimeout() { CompletableFuture f = new CompletableFuture<>(); @@ -3553,7 +3552,7 @@ public class CompletableFutureTest exten } /** - * orTimeout completes normally if completed before timeout + * orTimeout completes normally if completed before timeout */ public void testOrTimeout2() { CompletableFuture f = new CompletableFuture<>(); @@ -3563,7 +3562,7 @@ public class CompletableFutureTest exten } /** - * completeOnTimeout completes with given value if not complete + * completeOnTimeout completes with given value if not complete */ public void testCompleteOnTimeout() { CompletableFuture f = new CompletableFuture<>(); @@ -3573,7 +3572,7 @@ public class CompletableFutureTest exten } /** - * completeOnTimeout has no effect if completed within timeout + * completeOnTimeout has no effect if completed within timeout */ public void testCompleteOnTimeout2() { CompletableFuture f = new CompletableFuture<>();