Incorrect assumptions in LazyAndFutureSourcesTest (#28479)
This commit is contained in:
parent
4c9c05cfde
commit
044e706eb9
1 changed files with 9 additions and 4 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
package akka.stream.javadsl;
|
||||
|
||||
import akka.Done;
|
||||
import akka.NotUsed;
|
||||
import akka.japi.Pair;
|
||||
import akka.stream.StreamTest;
|
||||
|
|
@ -60,7 +59,9 @@ public class LazyAndFutureSourcesTest extends StreamTest {
|
|||
CompletionStage<NotUsed> nestedMatVal = result.first();
|
||||
CompletionStage<List<String>> list = result.second();
|
||||
assertEquals(Arrays.asList("one"), list.toCompletableFuture().get(3, TimeUnit.SECONDS));
|
||||
assertEquals(true, nestedMatVal.toCompletableFuture().isDone());
|
||||
// Future adaption to completionstage of matval means we cannot count on matval future being
|
||||
// completed just because stream is
|
||||
nestedMatVal.toCompletableFuture().get(3, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -87,7 +88,9 @@ public class LazyAndFutureSourcesTest extends StreamTest {
|
|||
CompletionStage<NotUsed> nestedMatVal = result.first();
|
||||
CompletionStage<List<String>> list = result.second();
|
||||
assertEquals(Arrays.asList("one"), list.toCompletableFuture().get(3, TimeUnit.SECONDS));
|
||||
assertEquals(true, nestedMatVal.toCompletableFuture().isDone());
|
||||
// Future adaption to completionstage of matval means we cannot count on matval future being
|
||||
// completed just because stream is
|
||||
nestedMatVal.toCompletableFuture().get(3, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -101,6 +104,8 @@ public class LazyAndFutureSourcesTest extends StreamTest {
|
|||
CompletionStage<NotUsed> nestedMatVal = result.first();
|
||||
CompletionStage<List<String>> list = result.second();
|
||||
assertEquals(Arrays.asList("one"), list.toCompletableFuture().get(3, TimeUnit.SECONDS));
|
||||
assertEquals(true, nestedMatVal.toCompletableFuture().isDone());
|
||||
// flatMap/thenCompose of matval means we cannot count on matval future being completed just
|
||||
// because stream is
|
||||
nestedMatVal.toCompletableFuture().get(3, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue