harden ClusterSingletonManagerLeaseSpec, #29423

* default test timeout too short for the join
This commit is contained in:
Patrik Nordwall 2020-08-10 14:58:26 +02:00
parent c41c0420ad
commit fc44a02ae2
2 changed files with 19 additions and 13 deletions

View file

@ -135,7 +135,7 @@ abstract class ExternalShardAllocationSpec
}
enterBarrier("allocated-to-new-node")
runOn(forth) {
joinWithin(first)
joinWithin(first, max = 10.seconds)
}
enterBarrier("forth-node-joined")
runOn(first, second, third) {

View file

@ -94,24 +94,30 @@ class ClusterSingletonManagerLeaseSpec
awaitClusterUp(controller, first)
enterBarrier("initial-up")
runOn(second) {
joinWithin(first)
awaitAssert({
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up)
}, 10.seconds)
within(10.seconds) {
joinWithin(first)
awaitAssert {
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up)
}
}
}
enterBarrier("second-up")
runOn(third) {
joinWithin(first)
awaitAssert({
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up, Up)
}, 10.seconds)
within(10.seconds) {
joinWithin(first)
awaitAssert {
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up, Up)
}
}
}
enterBarrier("third-up")
runOn(fourth) {
joinWithin(first)
awaitAssert({
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up, Up, Up)
}, 10.seconds)
within(10.seconds) {
joinWithin(first)
awaitAssert {
cluster.state.members.toList.map(_.status) shouldEqual List(Up, Up, Up, Up, Up)
}
}
}
enterBarrier("fourth-up")
}