Merge branch 'master' into wip-sync-artery-dev-2.4.9-patriknw

This commit is contained in:
Patrik Nordwall 2016-08-23 20:14:15 +02:00
commit 8ab02738b7
483 changed files with 9535 additions and 2177 deletions

View file

@ -74,12 +74,15 @@ abstract class NodeChurnSpec
}
}
def awaitRemoved(additionaSystems: Vector[ActorSystem]): Unit = {
def awaitRemoved(additionaSystems: Vector[ActorSystem], round: Int): Unit = {
awaitMembersUp(roles.size, timeout = 40.seconds)
within(20.seconds) {
enterBarrier("removed-" + round)
within(3.seconds) {
awaitAssert {
additionaSystems.foreach { s
Cluster(s).isTerminated should be(true)
withClue(s"Cluster(s).self:") {
Cluster(s).isTerminated should be(true)
}
}
}
}
@ -113,7 +116,7 @@ abstract class NodeChurnSpec
else
Cluster(node).leave(Cluster(node).selfAddress)
}
awaitRemoved(systems)
awaitRemoved(systems, n)
enterBarrier("members-removed-" + n)
systems.foreach(_.terminate().await)
log.info("end of round-" + n)

View file

@ -330,9 +330,19 @@ abstract class SurviveNetworkInstabilitySpec
runOn(side1AfterJoin: _*) {
// side2 removed
val expected = (side1AfterJoin map address).toSet
awaitAssert(clusterView.members.map(_.address) should ===(expected))
awaitAssert(clusterView.members.collectFirst { case m if m.address == address(eighth) m.status } should ===(
Some(MemberStatus.Up)))
awaitAssert {
// repeat the downing in case it was not successful, which may
// happen if the removal was reverted due to gossip merge, see issue #18767
runOn(fourth) {
for (role2 side2) {
cluster.down(role2)
}
}
clusterView.members.map(_.address) should ===(expected)
clusterView.members.collectFirst { case m if m.address == address(eighth) m.status } should ===(
Some(MemberStatus.Up))
}
}
enterBarrier("side2-removed")