diff --git a/akka-persistence-typed-tests/src/test/scala/akka/persistence/typed/ReplicatedEventSourcingSpec.scala b/akka-persistence-typed-tests/src/test/scala/akka/persistence/typed/ReplicatedEventSourcingSpec.scala index 37daf15099..6e1afef7c5 100644 --- a/akka-persistence-typed-tests/src/test/scala/akka/persistence/typed/ReplicatedEventSourcingSpec.scala +++ b/akka-persistence-typed-tests/src/test/scala/akka/persistence/typed/ReplicatedEventSourcingSpec.scala @@ -202,6 +202,8 @@ class ReplicatedEventSourcingSpec r1 ! StoreMe("Event", replyProbe.ref) eventProbeR1.expectMessage(EventAndContext("Event", ReplicaId("R1"), recoveryRunning = false, false)) replyProbe.expectMessage(Done) + r1 ! Stop + replyProbe.expectTerminated(r1) val recoveryProbe = createTestProbe[EventAndContext]() spawn(testBehavior(entityId, "R1", recoveryProbe.ref)) @@ -371,6 +373,11 @@ class ReplicatedEventSourcingSpec eventProbeR1.expectMessage( EventAndContext("from r2", ReplicaId("R2"), recoveryRunning = false, concurrent = true)) + r1 ! Stop + r2 ! Stop + probe.expectTerminated(r1) + probe.expectTerminated(r2) + // take 2 val eventProbeR1Take2 = createTestProbe[EventAndContext]() spawn(testBehavior(entityId, "R1", eventProbeR1Take2.ref))