Refactor cluster startup join in tests and fix barrier race
* Refactored common code to MultiNodeClusterSpec.awaitClusterUp * Fixed some race conditions of barriers
This commit is contained in:
parent
5ccfb2cfee
commit
f02793ebd6
18 changed files with 85 additions and 208 deletions
|
|
@ -35,16 +35,7 @@ abstract class NodeShutdownSpec extends MultiNodeSpec(NodeShutdownMultiJvmSpec)
|
|||
"A cluster of 2 nodes" must {
|
||||
|
||||
"not be singleton cluster when joined" taggedAs LongRunningTest in {
|
||||
// make sure that the node-to-join is started before other join
|
||||
runOn(first) {
|
||||
startClusterNode()
|
||||
}
|
||||
testConductor.enter("first-started")
|
||||
|
||||
runOn(second) {
|
||||
cluster.join(node(first).address)
|
||||
}
|
||||
awaitUpConvergence(numberOfMembers = 2)
|
||||
awaitClusterUp(first, second)
|
||||
cluster.isSingletonCluster must be(false)
|
||||
assertLeader(first, second)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue