* from logs it looks like the replicated event from the first incarnation of the actor isn't stored before the second incarnation is replayed * stop and wait for termination before starting second incarnation
This commit is contained in:
parent
5e523053e3
commit
3a2c1a688d
1 changed files with 7 additions and 0 deletions
|
|
@ -202,6 +202,8 @@ class ReplicatedEventSourcingSpec
|
||||||
r1 ! StoreMe("Event", replyProbe.ref)
|
r1 ! StoreMe("Event", replyProbe.ref)
|
||||||
eventProbeR1.expectMessage(EventAndContext("Event", ReplicaId("R1"), recoveryRunning = false, false))
|
eventProbeR1.expectMessage(EventAndContext("Event", ReplicaId("R1"), recoveryRunning = false, false))
|
||||||
replyProbe.expectMessage(Done)
|
replyProbe.expectMessage(Done)
|
||||||
|
r1 ! Stop
|
||||||
|
replyProbe.expectTerminated(r1)
|
||||||
|
|
||||||
val recoveryProbe = createTestProbe[EventAndContext]()
|
val recoveryProbe = createTestProbe[EventAndContext]()
|
||||||
spawn(testBehavior(entityId, "R1", recoveryProbe.ref))
|
spawn(testBehavior(entityId, "R1", recoveryProbe.ref))
|
||||||
|
|
@ -371,6 +373,11 @@ class ReplicatedEventSourcingSpec
|
||||||
eventProbeR1.expectMessage(
|
eventProbeR1.expectMessage(
|
||||||
EventAndContext("from r2", ReplicaId("R2"), recoveryRunning = false, concurrent = true))
|
EventAndContext("from r2", ReplicaId("R2"), recoveryRunning = false, concurrent = true))
|
||||||
|
|
||||||
|
r1 ! Stop
|
||||||
|
r2 ! Stop
|
||||||
|
probe.expectTerminated(r1)
|
||||||
|
probe.expectTerminated(r2)
|
||||||
|
|
||||||
// take 2
|
// take 2
|
||||||
val eventProbeR1Take2 = createTestProbe[EventAndContext]()
|
val eventProbeR1Take2 = createTestProbe[EventAndContext]()
|
||||||
spawn(testBehavior(entityId, "R1", eventProbeR1Take2.ref))
|
spawn(testBehavior(entityId, "R1", eventProbeR1Take2.ref))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue