#24104 Give a bit of time for consumers to register
This commit is contained in:
parent
f1de21950d
commit
a3ae494325
1 changed files with 8 additions and 0 deletions
|
|
@ -313,6 +313,10 @@ class HubSpec extends StreamSpec {
|
|||
downstream1.request(4)
|
||||
downstream2.request(8)
|
||||
|
||||
// sending the first element is in a race with downstream subscribing
|
||||
// give a bit of time for the downstream to complete subscriptions
|
||||
Thread.sleep(50)
|
||||
|
||||
(1 to 8) foreach (upstream.sendNext(_))
|
||||
|
||||
downstream1.expectNext(1, 2, 3, 4)
|
||||
|
|
@ -576,6 +580,10 @@ class HubSpec extends StreamSpec {
|
|||
downstream1.request(4)
|
||||
downstream2.request(8)
|
||||
|
||||
// to make sure downstream subscriptions are done before
|
||||
// starting to send elements
|
||||
Thread.sleep(50)
|
||||
|
||||
(0 until 16) foreach (upstream.sendNext(_))
|
||||
|
||||
downstream1.expectNext(0, 2, 4, 6)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue