Fixes Java test on null empty state: try to avoid race condition by waiting for 1 persistent actor to stop before starting the next one (#30579)
This commit is contained in:
parent
6bada7a107
commit
cd2b9bcd11
1 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ public class NullEmptyStateTest extends JUnitSuite {
|
|||
ActorRef<String> ref1 = testKit.spawn(b);
|
||||
probe.expectMessage("onRecoveryCompleted:null");
|
||||
ref1.tell("stop");
|
||||
// wait till ref1 stops
|
||||
probe.expectTerminated(ref1);
|
||||
|
||||
ActorRef<String> ref2 = testKit.spawn(b);
|
||||
probe.expectMessage("onRecoveryCompleted:null");
|
||||
|
|
@ -99,6 +101,8 @@ public class NullEmptyStateTest extends JUnitSuite {
|
|||
probe.expectMessage("eventHandler:one:two");
|
||||
|
||||
ref2.tell("stop");
|
||||
// wait till ref2 stops
|
||||
probe.expectTerminated(ref2);
|
||||
ActorRef<String> ref3 = testKit.spawn(b);
|
||||
// eventHandler from reply
|
||||
probe.expectMessage("eventHandler:null:one");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue