Merge pull request #29958 from johanandren/wip-29949-WorkPullingWithEventSourcedProducerQueueSpec-race-fix

Race condition in WorkPullingWithEventSourcedProducerQueueSpec
This commit is contained in:
Patrik Nordwall 2021-01-20 10:36:46 +01:00 committed by GitHub
commit 4b23d0ccc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,17 +93,18 @@ class WorkPullingWithEventSourcedProducerQueueSpec
producerProbe.expectNoMessage()
val delivery1 = consumerProbe.receiveMessage()
delivery1.message should ===("a")
delivery1.confirmTo ! ConsumerController.Confirmed
val delivery2 = consumerProbe.receiveMessage()
delivery2.message should ===("b")
delivery2.confirmTo ! ConsumerController.Confirmed
val delivery3 = consumerProbe.receiveMessage()
delivery3.message should ===("c")
delivery3.confirmTo ! ConsumerController.Confirmed
// since we have two consumers with the same probe order of delivery to the
// probe is not deterministic
Set(delivery1.message, delivery2.message, delivery3.message) should ===(Set("a", "b", "c"))
producerProbe.expectNoMessage()
requestNext4.sendNextTo ! "d"