Merge pull request #21811 from akka/wip-21718-ClusterShardingSpec-patriknw
harden ClusterShardingSpec, #21718 and #21535
This commit is contained in:
commit
a55e84fbd6
1 changed files with 10 additions and 6 deletions
|
|
@ -158,6 +158,7 @@ abstract class ClusterShardingSpecConfig(
|
|||
max-simultaneous-rebalance = 1
|
||||
}
|
||||
}
|
||||
akka.testconductor.barrier-timeout = 70s
|
||||
"""))
|
||||
nodeConfig(sixth) {
|
||||
ConfigFactory.parseString("""akka.cluster.roles = ["frontend"]""")
|
||||
|
|
@ -188,12 +189,10 @@ object PersistentClusterShardingSpecConfig extends ClusterShardingSpecConfig("pe
|
|||
object DDataClusterShardingSpecConfig extends ClusterShardingSpecConfig("ddata")
|
||||
object PersistentClusterShardingWithEntityRecoverySpecConfig extends ClusterShardingSpecConfig(
|
||||
"persistence",
|
||||
"all"
|
||||
)
|
||||
"all")
|
||||
object DDataClusterShardingWithEntityRecoverySpecConfig extends ClusterShardingSpecConfig(
|
||||
"ddata",
|
||||
"constant"
|
||||
)
|
||||
"constant")
|
||||
|
||||
class PersistentClusterShardingSpec extends ClusterShardingSpec(PersistentClusterShardingSpecConfig)
|
||||
class DDataClusterShardingSpec extends ClusterShardingSpec(DDataClusterShardingSpecConfig)
|
||||
|
|
@ -709,8 +708,13 @@ abstract class ClusterShardingSpec(config: ClusterShardingSpecConfig) extends Mu
|
|||
//Check that counter 1 is now alive again, even though we have
|
||||
// not sent a message to it via the ShardRegion
|
||||
val counter1 = system.actorSelection(lastSender.path.parent / "1")
|
||||
counter1 ! Identify(2)
|
||||
expectMsgType[ActorIdentity](3 seconds).ref should not be (None)
|
||||
within(5.seconds) {
|
||||
awaitAssert {
|
||||
val p = TestProbe()
|
||||
counter1.tell(Identify(2), p.ref)
|
||||
p.expectMsgType[ActorIdentity](2.seconds).ref should not be (None)
|
||||
}
|
||||
}
|
||||
|
||||
counter1 ! Get(1)
|
||||
expectMsg(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue