+str #15558 Initial delay support for TickProducer

This commit is contained in:
Alexey Romanchuk 2014-07-18 10:55:34 +07:00
parent fedde06bec
commit edf59b1cd4
6 changed files with 23 additions and 22 deletions

View file

@ -493,11 +493,12 @@ public class FlowTest {
return "tick-" + (count++);
}
};
Flow.create(FiniteDuration.create(1, TimeUnit.SECONDS), tick).foreach(new Procedure<String>() {
public void apply(String elem) {
probe.getRef().tell(elem, ActorRef.noSender());
Flow.create(FiniteDuration.create(1, TimeUnit.SECONDS), FiniteDuration.create(500, TimeUnit.MILLISECONDS), tick).foreach(new Procedure<String>() {
public void apply(String elem) {
probe.getRef().tell(elem, ActorRef.noSender());
}
}, materializer);
probe.expectNoMsg(FiniteDuration.create(600, TimeUnit.MILLISECONDS));
probe.expectMsgEquals("tick-1");
probe.expectNoMsg(FiniteDuration.create(200, TimeUnit.MILLISECONDS));
probe.expectMsgEquals("tick-2");