#19271 Eager Zip and Merge Preferred

This commit is contained in:
Martynas Mickevičius 2016-01-14 09:56:11 +02:00
parent be0c8af4c0
commit 02a933bd87
6 changed files with 92 additions and 46 deletions

View file

@ -121,10 +121,7 @@ class GraphInterpreterSpec extends AkkaSpec with GraphInterpreterSpecKit {
lastEvents() should ===(Set.empty)
source2.onNext("Meaning of life")
lastEvents() should ===(Set(OnNext(sink, (42, "Meaning of life"))))
sink.requestOne()
lastEvents() should ===(Set(RequestOne(source1), RequestOne(source2)))
lastEvents() should ===(Set(OnNext(sink, (42, "Meaning of life")), RequestOne(source1), RequestOne(source2)))
}
"implement Broadcast" in new TestSetup {
@ -169,13 +166,11 @@ class GraphInterpreterSpec extends AkkaSpec with GraphInterpreterSpecKit {
lastEvents() should ===(Set(RequestOne(source)))
source.onNext(1)
lastEvents() should ===(Set(OnNext(sink, (1, 1))))
lastEvents() should ===(Set(OnNext(sink, (1, 1)), RequestOne(source)))
sink.requestOne()
lastEvents() should ===(Set(RequestOne(source)))
source.onNext(2)
lastEvents() should ===(Set(OnNext(sink, (2, 2))))
lastEvents() should ===(Set(OnNext(sink, (2, 2)), RequestOne(source)))
}
@ -198,16 +193,15 @@ class GraphInterpreterSpec extends AkkaSpec with GraphInterpreterSpecKit {
lastEvents() should ===(Set.empty)
sink1.requestOne()
lastEvents() should ===(Set.empty)
lastEvents() should ===(Set(RequestOne(source1), RequestOne(source2)))
sink2.requestOne()
lastEvents() should ===(Set(RequestOne(source1), RequestOne(source2)))
source1.onNext(1)
lastEvents() should ===(Set.empty)
source2.onNext(2)
lastEvents() should ===(Set(OnNext(sink1, (1, 2)), OnNext(sink2, (1, 2))))
lastEvents() should ===(Set(OnNext(sink1, (1, 2)), OnNext(sink2, (1, 2)), RequestOne(source1), RequestOne(source2)))
}