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.103 by dl, Thu Sep 3 11:45:34 2015 UTC vs.
Revision 1.106 by jsr166, Thu Sep 3 17:01:22 2015 UTC

# Line 3359 | Line 3359 | public class CompletableFutureTest exten
3359      }
3360  
3361      // jdk9
3362 <    
3362 >
3363      /**
3364       * newIncompleteFuture returns an incomplete CompletableFuture
3365       */
# Line 3390 | Line 3390 | public class CompletableFutureTest exten
3390          CompletableFuture<Integer> f = new CompletableFuture<>();
3391          Executor e = f.defaultExecutor();
3392          Executor c =  ForkJoinPool.commonPool();
3393 <        if (ForkJoinPool.getCommonPoolParallelism() > 0)
3393 >        if (ForkJoinPool.getCommonPoolParallelism() > 1)
3394              assertSame(e, c);
3395      }
3396  
# Line 3410 | Line 3410 | public class CompletableFutureTest exten
3410      public void testFailedFuture2() {
3411          try {
3412              CompletableFuture<Integer> f = CompletableFuture.failedFuture(null);
3413 <        } catch(NullPointerException success) {
3414 <        }
3413 >            shouldThrow();
3414 >        } catch (NullPointerException success) {}
3415      }
3416  
3417      /**
# Line 3512 | Line 3512 | public class CompletableFutureTest exten
3512          try {
3513              f.join();
3514              shouldThrow();
3515 <        } catch(Exception success) {
3516 <        }
3515 >        } catch (Exception success) {}
3516          checkCompletedWithWrappedCFException(f);
3517      }
3518  
# Line 3538 | Line 3537 | public class CompletableFutureTest exten
3537          try {
3538              f.join();
3539              shouldThrow();
3540 <        } catch(Exception success) {
3542 <        }
3540 >        } catch (Exception success) {}
3541          checkCompletedWithWrappedCFException(f);
3542      }
3543  
3544      /**
3545 <     *  orTimeout completes with TimeoutException if not complete
3545 >     * orTimeout completes with TimeoutException if not complete
3546       */
3547      public void testOrTimeout() {
3548          CompletableFuture<Integer> f = new CompletableFuture<>();
# Line 3553 | Line 3551 | public class CompletableFutureTest exten
3551      }
3552  
3553      /**
3554 <     *  orTimeout completes normally if completed before timeout
3554 >     * orTimeout completes normally if completed before timeout
3555       */
3556      public void testOrTimeout2() {
3557          CompletableFuture<Integer> f = new CompletableFuture<>();
# Line 3563 | Line 3561 | public class CompletableFutureTest exten
3561      }
3562  
3563      /**
3564 <     *  completeOnTimeout completes with given value if not complete
3564 >     * completeOnTimeout completes with given value if not complete
3565       */
3566      public void testCompleteOnTimeout() {
3567          CompletableFuture<Integer> f = new CompletableFuture<>();
# Line 3573 | Line 3571 | public class CompletableFutureTest exten
3571      }
3572  
3573      /**
3574 <     *  completeOnTimeout has no effect if completed within timeout
3574 >     * completeOnTimeout has no effect if completed within timeout
3575       */
3576      public void testCompleteOnTimeout2() {
3577          CompletableFuture<Integer> f = new CompletableFuture<>();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines