harden cluster.NodeChurnSpec, #19536

* increasing the awaitAssert timeout since logs show that things are
  "still in progress" when leaving
This commit is contained in:
Patrik Nordwall 2016-03-22 08:38:43 +01:00
parent 22dead97c9
commit 86d6b91846

View file

@ -63,20 +63,24 @@ abstract class NodeChurnSpec
def awaitAllMembersUp(additionaSystems: Vector[ActorSystem]): Unit = {
val numberOfMembers = roles.size + roles.size * additionaSystems.size
awaitMembersUp(numberOfMembers)
awaitAssert {
additionaSystems.foreach { s
val c = Cluster(s)
c.state.members.size should be(numberOfMembers)
c.state.members.forall(_.status == MemberStatus.Up) shouldBe true
within(20.seconds) {
awaitAssert {
additionaSystems.foreach { s
val c = Cluster(s)
c.state.members.size should be(numberOfMembers)
c.state.members.forall(_.status == MemberStatus.Up) shouldBe true
}
}
}
}
def awaitRemoved(additionaSystems: Vector[ActorSystem]): Unit = {
awaitMembersUp(roles.size, timeout = 40.seconds)
awaitAssert {
additionaSystems.foreach { s
Cluster(s).isTerminated should be(true)
within(20.seconds) {
awaitAssert {
additionaSystems.foreach { s
Cluster(s).isTerminated should be(true)
}
}
}
}
@ -87,6 +91,7 @@ abstract class NodeChurnSpec
system.eventStream.subscribe(logListener, classOf[Info])
cluster.joinSeedNodes(seedNodes)
awaitMembersUp(roles.size)
enterBarrier("stable")
}
"join and remove transient nodes without growing gossip payload" taggedAs LongRunningTest in {