Fix race condition on shard region noticing shard shutdown in RememberEntitiesAndStartEntitySpec #31221 (#31224)
This commit is contained in:
parent
93622f56e7
commit
f2bd251e19
1 changed files with 5 additions and 2 deletions
|
|
@ -91,8 +91,11 @@ class RememberEntitiesAndStartEntitySpec
|
|||
|
||||
// trigger shard start by messaging other actor in it
|
||||
system.log.info("Starting shard again")
|
||||
sharding ! EntityEnvelope(11, "give-me-shard")
|
||||
val secondShardIncarnation = expectMsgType[ActorRef]
|
||||
// race condition between this message and region getting the termination message, we may need to retry
|
||||
val secondShardIncarnation = awaitAssert {
|
||||
sharding ! EntityEnvelope(11, "give-me-shard")
|
||||
expectMsgType[ActorRef]
|
||||
}
|
||||
|
||||
awaitAssert {
|
||||
secondShardIncarnation ! GetShardStats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue