+str #18565 termination notification combinator
This commit is contained in:
parent
4dd6efc6a8
commit
98c72e7d13
9 changed files with 173 additions and 3 deletions
|
|
@ -508,6 +508,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