Skip to content

Commit

Permalink
test: add test cases for allOf*/anyOf* of `CompletableFutureUtils…
Browse files Browse the repository at this point in the history
…` ☔️
  • Loading branch information
oldratlee committed Apr 16, 2023
1 parent 294d4f4 commit cbe3e4c
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 59 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/foldright/cffu/CompletableFutureUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ private static void fill(CompletableFuture[] cfs,
/**
* Returns a new CompletableFuture that is completed
* when any of the given CompletableFutures complete, with the same result.
* Otherwise, if it completed exceptionally, the returned CompletableFuture also does so,
* with a CompletionException holding this exception as its cause.
* If no CompletableFutures are provided, returns an incomplete CompletableFuture.
* <p>
* Same as {@link CompletableFuture#anyOf(CompletableFuture[])},
* but return result type is specified type instead of {@code Object}.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/foldright/cffu/CffuFactoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CffuFactoryTest {
static final double d = 42.1;

static final RuntimeException rte = new RuntimeException("Bang");
static final RuntimeException another_rte = new RuntimeException("BangBang");
static final RuntimeException another_rte = new RuntimeException("BangAnother");

private static CffuFactory cffuFactory;

Expand Down
Loading

0 comments on commit cbe3e4c

Please sign in to comment.