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.160 by jsr166, Mon Jun 27 21:41:17 2016 UTC vs.
Revision 1.161 by jsr166, Tue Jun 28 14:49:48 2016 UTC

# Line 3354 | Line 3354 | public class CompletableFutureTest exten
3354       * Test submissions to an executor that rejects all tasks.
3355       */
3356      public void testRejectingExecutor() {
3357 <        for (Integer v : new Integer[] { 1, null }) {
3358 <
3357 >        for (Integer v : new Integer[] { 1, null })
3358 >    {
3359          final CountingRejectingExecutor e = new CountingRejectingExecutor();
3360  
3361          final CompletableFuture<Integer> complete = CompletableFuture.completedFuture(v);
# Line 3434 | Line 3434 | public class CompletableFutureTest exten
3434              checkCompletedWithWrappedException(future, e.ex);
3435  
3436          assertEquals(futures.size(), e.count.get());
3437 <
3438 <        }
3439 <    }
3437 >    }}
3438  
3439      /**
3440       * Test submissions to an executor that rejects all tasks, but
# Line 3444 | Line 3442 | public class CompletableFutureTest exten
3442       * explicitly completed.
3443       */
3444      public void testRejectingExecutorNeverInvoked() {
3445 +        for (Integer v : new Integer[] { 1, null })
3446 +    {
3447          final CountingRejectingExecutor e = new CountingRejectingExecutor();
3448  
3449        for (Integer v : new Integer[] { 1, null }) {
3450
3449          final CompletableFuture<Integer> complete = CompletableFuture.completedFuture(v);
3450          final CompletableFuture<Integer> incomplete = new CompletableFuture<>();
3451  
# Line 3495 | Line 3493 | public class CompletableFutureTest exten
3493              checkCompletedNormally(future, null);
3494  
3495          assertEquals(0, e.count.get());
3496 <
3499 <        }
3500 <    }
3496 >    }}
3497  
3498      /**
3499       * toCompletableFuture returns this CompletableFuture.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines