add additional coverage for possible case
This commit is contained in:
parent
41c59fdf48
commit
375c1f8365
1 changed files with 18 additions and 0 deletions
|
|
@ -202,6 +202,24 @@ class GraphZipLatestSpec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"complete when one source completes and the other continues pushing" in {
|
||||||
|
|
||||||
|
val (probe, bools, ints) = testGraph[Boolean, Int]
|
||||||
|
|
||||||
|
Given("one element pushed on each source")
|
||||||
|
bools.sendNext(true)
|
||||||
|
ints.sendNext(1)
|
||||||
|
|
||||||
|
And("either source completes")
|
||||||
|
bools.sendComplete()
|
||||||
|
ints.sendNext(10)
|
||||||
|
ints.sendNext(10)
|
||||||
|
|
||||||
|
Then("should emit first element then complete")
|
||||||
|
probe.requestNext((true, 1))
|
||||||
|
probe.expectComplete()
|
||||||
|
}
|
||||||
|
|
||||||
"complete if no pending demand" in {
|
"complete if no pending demand" in {
|
||||||
forAll(Gen.oneOf(first, second)) { select ⇒
|
forAll(Gen.oneOf(first, second)) { select ⇒
|
||||||
val (probe, bools, ints) = testGraph[Boolean, Int]
|
val (probe, bools, ints) = testGraph[Boolean, Int]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue