Support for null in mapAsync and fromCompletionStage #25475
This commit is contained in:
parent
549ccb78a6
commit
d4813b91c3
9 changed files with 134 additions and 48 deletions
|
|
@ -585,6 +585,15 @@ public class SourceTest extends StreamTest {
|
|||
assertEquals("A", result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mustWorkFromFutureVoid() throws Exception {
|
||||
CompletionStage<Void> future = CompletableFuture.completedFuture(null);
|
||||
CompletionStage<List<Void>> future2 =
|
||||
Source.fromCompletionStage(future).runWith(Sink.seq(), materializer);
|
||||
List<Void> result = future2.toCompletableFuture().get(3, TimeUnit.SECONDS);
|
||||
assertEquals(0, result.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mustWorkFromRange() throws Exception {
|
||||
CompletionStage<List<Integer>> f =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue