# | Line 345 | Line 345 | public class CompletableFutureTest exten | |
---|---|---|
345 | f = new CompletableFuture<String>(); | |
346 | f.completeExceptionally(new IndexOutOfBoundsException()); | |
347 | assertTrue(f.toString().contains("[Completed exceptionally]")); | |
348 | + | |
349 | + | f = new CompletableFuture<String>(); |
350 | + | f.cancel(true); |
351 | + | assertTrue(f.toString().contains("[Completed exceptionally]")); |
352 | + | |
353 | + | f = new CompletableFuture<String>(); |
354 | + | f.cancel(false); |
355 | + | assertTrue(f.toString().contains("[Completed exceptionally]")); |
356 | } | |
357 | ||
358 | /** |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |