Failed: hub spec #31028

This commit is contained in:
Johan Andrén 2022-03-09 18:01:31 +01:00 committed by GitHub
parent 77727f0776
commit 95e60f4e85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -698,8 +698,15 @@ class HubSpec extends StreamSpec {
(0 until 16).foreach(upstream.sendNext(_))
downstream1.expectNext(0, 2, 4, 6)
downstream1.expectNext(0, 2, 4, 6) // 8, 10, 12, 14 stays in buffer bc no demand
// if we don't demand more from downstream 1 here, there is a race condition where
// demand from downstream 2 is lost, because the buffer was full with elements for the other partition
// however this is likely because of the very fine grained demand logic in this test and not likely
// to happen in reality where both downstreams are likely going to keep pulling, or canceling
// for a scenario where one dosntream continous back pressures, head of line blocking can anyway happen
downstream1.request(1)
downstream2.expectNext(1, 3, 5, 7, 9, 11, 13, 15)
downstream1.expectNext(8)
downstream1.expectNoMessage(100.millis)
downstream2.expectNoMessage(100.millis)