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") enterBarrier("allocated-to-new-node")
runOn(forth) { runOn(forth) {
joinWithin(first) joinWithin(first, max = 10.seconds)
} }
enterBarrier("forth-node-joined") enterBarrier("forth-node-joined")
runOn(first, second, third) { runOn(first, second, third) {

View file

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