Merge pull request #19498 from agolubev/agolubev-#18565-TerminationNotification-combinator
+str #18565 termination notification combinator
This commit is contained in:
commit
41d8b1fadd
9 changed files with 173 additions and 3 deletions
|
|
@ -487,6 +487,16 @@ public class FlowTest extends StreamTest {
|
|||
assertEquals(input, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mustBeAbleToUseWatchTermination() throws Exception {
|
||||
final List<String> input = Arrays.asList("A", "B", "C");
|
||||
Future<Done> future = Source.from(input)
|
||||
.watchTermination(Keep.<NotUsed, Future<Done>>right())
|
||||
.to(Sink.ignore()).run(materializer);
|
||||
|
||||
assertEquals(Done.getInstance(), Await.result(future, FiniteDuration.create(3, TimeUnit.SECONDS)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mustBeAbleToUseConflate() throws Exception {
|
||||
final JavaTestKit probe = new JavaTestKit(system);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue