=pro #3759 Changed to using non-deprecated ScalaTest Matchers
This commit is contained in:
parent
b8c7d7badd
commit
003609c9c5
246 changed files with 2822 additions and 2822 deletions
|
|
@ -53,7 +53,7 @@ abstract class ClientDowningNodeThatIsUnreachableSpec(multiNodeConfig: ClientDow
|
|||
enterBarrier("down-third-node")
|
||||
|
||||
awaitMembersUp(numberOfMembers = 3, canNotBePartOfMemberRing = Set(thirdAddress))
|
||||
clusterView.members.exists(_.address == thirdAddress) must be(false)
|
||||
clusterView.members.exists(_.address == thirdAddress) should be(false)
|
||||
}
|
||||
|
||||
runOn(third) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ abstract class ClientDowningNodeThatIsUpSpec(multiNodeConfig: ClientDowningNodeT
|
|||
markNodeAsUnavailable(thirdAddress)
|
||||
|
||||
awaitMembersUp(numberOfMembers = 3, canNotBePartOfMemberRing = Set(thirdAddress))
|
||||
clusterView.members.exists(_.address == thirdAddress) must be(false)
|
||||
clusterView.members.exists(_.address == thirdAddress) should be(false)
|
||||
}
|
||||
|
||||
runOn(third) {
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ abstract class ClusterAccrualFailureDetectorSpec
|
|||
awaitClusterUp(first, second, third)
|
||||
|
||||
Thread.sleep(5.seconds.dilated.toMillis) // let them heartbeat
|
||||
cluster.failureDetector.isAvailable(first) must be(true)
|
||||
cluster.failureDetector.isAvailable(second) must be(true)
|
||||
cluster.failureDetector.isAvailable(third) must be(true)
|
||||
cluster.failureDetector.isAvailable(first) should be(true)
|
||||
cluster.failureDetector.isAvailable(second) should be(true)
|
||||
cluster.failureDetector.isAvailable(third) should be(true)
|
||||
|
||||
enterBarrier("after-1")
|
||||
}
|
||||
|
|
@ -59,14 +59,14 @@ abstract class ClusterAccrualFailureDetectorSpec
|
|||
// detect failure...
|
||||
awaitCond(!cluster.failureDetector.isAvailable(second), 15.seconds)
|
||||
// other connections still ok
|
||||
cluster.failureDetector.isAvailable(third) must be(true)
|
||||
cluster.failureDetector.isAvailable(third) should be(true)
|
||||
}
|
||||
|
||||
runOn(second) {
|
||||
// detect failure...
|
||||
awaitCond(!cluster.failureDetector.isAvailable(first), 15.seconds)
|
||||
// other connections still ok
|
||||
cluster.failureDetector.isAvailable(third) must be(true)
|
||||
cluster.failureDetector.isAvailable(third) should be(true)
|
||||
}
|
||||
|
||||
enterBarrier("partitioned")
|
||||
|
|
@ -99,8 +99,8 @@ abstract class ClusterAccrualFailureDetectorSpec
|
|||
// remaning nodes should detect failure...
|
||||
awaitCond(!cluster.failureDetector.isAvailable(third), 15.seconds)
|
||||
// other connections still ok
|
||||
cluster.failureDetector.isAvailable(first) must be(true)
|
||||
cluster.failureDetector.isAvailable(second) must be(true)
|
||||
cluster.failureDetector.isAvailable(first) should be(true)
|
||||
cluster.failureDetector.isAvailable(second) should be(true)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
|
|||
|
|
@ -103,11 +103,11 @@ abstract class ClusterDeathWatchSpec
|
|||
enterBarrier("second-terminated")
|
||||
|
||||
markNodeAsUnavailable(third)
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(third)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(third)))
|
||||
cluster.down(third)
|
||||
// removed
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (address(third)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (address(third)))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(third)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(third)))
|
||||
expectMsg(path3)
|
||||
enterBarrier("third-terminated")
|
||||
|
||||
|
|
@ -119,11 +119,11 @@ abstract class ClusterDeathWatchSpec
|
|||
enterBarrier("watch-established")
|
||||
runOn(third) {
|
||||
markNodeAsUnavailable(second)
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(second)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
||||
cluster.down(second)
|
||||
// removed
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (address(second)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (address(second)))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(second)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(second)))
|
||||
}
|
||||
enterBarrier("second-terminated")
|
||||
enterBarrier("third-terminated")
|
||||
|
|
@ -171,7 +171,7 @@ abstract class ClusterDeathWatchSpec
|
|||
// fifth is not cluster member, so the watch is handled by the RemoteWatcher
|
||||
awaitAssert {
|
||||
remoteWatcher ! RemoteWatcher.Stats
|
||||
expectMsgType[RemoteWatcher.Stats].watchingRefs must contain((subject5, testActor))
|
||||
expectMsgType[RemoteWatcher.Stats].watchingRefs should contain((subject5, testActor))
|
||||
}
|
||||
}
|
||||
enterBarrier("remote-watch")
|
||||
|
|
@ -186,7 +186,7 @@ abstract class ClusterDeathWatchSpec
|
|||
remoteWatcher ! RemoteWatcher.Stats
|
||||
expectMsgType[RemoteWatcher.Stats].watchingRefs.map {
|
||||
case (watchee, watcher) ⇒ watchee.path.name
|
||||
} must not contain ("subject5")
|
||||
} should not contain ("subject5")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -194,16 +194,16 @@ abstract class ClusterDeathWatchSpec
|
|||
|
||||
runOn(fourth) {
|
||||
markNodeAsUnavailable(fifth)
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(fifth)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(fifth)))
|
||||
cluster.down(fifth)
|
||||
// removed
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (address(fifth)))
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (address(fifth)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(fifth)))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(fifth)))
|
||||
}
|
||||
|
||||
enterBarrier("fifth-terminated")
|
||||
runOn(first) {
|
||||
expectMsgType[Terminated].actor.path.name must be("subject5")
|
||||
expectMsgType[Terminated].actor.path.name should be("subject5")
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -220,17 +220,17 @@ abstract class ClusterDeathWatchSpec
|
|||
|
||||
runOn(fourth) {
|
||||
val hello = system.actorOf(Props[Hello], "hello")
|
||||
hello.isInstanceOf[RemoteActorRef] must be(true)
|
||||
hello.path.address must be(address(first))
|
||||
hello.isInstanceOf[RemoteActorRef] should be(true)
|
||||
hello.path.address should be(address(first))
|
||||
watch(hello)
|
||||
enterBarrier("hello-deployed")
|
||||
|
||||
markNodeAsUnavailable(first)
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(first)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(first)))
|
||||
cluster.down(first)
|
||||
// removed
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (address(first)))
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (address(first)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (address(first)))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(first)))
|
||||
|
||||
expectTerminated(hello)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ abstract class ClusterMetricsDisabledSpec extends MultiNodeSpec(ClusterMetricsDi
|
|||
"Cluster metrics" must {
|
||||
"not collect metrics, not publish ClusterMetricsChanged, and not gossip metrics" taggedAs LongRunningTest in {
|
||||
awaitClusterUp(roles: _*)
|
||||
clusterView.clusterMetrics.size must be(0)
|
||||
clusterView.clusterMetrics.size should be(0)
|
||||
cluster.subscribe(testActor, classOf[ClusterMetricsChanged])
|
||||
expectMsgType[CurrentClusterState]
|
||||
expectNoMsg
|
||||
clusterView.clusterMetrics.size must be(0)
|
||||
clusterView.clusterMetrics.size should be(0)
|
||||
enterBarrier("after")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ abstract class ClusterMetricsSpec extends MultiNodeSpec(ClusterMetricsMultiJvmSp
|
|||
"and gossip metrics around the node ring" taggedAs LongRunningTest in within(60 seconds) {
|
||||
awaitClusterUp(roles: _*)
|
||||
enterBarrier("cluster-started")
|
||||
awaitAssert(clusterView.members.count(_.status == MemberStatus.Up) must be(roles.size))
|
||||
awaitAssert(clusterView.clusterMetrics.size must be(roles.size))
|
||||
awaitAssert(clusterView.members.count(_.status == MemberStatus.Up) should be(roles.size))
|
||||
awaitAssert(clusterView.clusterMetrics.size should be(roles.size))
|
||||
val collector = MetricsCollector(cluster.system, cluster.settings)
|
||||
collector.sample.metrics.size must be > (3)
|
||||
collector.sample.metrics.size should be > (3)
|
||||
enterBarrier("after")
|
||||
}
|
||||
"reflect the correct number of node metrics in cluster view" taggedAs LongRunningTest in within(30 seconds) {
|
||||
|
|
@ -51,7 +51,7 @@ abstract class ClusterMetricsSpec extends MultiNodeSpec(ClusterMetricsMultiJvmSp
|
|||
enterBarrier("first-left")
|
||||
runOn(second, third, fourth, fifth) {
|
||||
markNodeAsUnavailable(first)
|
||||
awaitAssert(clusterView.clusterMetrics.size must be(roles.size - 1))
|
||||
awaitAssert(clusterView.clusterMetrics.size should be(roles.size - 1))
|
||||
}
|
||||
enterBarrier("finished")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ abstract class ConvergenceSpec(multiNodeConfig: ConvergenceMultiNodeConfig)
|
|||
|
||||
within(28 seconds) {
|
||||
// third becomes unreachable
|
||||
awaitAssert(clusterView.unreachableMembers.size must be(1))
|
||||
awaitAssert(clusterView.unreachableMembers.size should be(1))
|
||||
awaitSeenSameState(first, second)
|
||||
// still one unreachable
|
||||
clusterView.unreachableMembers.size must be(1)
|
||||
clusterView.unreachableMembers.head.address must be(thirdAddress)
|
||||
clusterView.members.size must be(3)
|
||||
clusterView.unreachableMembers.size should be(1)
|
||||
clusterView.unreachableMembers.head.address should be(thirdAddress)
|
||||
clusterView.members.size should be(3)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -95,11 +95,11 @@ abstract class ConvergenceSpec(multiNodeConfig: ConvergenceMultiNodeConfig)
|
|||
|
||||
runOn(first, second, fourth) {
|
||||
for (n ← 1 to 5) {
|
||||
awaitAssert(clusterView.members.size must be(3))
|
||||
awaitAssert(clusterView.members.size should be(3))
|
||||
awaitSeenSameState(first, second, fourth)
|
||||
memberStatus(first) must be(Some(MemberStatus.Up))
|
||||
memberStatus(second) must be(Some(MemberStatus.Up))
|
||||
memberStatus(fourth) must be(None)
|
||||
memberStatus(first) should be(Some(MemberStatus.Up))
|
||||
memberStatus(second) should be(Some(MemberStatus.Up))
|
||||
memberStatus(fourth) should be(None)
|
||||
// wait and then check again
|
||||
Thread.sleep(1.second.dilated.toMillis)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ abstract class DisallowJoinOfTwoClustersSpec
|
|||
|
||||
// no change expected
|
||||
1 to 5 foreach { _ ⇒
|
||||
clusterView.members.size must be(expectedSize)
|
||||
clusterView.members.size should be(expectedSize)
|
||||
Thread.sleep(1000)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ abstract class InitialHeartbeatSpec
|
|||
within(10 seconds) {
|
||||
awaitAssert({
|
||||
cluster.sendCurrentClusterState(testActor)
|
||||
expectMsgType[CurrentClusterState].members.map(_.address) must contain(secondAddress)
|
||||
expectMsgType[CurrentClusterState].members.map(_.address) should contain(secondAddress)
|
||||
}, interval = 50.millis)
|
||||
}
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ abstract class InitialHeartbeatSpec
|
|||
within(10 seconds) {
|
||||
awaitAssert({
|
||||
cluster.sendCurrentClusterState(testActor)
|
||||
expectMsgType[CurrentClusterState].members.map(_.address) must contain(firstAddress)
|
||||
expectMsgType[CurrentClusterState].members.map(_.address) should contain(firstAddress)
|
||||
}, interval = 50.millis)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ abstract class JoinInProgressSpec
|
|||
val until = Deadline.now + 5.seconds
|
||||
while (!until.isOverdue) {
|
||||
Thread.sleep(200)
|
||||
cluster.failureDetector.isAvailable(second) must be(true)
|
||||
cluster.failureDetector.isAvailable(second) should be(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ abstract class LeaderElectionSpec(multiNodeConfig: LeaderElectionMultiNodeConfig
|
|||
awaitClusterUp(first, second, third, fourth)
|
||||
|
||||
if (myself != controller) {
|
||||
clusterView.isLeader must be(myself == sortedRoles.head)
|
||||
clusterView.isLeader should be(myself == sortedRoles.head)
|
||||
assertLeaderIn(sortedRoles)
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ abstract class LeaderElectionSpec(multiNodeConfig: LeaderElectionMultiNodeConfig
|
|||
|
||||
def shutdownLeaderAndVerifyNewLeader(alreadyShutdown: Int): Unit = {
|
||||
val currentRoles = sortedRoles.drop(alreadyShutdown)
|
||||
currentRoles.size must be >= (2)
|
||||
currentRoles.size should be >= (2)
|
||||
val leader = currentRoles.head
|
||||
val aUser = currentRoles.last
|
||||
val remainingRoles = currentRoles.tail
|
||||
|
|
@ -84,13 +84,13 @@ abstract class LeaderElectionSpec(multiNodeConfig: LeaderElectionMultiNodeConfig
|
|||
|
||||
// detect failure
|
||||
markNodeAsUnavailable(leaderAddress)
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(leaderAddress))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(leaderAddress))
|
||||
enterBarrier("after-unavailable" + n)
|
||||
|
||||
// user marks the shutdown leader as DOWN
|
||||
cluster.down(leaderAddress)
|
||||
// removed
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (leaderAddress))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (leaderAddress))
|
||||
enterBarrier("after-down" + n, "completed" + n)
|
||||
|
||||
case _ if remainingRoles.contains(myself) ⇒
|
||||
|
|
@ -98,13 +98,13 @@ abstract class LeaderElectionSpec(multiNodeConfig: LeaderElectionMultiNodeConfig
|
|||
val leaderAddress = address(leader)
|
||||
enterBarrier("before-shutdown" + n, "after-shutdown" + n)
|
||||
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(leaderAddress))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(leaderAddress))
|
||||
enterBarrier("after-unavailable" + n)
|
||||
|
||||
enterBarrier("after-down" + n)
|
||||
awaitMembersUp(currentRoles.size - 1)
|
||||
val nextExpectedLeader = remainingRoles.head
|
||||
clusterView.isLeader must be(myself == nextExpectedLeader)
|
||||
clusterView.isLeader should be(myself == nextExpectedLeader)
|
||||
assertLeaderIn(remainingRoles)
|
||||
|
||||
enterBarrier("completed" + n)
|
||||
|
|
|
|||
|
|
@ -80,13 +80,13 @@ abstract class LeaderLeavingSpec
|
|||
markNodeAsUnavailable(oldLeaderAddress)
|
||||
|
||||
// verify that the LEADER is no longer part of the 'members' set
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (oldLeaderAddress))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (oldLeaderAddress))
|
||||
|
||||
// verify that the LEADER is not part of the 'unreachable' set
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (oldLeaderAddress))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (oldLeaderAddress))
|
||||
|
||||
// verify that we have a new LEADER
|
||||
awaitAssert(clusterView.leader must not be (oldLeaderAddress))
|
||||
awaitAssert(clusterView.leader should not be (oldLeaderAddress))
|
||||
}
|
||||
|
||||
enterBarrier("finished")
|
||||
|
|
|
|||
|
|
@ -44,35 +44,35 @@ abstract class MBeanSpec
|
|||
"Cluster MBean" must {
|
||||
"expose attributes" taggedAs LongRunningTest in {
|
||||
val info = mbeanServer.getMBeanInfo(mbeanName)
|
||||
info.getAttributes.map(_.getName).toSet must be(Set(
|
||||
info.getAttributes.map(_.getName).toSet should be(Set(
|
||||
"ClusterStatus", "Members", "Unreachable", "MemberStatus", "Leader", "Singleton", "Available"))
|
||||
enterBarrier("after-1")
|
||||
}
|
||||
|
||||
"expose operations" taggedAs LongRunningTest in {
|
||||
val info = mbeanServer.getMBeanInfo(mbeanName)
|
||||
info.getOperations.map(_.getName).toSet must be(Set(
|
||||
info.getOperations.map(_.getName).toSet should be(Set(
|
||||
"join", "leave", "down"))
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
||||
"change attributes after startup" taggedAs LongRunningTest in {
|
||||
runOn(first) {
|
||||
mbeanServer.getAttribute(mbeanName, "Available").asInstanceOf[Boolean] must be(false)
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] must be(false)
|
||||
mbeanServer.getAttribute(mbeanName, "Leader") must be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Members") must be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Unreachable") must be("")
|
||||
mbeanServer.getAttribute(mbeanName, "MemberStatus") must be("Removed")
|
||||
mbeanServer.getAttribute(mbeanName, "Available").asInstanceOf[Boolean] should be(false)
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] should be(false)
|
||||
mbeanServer.getAttribute(mbeanName, "Leader") should be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Members") should be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Unreachable") should be("")
|
||||
mbeanServer.getAttribute(mbeanName, "MemberStatus") should be("Removed")
|
||||
}
|
||||
awaitClusterUp(first)
|
||||
runOn(first) {
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "MemberStatus") must be("Up"))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Leader") must be(address(first).toString))
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] must be(true)
|
||||
mbeanServer.getAttribute(mbeanName, "Members") must be(address(first).toString)
|
||||
mbeanServer.getAttribute(mbeanName, "Unreachable") must be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Available").asInstanceOf[Boolean] must be(true)
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "MemberStatus") should be("Up"))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Leader") should be(address(first).toString))
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] should be(true)
|
||||
mbeanServer.getAttribute(mbeanName, "Members") should be(address(first).toString)
|
||||
mbeanServer.getAttribute(mbeanName, "Unreachable") should be("")
|
||||
mbeanServer.getAttribute(mbeanName, "Available").asInstanceOf[Boolean] should be(true)
|
||||
}
|
||||
enterBarrier("after-3")
|
||||
}
|
||||
|
|
@ -85,12 +85,12 @@ abstract class MBeanSpec
|
|||
|
||||
awaitMembersUp(4)
|
||||
assertMembers(clusterView.members, roles.map(address(_)): _*)
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "MemberStatus") must be("Up"))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "MemberStatus") should be("Up"))
|
||||
val expectedMembers = roles.sorted.map(address(_)).mkString(",")
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") must be(expectedMembers))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") should be(expectedMembers))
|
||||
val expectedLeader = address(roleOfLeader())
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Leader") must be(expectedLeader.toString))
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] must be(false)
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Leader") should be(expectedLeader.toString))
|
||||
mbeanServer.getAttribute(mbeanName, "Singleton").asInstanceOf[Boolean] should be(false)
|
||||
|
||||
enterBarrier("after-4")
|
||||
}
|
||||
|
|
@ -104,9 +104,9 @@ abstract class MBeanSpec
|
|||
enterBarrier("fourth-shutdown")
|
||||
|
||||
runOn(first, second, third) {
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Unreachable") must be(fourthAddress.toString))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Unreachable") should be(fourthAddress.toString))
|
||||
val expectedMembers = Seq(first, second, third, fourth).sorted.map(address(_)).mkString(",")
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") must be(expectedMembers))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") should be(expectedMembers))
|
||||
}
|
||||
enterBarrier("fourth-unreachable")
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ abstract class MBeanSpec
|
|||
|
||||
// awaitAssert to make sure that all nodes detects unreachable
|
||||
within(15.seconds) {
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "ClusterStatus") must be(expectedJson))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "ClusterStatus") should be(expectedJson))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ abstract class MBeanSpec
|
|||
runOn(first, second, third) {
|
||||
awaitMembersUp(3, canNotBePartOfMemberRing = Set(fourthAddress))
|
||||
assertMembers(clusterView.members, first, second, third)
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Unreachable") must be(""))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Unreachable") should be(""))
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
@ -184,7 +184,7 @@ abstract class MBeanSpec
|
|||
awaitMembersUp(2)
|
||||
assertMembers(clusterView.members, first, second)
|
||||
val expectedMembers = Seq(first, second).sorted.map(address(_)).mkString(",")
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") must be(expectedMembers))
|
||||
awaitAssert(mbeanServer.getAttribute(mbeanName, "Members") should be(expectedMembers))
|
||||
}
|
||||
runOn(third) {
|
||||
awaitCond(cluster.isTerminated)
|
||||
|
|
|
|||
|
|
@ -94,12 +94,12 @@ abstract class MinMembersBeforeUpBase(multiNodeConfig: MultiNodeConfig)
|
|||
cluster join myself
|
||||
awaitAssert {
|
||||
clusterView.refreshCurrentState()
|
||||
clusterView.status must be(Joining)
|
||||
clusterView.status should be(Joining)
|
||||
}
|
||||
}
|
||||
enterBarrier("first-started")
|
||||
|
||||
onUpLatch.isOpen must be(false)
|
||||
onUpLatch.isOpen should be(false)
|
||||
|
||||
runOn(second) {
|
||||
cluster.join(first)
|
||||
|
|
@ -108,14 +108,14 @@ abstract class MinMembersBeforeUpBase(multiNodeConfig: MultiNodeConfig)
|
|||
val expectedAddresses = Set(first, second) map address
|
||||
awaitAssert {
|
||||
clusterView.refreshCurrentState()
|
||||
clusterView.members.map(_.address) must be(expectedAddresses)
|
||||
clusterView.members.map(_.address) should be(expectedAddresses)
|
||||
}
|
||||
clusterView.members.map(_.status) must be(Set(Joining))
|
||||
clusterView.members.map(_.status) should be(Set(Joining))
|
||||
// and it should not change
|
||||
1 to 5 foreach { _ ⇒
|
||||
Thread.sleep(1000)
|
||||
clusterView.members.map(_.address) must be(expectedAddresses)
|
||||
clusterView.members.map(_.status) must be(Set(Joining))
|
||||
clusterView.members.map(_.address) should be(expectedAddresses)
|
||||
clusterView.members.map(_.status) should be(Set(Joining))
|
||||
}
|
||||
}
|
||||
enterBarrier("second-joined")
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
def startClusterNode(): Unit = {
|
||||
if (clusterView.members.isEmpty) {
|
||||
cluster join myself
|
||||
awaitAssert(clusterView.members.map(_.address) must contain(address(myself)))
|
||||
awaitAssert(clusterView.members.map(_.address) should contain(address(myself)))
|
||||
} else
|
||||
clusterView.self
|
||||
}
|
||||
|
|
@ -239,8 +239,8 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
def assertMembers(gotMembers: Iterable[Member], expectedAddresses: Address*): Unit = {
|
||||
import Member.addressOrdering
|
||||
val members = gotMembers.toIndexedSeq
|
||||
members.size must be(expectedAddresses.length)
|
||||
expectedAddresses.sorted.zipWithIndex.foreach { case (a, i) ⇒ members(i).address must be(a) }
|
||||
members.size should be(expectedAddresses.length)
|
||||
expectedAddresses.sorted.zipWithIndex.foreach { case (a, i) ⇒ members(i).address should be(a) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -266,13 +266,13 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
*/
|
||||
def assertLeaderIn(nodesInCluster: immutable.Seq[RoleName]): Unit =
|
||||
if (nodesInCluster.contains(myself)) {
|
||||
nodesInCluster.length must not be (0)
|
||||
nodesInCluster.length should not be (0)
|
||||
val expectedLeader = roleOfLeader(nodesInCluster)
|
||||
val leader = clusterView.leader
|
||||
val isLeader = leader == Some(clusterView.selfAddress)
|
||||
assert(isLeader == isNode(expectedLeader),
|
||||
"expectedLeader [%s], got leader [%s], members [%s]".format(expectedLeader, leader, clusterView.members))
|
||||
clusterView.status must (be(MemberStatus.Up) or be(MemberStatus.Leaving))
|
||||
clusterView.status should (be(MemberStatus.Up) or be(MemberStatus.Leaving))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -285,23 +285,23 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
timeout: FiniteDuration = 25.seconds): Unit = {
|
||||
within(timeout) {
|
||||
if (!canNotBePartOfMemberRing.isEmpty) // don't run this on an empty set
|
||||
awaitAssert(canNotBePartOfMemberRing foreach (a ⇒ clusterView.members.map(_.address) must not contain (a)))
|
||||
awaitAssert(clusterView.members.size must be(numberOfMembers))
|
||||
awaitAssert(clusterView.members.map(_.status) must be(Set(MemberStatus.Up)))
|
||||
awaitAssert(canNotBePartOfMemberRing foreach (a ⇒ clusterView.members.map(_.address) should not contain (a)))
|
||||
awaitAssert(clusterView.members.size should be(numberOfMembers))
|
||||
awaitAssert(clusterView.members.map(_.status) should be(Set(MemberStatus.Up)))
|
||||
// clusterView.leader is updated by LeaderChanged, await that to be updated also
|
||||
val expectedLeader = clusterView.members.headOption.map(_.address)
|
||||
awaitAssert(clusterView.leader must be(expectedLeader))
|
||||
awaitAssert(clusterView.leader should be(expectedLeader))
|
||||
}
|
||||
}
|
||||
|
||||
def awaitAllReachable(): Unit =
|
||||
awaitAssert(clusterView.unreachableMembers must be(Set.empty))
|
||||
awaitAssert(clusterView.unreachableMembers should be(Set.empty))
|
||||
|
||||
/**
|
||||
* Wait until the specified nodes have seen the same gossip overview.
|
||||
*/
|
||||
def awaitSeenSameState(addresses: Address*): Unit =
|
||||
awaitAssert((addresses.toSet -- clusterView.seenBy) must be(Set.empty))
|
||||
awaitAssert((addresses.toSet -- clusterView.seenBy) should be(Set.empty))
|
||||
|
||||
/**
|
||||
* Leader according to the address ordering of the roles.
|
||||
|
|
@ -312,7 +312,7 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
* be determined from the `RoleName`.
|
||||
*/
|
||||
def roleOfLeader(nodesInCluster: immutable.Seq[RoleName] = roles): RoleName = {
|
||||
nodesInCluster.length must not be (0)
|
||||
nodesInCluster.length should not be (0)
|
||||
nodesInCluster.sorted.head
|
||||
}
|
||||
|
||||
|
|
@ -341,7 +341,7 @@ trait MultiNodeClusterSpec extends Suite with STMultiNodeSpec with WatchedByCoro
|
|||
*/
|
||||
def markNodeAsUnavailable(address: Address): Unit = {
|
||||
if (isFailureDetectorPuppet) {
|
||||
// before marking it as unavailble there must be at least one heartbeat
|
||||
// before marking it as unavailble there should be at least one heartbeat
|
||||
// to create the FailureDetectorPuppet in the FailureDetectorRegistry
|
||||
cluster.failureDetector.heartbeat(address)
|
||||
failureDetectorPuppet(address) foreach (_.markNodeAsUnavailable())
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ abstract class NodeLeavingAndExitingAndBeingRemovedSpec
|
|||
markNodeAsUnavailable(second)
|
||||
// verify that the 'second' node is no longer part of the 'members'/'unreachable' set
|
||||
awaitAssert {
|
||||
clusterView.members.map(_.address) must not contain (address(second))
|
||||
clusterView.members.map(_.address) should not contain (address(second))
|
||||
}
|
||||
awaitAssert {
|
||||
clusterView.unreachableMembers.map(_.address) must not contain (address(second))
|
||||
clusterView.unreachableMembers.map(_.address) should not contain (address(second))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ abstract class NodeMembershipSpec
|
|||
|
||||
runOn(first, second) {
|
||||
cluster.join(first)
|
||||
awaitAssert(clusterView.members.size must be(2))
|
||||
awaitAssert(clusterView.members.size should be(2))
|
||||
assertMembers(clusterView.members, first, second)
|
||||
awaitAssert(clusterView.members.map(_.status) must be(Set(MemberStatus.Up)))
|
||||
awaitAssert(clusterView.members.map(_.status) should be(Set(MemberStatus.Up)))
|
||||
}
|
||||
|
||||
enterBarrier("after-1")
|
||||
|
|
@ -52,9 +52,9 @@ abstract class NodeMembershipSpec
|
|||
cluster.join(first)
|
||||
}
|
||||
|
||||
awaitAssert(clusterView.members.size must be(3))
|
||||
awaitAssert(clusterView.members.size should be(3))
|
||||
assertMembers(clusterView.members, first, second, third)
|
||||
awaitAssert(clusterView.members.map(_.status) must be(Set(MemberStatus.Up)))
|
||||
awaitAssert(clusterView.members.map(_.status) should be(Set(MemberStatus.Up)))
|
||||
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
|
@ -63,10 +63,10 @@ abstract class NodeMembershipSpec
|
|||
val firstMember = clusterView.members.find(_.address == address(first)).get
|
||||
val secondMember = clusterView.members.find(_.address == address(second)).get
|
||||
val thirdMember = clusterView.members.find(_.address == address(third)).get
|
||||
firstMember.isOlderThan(thirdMember) must be(true)
|
||||
thirdMember.isOlderThan(firstMember) must be(false)
|
||||
secondMember.isOlderThan(thirdMember) must be(true)
|
||||
thirdMember.isOlderThan(secondMember) must be(false)
|
||||
firstMember.isOlderThan(thirdMember) should be(true)
|
||||
thirdMember.isOlderThan(firstMember) should be(false)
|
||||
secondMember.isOlderThan(thirdMember) should be(true)
|
||||
thirdMember.isOlderThan(secondMember) should be(false)
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ abstract class NodeUpSpec
|
|||
enterBarrier("first-join-attempt")
|
||||
|
||||
Thread.sleep(2000)
|
||||
clusterView.members must be(Set.empty)
|
||||
clusterView.members should be(Set.empty)
|
||||
|
||||
enterBarrier("after-0")
|
||||
}
|
||||
|
|
@ -70,8 +70,8 @@ abstract class NodeUpSpec
|
|||
// let it run for a while to make sure that nothing bad happens
|
||||
for (n ← 1 to 20) {
|
||||
Thread.sleep(100.millis.dilated.toMillis)
|
||||
unexpected.get must be(SortedSet.empty)
|
||||
clusterView.members.forall(_.status == MemberStatus.Up) must be(true)
|
||||
unexpected.get should be(SortedSet.empty)
|
||||
clusterView.members.forall(_.status == MemberStatus.Up) should be(true)
|
||||
}
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ abstract class RestartFirstSeedNodeSpec
|
|||
// now we can join seed1System, seed2, seed3 together
|
||||
runOn(seed1) {
|
||||
Cluster(seed1System).joinSeedNodes(seedNodes)
|
||||
awaitAssert(Cluster(seed1System).readView.members.size must be(3))
|
||||
awaitAssert(Cluster(seed1System).readView.members.map(_.status) must be(Set(Up)))
|
||||
awaitAssert(Cluster(seed1System).readView.members.size should be(3))
|
||||
awaitAssert(Cluster(seed1System).readView.members.map(_.status) should be(Set(Up)))
|
||||
}
|
||||
runOn(seed2, seed3) {
|
||||
cluster.joinSeedNodes(seedNodes)
|
||||
|
|
@ -104,15 +104,15 @@ abstract class RestartFirstSeedNodeSpec
|
|||
}
|
||||
runOn(seed2, seed3) {
|
||||
awaitMembersUp(2, canNotBePartOfMemberRing = Set(seedNodes.head))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must not contain (seedNodes.head))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should not contain (seedNodes.head))
|
||||
}
|
||||
enterBarrier("seed1-shutdown")
|
||||
|
||||
// then start restartedSeed1System, which has the same address as seed1System
|
||||
runOn(seed1) {
|
||||
Cluster(restartedSeed1System).joinSeedNodes(seedNodes)
|
||||
awaitAssert(Cluster(restartedSeed1System).readView.members.size must be(3))
|
||||
awaitAssert(Cluster(restartedSeed1System).readView.members.map(_.status) must be(Set(Up)))
|
||||
awaitAssert(Cluster(restartedSeed1System).readView.members.size should be(3))
|
||||
awaitAssert(Cluster(restartedSeed1System).readView.members.map(_.status) should be(Set(Up)))
|
||||
}
|
||||
runOn(seed2, seed3) {
|
||||
awaitMembersUp(3)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ abstract class SingletonClusterSpec(multiNodeConfig: SingletonClusterMultiNodeCo
|
|||
runOn(first) {
|
||||
cluster.joinSeedNodes(Vector(first))
|
||||
awaitMembersUp(1)
|
||||
clusterView.isSingletonCluster must be(true)
|
||||
clusterView.isSingletonCluster should be(true)
|
||||
}
|
||||
|
||||
enterBarrier("after-1")
|
||||
|
|
@ -55,7 +55,7 @@ abstract class SingletonClusterSpec(multiNodeConfig: SingletonClusterMultiNodeCo
|
|||
|
||||
"not be singleton cluster when joined with other node" taggedAs LongRunningTest in {
|
||||
awaitClusterUp(first, second)
|
||||
clusterView.isSingletonCluster must be(false)
|
||||
clusterView.isSingletonCluster should be(false)
|
||||
assertLeader(first, second)
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
@ -69,7 +69,7 @@ abstract class SingletonClusterSpec(multiNodeConfig: SingletonClusterMultiNodeCo
|
|||
markNodeAsUnavailable(secondAddress)
|
||||
|
||||
awaitMembersUp(numberOfMembers = 1, canNotBePartOfMemberRing = Set(secondAddress), 30.seconds)
|
||||
clusterView.isSingletonCluster must be(true)
|
||||
clusterView.isSingletonCluster should be(true)
|
||||
awaitCond(clusterView.isLeader)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
|
|||
val totalNumberOfNodes =
|
||||
System.getProperty("MultiJvm.akka.cluster.Stress.nrOfNodes") match {
|
||||
case null ⇒ 13
|
||||
case value ⇒ value.toInt requiring (_ >= 10, "nrOfNodes must be >= 10")
|
||||
case value ⇒ value.toInt requiring (_ >= 10, "nrOfNodes should be >= 10")
|
||||
}
|
||||
|
||||
for (n ← 1 to totalNumberOfNodes) role("node-" + n)
|
||||
|
|
@ -182,7 +182,7 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
|
|||
val numberOfNodesJoiningToSeedNodes = (totalNumberOfNodes - numberOfSeedNodes -
|
||||
numberOfNodesJoiningToSeedNodesInitially - numberOfNodesJoiningOneByOneSmall -
|
||||
numberOfNodesJoiningOneByOneLarge - numberOfNodesJoiningToOneNode) requiring (_ >= 0,
|
||||
s"too many configured nr-of-nodes-joining-*, total must be <= ${totalNumberOfNodes}")
|
||||
s"too many configured nr-of-nodes-joining-*, total should be <= ${totalNumberOfNodes}")
|
||||
val numberOfNodesLeavingOneByOneSmall = getInt("nr-of-nodes-leaving-one-by-one-small") * nFactor
|
||||
val numberOfNodesLeavingOneByOneLarge = getInt("nr-of-nodes-leaving-one-by-one-large") * nFactor
|
||||
val numberOfNodesLeaving = getInt("nr-of-nodes-leaving") * nFactor
|
||||
|
|
@ -217,7 +217,7 @@ private[cluster] object StressMultiJvmSpec extends MultiNodeConfig {
|
|||
numberOfNodesShutdownOneByOneSmall + numberOfNodesShutdownOneByOneLarge + numberOfNodesShutdown <= totalNumberOfNodes - 3,
|
||||
s"specified number of leaving/shutdown nodes <= ${totalNumberOfNodes - 3}")
|
||||
|
||||
require(numberOfNodesJoinRemove <= totalNumberOfNodes, s"nr-of-nodes-join-remove must be <= ${totalNumberOfNodes}")
|
||||
require(numberOfNodesJoinRemove <= totalNumberOfNodes, s"nr-of-nodes-join-remove should be <= ${totalNumberOfNodes}")
|
||||
|
||||
override def toString: String = {
|
||||
testConfig.withFallback(ConfigFactory.parseString(s"nrOfNodes=${totalNumberOfNodes}")).root.render
|
||||
|
|
@ -984,7 +984,7 @@ abstract class StressSpec
|
|||
}
|
||||
val nextAddresses = clusterView.members.map(_.address) -- usedAddresses
|
||||
runOn(usedRoles: _*) {
|
||||
nextAddresses.size must be(numberOfNodesJoinRemove)
|
||||
nextAddresses.size should be(numberOfNodesJoinRemove)
|
||||
}
|
||||
|
||||
enterBarrier("join-remove-" + step)
|
||||
|
|
@ -1021,7 +1021,7 @@ abstract class StressSpec
|
|||
def exerciseRouters(title: String, duration: FiniteDuration, batchInterval: FiniteDuration,
|
||||
expectDroppedMessages: Boolean, tree: Boolean): Unit =
|
||||
within(duration + 10.seconds) {
|
||||
nbrUsedRoles must be(totalNumberOfNodes)
|
||||
nbrUsedRoles should be(totalNumberOfNodes)
|
||||
createResultAggregator(title, expectedResults = nbrUsedRoles, includeInHistory = false)
|
||||
|
||||
val (masterRoles, otherRoles) = roles.take(nbrUsedRoles).splitAt(3)
|
||||
|
|
@ -1035,10 +1035,10 @@ abstract class StressSpec
|
|||
m.tell(End, testActor)
|
||||
}
|
||||
val workResult = awaitWorkResult
|
||||
workResult.sendCount must be > (0L)
|
||||
workResult.ackCount must be > (0L)
|
||||
workResult.sendCount should be > (0L)
|
||||
workResult.ackCount should be > (0L)
|
||||
if (!expectDroppedMessages)
|
||||
workResult.retryCount must be(0)
|
||||
workResult.retryCount should be(0)
|
||||
|
||||
enterBarrier("routers-done-" + step)
|
||||
}
|
||||
|
|
@ -1081,13 +1081,13 @@ abstract class StressSpec
|
|||
supervisor ! Props[RemoteChild].withDeploy(Deploy(scope = RemoteScope(address(r))))
|
||||
}
|
||||
supervisor ! GetChildrenCount
|
||||
expectMsgType[ChildrenCount] must be(ChildrenCount(nbrUsedRoles, 0))
|
||||
expectMsgType[ChildrenCount] should be(ChildrenCount(nbrUsedRoles, 0))
|
||||
|
||||
1 to 5 foreach { _ ⇒ supervisor ! new RuntimeException("Simulated exception") }
|
||||
awaitAssert {
|
||||
supervisor ! GetChildrenCount
|
||||
val c = expectMsgType[ChildrenCount]
|
||||
c must be(ChildrenCount(nbrUsedRoles, 5 * nbrUsedRoles))
|
||||
c should be(ChildrenCount(nbrUsedRoles, 5 * nbrUsedRoles))
|
||||
}
|
||||
|
||||
// after 5 restart attempts the children should be stopped
|
||||
|
|
@ -1096,7 +1096,7 @@ abstract class StressSpec
|
|||
supervisor ! GetChildrenCount
|
||||
val c = expectMsgType[ChildrenCount]
|
||||
// zero children
|
||||
c must be(ChildrenCount(0, 6 * nbrUsedRoles))
|
||||
c should be(ChildrenCount(0, 6 * nbrUsedRoles))
|
||||
}
|
||||
supervisor ! Reset
|
||||
|
||||
|
|
@ -1118,9 +1118,9 @@ abstract class StressSpec
|
|||
def idleGossip(title: String): Unit = {
|
||||
createResultAggregator(title, expectedResults = nbrUsedRoles, includeInHistory = true)
|
||||
reportResult {
|
||||
clusterView.members.size must be(nbrUsedRoles)
|
||||
clusterView.members.size should be(nbrUsedRoles)
|
||||
Thread.sleep(idleGossipDuration.toMillis)
|
||||
clusterView.members.size must be(nbrUsedRoles)
|
||||
clusterView.members.size should be(nbrUsedRoles)
|
||||
}
|
||||
awaitClusterResult()
|
||||
}
|
||||
|
|
@ -1192,12 +1192,12 @@ abstract class StressSpec
|
|||
if (exerciseActors) {
|
||||
runOn(roles.take(3): _*) {
|
||||
val m = master
|
||||
m must not be (None)
|
||||
m should not be (None)
|
||||
m.get.tell(End, testActor)
|
||||
val workResult = awaitWorkResult
|
||||
workResult.retryCount must be(0)
|
||||
workResult.sendCount must be > (0L)
|
||||
workResult.ackCount must be > (0L)
|
||||
workResult.retryCount should be(0)
|
||||
workResult.sendCount should be > (0L)
|
||||
workResult.ackCount should be > (0L)
|
||||
}
|
||||
}
|
||||
enterBarrier("after-" + step)
|
||||
|
|
@ -1298,11 +1298,11 @@ abstract class StressSpec
|
|||
if (exerciseActors) {
|
||||
runOn(roles.take(3): _*) {
|
||||
val m = master
|
||||
m must not be (None)
|
||||
m should not be (None)
|
||||
m.get.tell(End, testActor)
|
||||
val workResult = awaitWorkResult
|
||||
workResult.sendCount must be > (0L)
|
||||
workResult.ackCount must be > (0L)
|
||||
workResult.sendCount should be > (0L)
|
||||
workResult.ackCount should be > (0L)
|
||||
}
|
||||
}
|
||||
enterBarrier("after-" + step)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ abstract class SunnyWeatherSpec
|
|||
|
||||
for (n ← 1 to 30) {
|
||||
enterBarrier("period-" + n)
|
||||
unexpected.get must be(SortedSet.empty)
|
||||
unexpected.get should be(SortedSet.empty)
|
||||
awaitMembersUp(roles.size)
|
||||
assertLeaderIn(roles)
|
||||
if (n % 5 == 0) log.debug("Passed period [{}]", n)
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
|
||||
def assertUnreachable(subjects: RoleName*): Unit = {
|
||||
val expected = subjects.toSet map address
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must be(expected))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should be(expected))
|
||||
}
|
||||
|
||||
"A network partition tolerant cluster" must {
|
||||
|
|
@ -236,7 +236,7 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
val child = expectMsgType[ActorRef]
|
||||
child ! "hello"
|
||||
expectMsg("hello")
|
||||
lastSender.path.address must be(address(third))
|
||||
lastSender.path.address should be(address(third))
|
||||
}
|
||||
}
|
||||
runOn(third) {
|
||||
|
|
@ -257,7 +257,7 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
runOn(third) {
|
||||
// undelivered system messages in RemoteChild on third should trigger QuarantinedEvent
|
||||
within(10.seconds) {
|
||||
expectMsgType[QuarantinedEvent].address must be(address(second))
|
||||
expectMsgType[QuarantinedEvent].address should be(address(second))
|
||||
}
|
||||
system.eventStream.unsubscribe(testActor, classOf[QuarantinedEvent])
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
|
||||
runOn(others: _*) {
|
||||
// second should be removed because of quarantine
|
||||
awaitAssert(clusterView.members.map(_.address) must not contain (address(second)))
|
||||
awaitAssert(clusterView.members.map(_.address) should not contain (address(second)))
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
@ -302,8 +302,8 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
runOn(side1AfterJoin: _*) {
|
||||
// side2 removed
|
||||
val expected = (side1AfterJoin map address).toSet
|
||||
awaitAssert(clusterView.members.map(_.address) must be(expected))
|
||||
awaitAssert(clusterView.members.collectFirst { case m if m.address == address(eighth) ⇒ m.status } must be(
|
||||
awaitAssert(clusterView.members.map(_.address) should be(expected))
|
||||
awaitAssert(clusterView.members.collectFirst { case m if m.address == address(eighth) ⇒ m.status } should be(
|
||||
Some(MemberStatus.Up)))
|
||||
}
|
||||
|
||||
|
|
@ -321,12 +321,12 @@ abstract class SurviveNetworkInstabilitySpec
|
|||
|
||||
runOn(side1AfterJoin: _*) {
|
||||
val expected = (side1AfterJoin map address).toSet
|
||||
clusterView.members.map(_.address) must be(expected)
|
||||
clusterView.members.map(_.address) should be(expected)
|
||||
}
|
||||
|
||||
runOn(side2: _*) {
|
||||
val expected = ((side2 ++ side1) map address).toSet
|
||||
clusterView.members.map(_.address) must be(expected)
|
||||
clusterView.members.map(_.address) should be(expected)
|
||||
assertUnreachable(side1: _*)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,17 +59,17 @@ abstract class TransitionSpec
|
|||
def seenLatestGossip: Set[RoleName] = clusterView.seenBy flatMap roleName
|
||||
|
||||
def awaitSeen(addresses: Address*): Unit = awaitAssert {
|
||||
(seenLatestGossip map address) must be(addresses.toSet)
|
||||
(seenLatestGossip map address) should be(addresses.toSet)
|
||||
}
|
||||
|
||||
def awaitMembers(addresses: Address*): Unit = awaitAssert {
|
||||
clusterView.refreshCurrentState()
|
||||
memberAddresses must be(addresses.toSet)
|
||||
memberAddresses should be(addresses.toSet)
|
||||
}
|
||||
|
||||
def awaitMemberStatus(address: Address, status: MemberStatus): Unit = awaitAssert {
|
||||
clusterView.refreshCurrentState()
|
||||
memberStatus(address) must be(status)
|
||||
memberStatus(address) should be(status)
|
||||
}
|
||||
|
||||
def leaderActions(): Unit =
|
||||
|
|
@ -134,7 +134,7 @@ abstract class TransitionSpec
|
|||
awaitMembers(first, second)
|
||||
awaitMemberStatus(first, Up)
|
||||
awaitMemberStatus(second, Joining)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second)))
|
||||
}
|
||||
enterBarrier("convergence-joining-2")
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ abstract class TransitionSpec
|
|||
runOn(first, second) {
|
||||
// gossip chat will synchronize the views
|
||||
awaitMemberStatus(second, Up)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second)))
|
||||
awaitMemberStatus(first, Up)
|
||||
}
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ abstract class TransitionSpec
|
|||
}
|
||||
runOn(second, third) {
|
||||
// gossip chat from the join will synchronize the views
|
||||
awaitAssert(seenLatestGossip must be(Set(second, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(second, third)))
|
||||
}
|
||||
enterBarrier("third-joined-second")
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ abstract class TransitionSpec
|
|||
awaitMembers(first, second, third)
|
||||
awaitMemberStatus(third, Joining)
|
||||
awaitMemberStatus(second, Up)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second, third)))
|
||||
}
|
||||
|
||||
first gossipTo third
|
||||
|
|
@ -182,7 +182,7 @@ abstract class TransitionSpec
|
|||
awaitMemberStatus(first, Up)
|
||||
awaitMemberStatus(second, Up)
|
||||
awaitMemberStatus(third, Joining)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second, third)))
|
||||
}
|
||||
|
||||
enterBarrier("convergence-joining-3")
|
||||
|
|
@ -201,7 +201,7 @@ abstract class TransitionSpec
|
|||
leader12 gossipTo other1
|
||||
runOn(other1) {
|
||||
awaitMemberStatus(third, Up)
|
||||
awaitAssert(seenLatestGossip must be(Set(leader12, myself)))
|
||||
awaitAssert(seenLatestGossip should be(Set(leader12, myself)))
|
||||
}
|
||||
|
||||
// first non-leader gossipTo the other non-leader
|
||||
|
|
@ -212,7 +212,7 @@ abstract class TransitionSpec
|
|||
}
|
||||
runOn(other2) {
|
||||
awaitMemberStatus(third, Up)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second, third)))
|
||||
}
|
||||
|
||||
// first non-leader gossipTo the leader
|
||||
|
|
@ -221,7 +221,7 @@ abstract class TransitionSpec
|
|||
awaitMemberStatus(first, Up)
|
||||
awaitMemberStatus(second, Up)
|
||||
awaitMemberStatus(third, Up)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, second, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, second, third)))
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -231,8 +231,8 @@ abstract class TransitionSpec
|
|||
runOn(third) {
|
||||
markNodeAsUnavailable(second)
|
||||
reapUnreachable()
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(second)))
|
||||
awaitAssert(seenLatestGossip must be(Set(third)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
||||
awaitAssert(seenLatestGossip should be(Set(third)))
|
||||
}
|
||||
|
||||
enterBarrier("after-second-unavailble")
|
||||
|
|
@ -240,7 +240,7 @@ abstract class TransitionSpec
|
|||
third gossipTo first
|
||||
|
||||
runOn(first, third) {
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(second)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
||||
}
|
||||
|
||||
runOn(first) {
|
||||
|
|
@ -252,9 +252,9 @@ abstract class TransitionSpec
|
|||
first gossipTo third
|
||||
|
||||
runOn(first, third) {
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) must contain(address(second)))
|
||||
awaitAssert(clusterView.unreachableMembers.map(_.address) should contain(address(second)))
|
||||
awaitMemberStatus(second, Down)
|
||||
awaitAssert(seenLatestGossip must be(Set(first, third)))
|
||||
awaitAssert(seenLatestGossip should be(Set(first, third)))
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ abstract class UnreachableNodeJoinsAgainSpec
|
|||
// victim becomes all alone
|
||||
awaitAssert {
|
||||
val members = clusterView.members
|
||||
clusterView.unreachableMembers.size must be(roles.size - 1)
|
||||
clusterView.unreachableMembers.size should be(roles.size - 1)
|
||||
}
|
||||
clusterView.unreachableMembers.map(_.address) must be((allButVictim map address).toSet)
|
||||
clusterView.unreachableMembers.map(_.address) should be((allButVictim map address).toSet)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,13 +102,13 @@ abstract class UnreachableNodeJoinsAgainSpec
|
|||
// victim becomes unreachable
|
||||
awaitAssert {
|
||||
val members = clusterView.members
|
||||
clusterView.unreachableMembers.size must be(1)
|
||||
clusterView.unreachableMembers.size should be(1)
|
||||
}
|
||||
awaitSeenSameState(allButVictim map address: _*)
|
||||
// still one unreachable
|
||||
clusterView.unreachableMembers.size must be(1)
|
||||
clusterView.unreachableMembers.head.address must be(node(victim).address)
|
||||
clusterView.unreachableMembers.head.status must be(MemberStatus.Up)
|
||||
clusterView.unreachableMembers.size should be(1)
|
||||
clusterView.unreachableMembers.head.address should be(node(victim).address)
|
||||
clusterView.unreachableMembers.head.status should be(MemberStatus.Up)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -124,8 +124,8 @@ abstract class UnreachableNodeJoinsAgainSpec
|
|||
runOn(allButVictim: _*) {
|
||||
// eventually removed
|
||||
awaitMembersUp(roles.size - 1, Set(victim))
|
||||
awaitAssert(clusterView.unreachableMembers must be(Set.empty), 15 seconds)
|
||||
awaitAssert(clusterView.members.map(_.address) must be((allButVictim map address).toSet))
|
||||
awaitAssert(clusterView.unreachableMembers should be(Set.empty), 15 seconds)
|
||||
awaitAssert(clusterView.members.map(_.address) should be((allButVictim map address).toSet))
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -171,9 +171,9 @@ abstract class UnreachableNodeJoinsAgainSpec
|
|||
try {
|
||||
Cluster(freshSystem).join(masterAddress)
|
||||
within(15 seconds) {
|
||||
awaitAssert(Cluster(freshSystem).readView.members.map(_.address) must contain(victimAddress))
|
||||
awaitAssert(Cluster(freshSystem).readView.members.size must be(expectedNumberOfMembers))
|
||||
awaitAssert(Cluster(freshSystem).readView.members.map(_.status) must be(Set(MemberStatus.Up)))
|
||||
awaitAssert(Cluster(freshSystem).readView.members.map(_.address) should contain(victimAddress))
|
||||
awaitAssert(Cluster(freshSystem).readView.members.size should be(expectedNumberOfMembers))
|
||||
awaitAssert(Cluster(freshSystem).readView.members.map(_.status) should be(Set(MemberStatus.Up)))
|
||||
}
|
||||
|
||||
// signal to master node that victim is done
|
||||
|
|
|
|||
|
|
@ -118,8 +118,8 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
local = AdaptiveLoadBalancingRouter(HeapMetricsSelector),
|
||||
settings = ClusterRouterSettings(totalInstances = 10, maxInstancesPerNode = 1, useRole = None))), name)
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router).size must be(roles.size) }
|
||||
currentRoutees(router).map(fullAddress).toSet must be(roles.map(address).toSet)
|
||||
awaitAssert { currentRoutees(router).size should be(roles.size) }
|
||||
currentRoutees(router).map(fullAddress).toSet should be(roles.map(address).toSet)
|
||||
router
|
||||
}
|
||||
|
||||
|
|
@ -145,10 +145,10 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
|
||||
val replies = receiveReplies(iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be > (0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -180,8 +180,8 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
|
||||
val replies = receiveReplies(iterationCount)
|
||||
|
||||
replies(third) must be > (replies(second))
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(third) should be > (replies(second))
|
||||
replies.values.sum should be(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -192,8 +192,8 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
runOn(first) {
|
||||
val router3 = system.actorOf(Props[Memory].withRouter(FromConfig()), "router3")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router3).size must be(9) }
|
||||
currentRoutees(router3).map(fullAddress).toSet must be(Set(address(first)))
|
||||
awaitAssert { currentRoutees(router3).size should be(9) }
|
||||
currentRoutees(router3).map(fullAddress).toSet should be(Set(address(first)))
|
||||
}
|
||||
enterBarrier("after-4")
|
||||
}
|
||||
|
|
@ -202,8 +202,8 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
runOn(first) {
|
||||
val router4 = system.actorOf(Props[Memory].withRouter(FromConfig()), "router4")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router4).size must be(6) }
|
||||
currentRoutees(router4).map(fullAddress).toSet must be(Set(
|
||||
awaitAssert { currentRoutees(router4).size should be(6) }
|
||||
currentRoutees(router4).map(fullAddress).toSet should be(Set(
|
||||
address(first), address(second), address(third)))
|
||||
}
|
||||
enterBarrier("after-5")
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
"create routees from configuration" in {
|
||||
runOn(first) {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router1).size must be(4) }
|
||||
currentRoutees(router1).map(fullAddress).toSet must be(Set(address(first), address(second)))
|
||||
awaitAssert { currentRoutees(router1).size should be(4) }
|
||||
currentRoutees(router1).map(fullAddress).toSet should be(Set(address(first), address(second)))
|
||||
}
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
|
@ -111,8 +111,8 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
|
||||
runOn(first) {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router1).size must be(6) }
|
||||
currentRoutees(router1).map(fullAddress).toSet must be(roles.map(address).toSet)
|
||||
awaitAssert { currentRoutees(router1).size should be(6) }
|
||||
currentRoutees(router1).map(fullAddress).toSet should be(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -123,8 +123,8 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
val router2 = system.actorOf(Props[Echo].withRouter(ClusterRouterConfig(local = ConsistentHashingRouter(),
|
||||
settings = ClusterRouterSettings(totalInstances = 10, maxInstancesPerNode = 2, useRole = None))), "router2")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router2).size must be(6) }
|
||||
currentRoutees(router2).map(fullAddress).toSet must be(roles.map(address).toSet)
|
||||
awaitAssert { currentRoutees(router2).size should be(6) }
|
||||
currentRoutees(router2).map(fullAddress).toSet should be(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -162,8 +162,8 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
|
||||
def assertHashMapping(router: ActorRef): Unit = {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router).size must be(6) }
|
||||
currentRoutees(router).map(fullAddress).toSet must be(roles.map(address).toSet)
|
||||
awaitAssert { currentRoutees(router).size should be(6) }
|
||||
currentRoutees(router).map(fullAddress).toSet should be(roles.map(address).toSet)
|
||||
|
||||
router ! "a"
|
||||
val destinationA = expectMsgType[ActorRef]
|
||||
|
|
|
|||
|
|
@ -138,10 +138,10 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
"deploy routees to the member nodes in the cluster" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
router1.isInstanceOf[RoutedActorRef] must be(true)
|
||||
router1.isInstanceOf[RoutedActorRef] should be(true)
|
||||
|
||||
// max-nr-of-instances-per-node=2 times 2 nodes
|
||||
awaitAssert(currentRoutees(router1).size must be(4))
|
||||
awaitAssert(currentRoutees(router1).size should be(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -150,11 +150,11 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(DeployRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
@ -169,7 +169,7 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
runOn(first) {
|
||||
// 2 nodes, 1 routee on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(2))
|
||||
awaitAssert(currentRoutees(router4).size should be(2))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -178,11 +178,11 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(LookupRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -195,7 +195,7 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=2 times 4 nodes
|
||||
awaitAssert(currentRoutees(router1).size must be(8))
|
||||
awaitAssert(currentRoutees(router1).size should be(8))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -204,8 +204,8 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(DeployRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ must be > (0) }
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -217,7 +217,7 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 1 routee on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(4))
|
||||
awaitAssert(currentRoutees(router4).size should be(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -226,8 +226,8 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(LookupRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ must be > (0) }
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-5")
|
||||
|
|
@ -237,7 +237,7 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=1 times 3 nodes
|
||||
awaitAssert(currentRoutees(router3).size must be(3))
|
||||
awaitAssert(currentRoutees(router3).size should be(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -246,11 +246,11 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(DeployRoutee, iterationCount)
|
||||
|
||||
replies(first) must be(0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be > (0)
|
||||
replies(fourth) must be > (0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be(0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies(fourth) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
@ -259,7 +259,7 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
"deploy routees to specified node role" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
awaitAssert(currentRoutees(router5).size must be(2))
|
||||
awaitAssert(currentRoutees(router5).size should be(2))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -268,11 +268,11 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(DeployRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-7")
|
||||
|
|
@ -281,10 +281,10 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
"deploy programatically defined routees to the member nodes in the cluster" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
router2.isInstanceOf[RoutedActorRef] must be(true)
|
||||
router2.isInstanceOf[RoutedActorRef] should be(true)
|
||||
|
||||
// totalInstances = 3, maxInstancesPerNode = 1
|
||||
awaitAssert(currentRoutees(router2).size must be(3))
|
||||
awaitAssert(currentRoutees(router2).size should be(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -297,8 +297,8 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
val routees = currentRoutees(router2)
|
||||
val routeeAddresses = routees map fullAddress
|
||||
|
||||
routeeAddresses.size must be(3)
|
||||
replies.values.sum must be(iterationCount)
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-8")
|
||||
|
|
@ -313,16 +313,16 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 1 routee on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(4))
|
||||
awaitAssert(currentRoutees(router4).size should be(4))
|
||||
|
||||
testConductor.blackhole(first, second, Direction.Both).await
|
||||
|
||||
awaitAssert(routees.size must be(3))
|
||||
routeeAddresses must not contain (address(second))
|
||||
awaitAssert(routees.size should be(3))
|
||||
routeeAddresses should not contain (address(second))
|
||||
|
||||
testConductor.passThrough(first, second, Direction.Both).await
|
||||
awaitAssert(routees.size must be(4))
|
||||
routeeAddresses must contain(address(second))
|
||||
awaitAssert(routees.size should be(4))
|
||||
routeeAddresses should contain(address(second))
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -342,10 +342,10 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
val downRoutee = routees.find(_.path.address == downAddress).get
|
||||
|
||||
cluster.down(downAddress)
|
||||
expectMsgType[Terminated](15.seconds).actor must be(downRoutee)
|
||||
expectMsgType[Terminated](15.seconds).actor should be(downRoutee)
|
||||
awaitAssert {
|
||||
routeeAddresses must contain(notUsedAddress)
|
||||
routeeAddresses must not contain (downAddress)
|
||||
routeeAddresses should contain(notUsedAddress)
|
||||
routeeAddresses should not contain (downAddress)
|
||||
}
|
||||
|
||||
val iterationCount = 10
|
||||
|
|
@ -355,8 +355,8 @@ abstract class ClusterRoundRobinRoutedActorSpec extends MultiNodeSpec(ClusterRou
|
|||
|
||||
val replies = receiveReplies(DeployRoutee, iterationCount)
|
||||
|
||||
routeeAddresses.size must be(3)
|
||||
replies.values.sum must be(iterationCount)
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-10")
|
||||
|
|
|
|||
|
|
@ -120,9 +120,9 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
props(Props[Echo]),
|
||||
name)
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router).size must be(roles.size) }
|
||||
awaitAssert { currentRoutees(router).size should be(roles.size) }
|
||||
val routees = currentRoutees(router)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
router
|
||||
}
|
||||
|
||||
|
|
@ -148,10 +148,10 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
|
||||
val replies = receiveReplies(iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be > (0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -183,8 +183,8 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
|
||||
val replies = receiveReplies(iterationCount)
|
||||
|
||||
replies(third) must be > (replies(second))
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(third) should be > (replies(second))
|
||||
replies.values.sum should be(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -195,9 +195,9 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
runOn(first) {
|
||||
val router3 = system.actorOf(FromConfig.props(Props[Memory]), "router3")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router3).size must be(9) }
|
||||
awaitAssert { currentRoutees(router3).size should be(9) }
|
||||
val routees = currentRoutees(router3)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(Set(address(first)))
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(address(first)))
|
||||
}
|
||||
enterBarrier("after-4")
|
||||
}
|
||||
|
|
@ -206,9 +206,9 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
runOn(first) {
|
||||
val router4 = system.actorOf(FromConfig.props(Props[Memory]), "router4")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router4).size must be(6) }
|
||||
awaitAssert { currentRoutees(router4).size should be(6) }
|
||||
val routees = currentRoutees(router4)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(Set(
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(
|
||||
address(first), address(second), address(third)))
|
||||
}
|
||||
enterBarrier("after-5")
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
"create routees from configuration" in {
|
||||
runOn(first) {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router1).size must be(4) }
|
||||
awaitAssert { currentRoutees(router1).size should be(4) }
|
||||
val routees = currentRoutees(router1)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(Set(address(first), address(second)))
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(address(first), address(second)))
|
||||
}
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
|
@ -112,9 +112,9 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
|
||||
runOn(first) {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router1).size must be(6) }
|
||||
awaitAssert { currentRoutees(router1).size should be(6) }
|
||||
val routees = currentRoutees(router1)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -127,9 +127,9 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
props(Props[Echo]),
|
||||
"router2")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router2).size must be(6) }
|
||||
awaitAssert { currentRoutees(router2).size should be(6) }
|
||||
val routees = currentRoutees(router2)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -169,9 +169,9 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
|
||||
def assertHashMapping(router: ActorRef): Unit = {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router).size must be(6) }
|
||||
awaitAssert { currentRoutees(router).size should be(6) }
|
||||
val routees = currentRoutees(router)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet must be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
|
||||
router ! "a"
|
||||
val destinationA = expectMsgType[ActorRef]
|
||||
|
|
|
|||
|
|
@ -141,10 +141,10 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
"deploy routees to the member nodes in the cluster" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
router1.isInstanceOf[RoutedActorRef] must be(true)
|
||||
router1.isInstanceOf[RoutedActorRef] should be(true)
|
||||
|
||||
// max-nr-of-instances-per-node=2 times 2 nodes
|
||||
awaitAssert(currentRoutees(router1).size must be(4))
|
||||
awaitAssert(currentRoutees(router1).size should be(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -153,11 +153,11 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
@ -173,7 +173,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// 2 nodes, 2 routees on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(4))
|
||||
awaitAssert(currentRoutees(router4).size should be(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -182,11 +182,11 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(GroupRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -199,7 +199,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=2 times 4 nodes
|
||||
awaitAssert(currentRoutees(router1).size must be(8))
|
||||
awaitAssert(currentRoutees(router1).size should be(8))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -208,8 +208,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ must be > (0) }
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -221,7 +221,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 2 routee on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(8))
|
||||
awaitAssert(currentRoutees(router4).size should be(8))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -230,8 +230,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(GroupRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ must be > (0) }
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-5")
|
||||
|
|
@ -241,7 +241,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=1 times 3 nodes
|
||||
awaitAssert(currentRoutees(router3).size must be(3))
|
||||
awaitAssert(currentRoutees(router3).size should be(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -250,11 +250,11 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) must be(0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be > (0)
|
||||
replies(fourth) must be > (0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be(0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies(fourth) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
@ -263,7 +263,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
"deploy routees to specified node role" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
awaitAssert(currentRoutees(router5).size must be(2))
|
||||
awaitAssert(currentRoutees(router5).size should be(2))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -272,11 +272,11 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) must be > (0)
|
||||
replies(second) must be > (0)
|
||||
replies(third) must be(0)
|
||||
replies(fourth) must be(0)
|
||||
replies.values.sum must be(iterationCount)
|
||||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be(0)
|
||||
replies(fourth) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-7")
|
||||
|
|
@ -285,10 +285,10 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
"deploy programatically defined routees to the member nodes in the cluster" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
router2.isInstanceOf[RoutedActorRef] must be(true)
|
||||
router2.isInstanceOf[RoutedActorRef] should be(true)
|
||||
|
||||
// totalInstances = 3, maxInstancesPerNode = 1
|
||||
awaitAssert(currentRoutees(router2).size must be(3))
|
||||
awaitAssert(currentRoutees(router2).size should be(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -301,8 +301,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
val routees = currentRoutees(router2)
|
||||
val routeeAddresses = routees map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }
|
||||
|
||||
routeeAddresses.size must be(3)
|
||||
replies.values.sum must be(iterationCount)
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-8")
|
||||
|
|
@ -317,16 +317,16 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 2 routees on each node
|
||||
awaitAssert(currentRoutees(router4).size must be(8))
|
||||
awaitAssert(currentRoutees(router4).size should be(8))
|
||||
|
||||
testConductor.blackhole(first, second, Direction.Both).await
|
||||
|
||||
awaitAssert(routees.size must be(6))
|
||||
routeeAddresses must not contain (address(second))
|
||||
awaitAssert(routees.size should be(6))
|
||||
routeeAddresses should not contain (address(second))
|
||||
|
||||
testConductor.passThrough(first, second, Direction.Both).await
|
||||
awaitAssert(routees.size must be(8))
|
||||
routeeAddresses must contain(address(second))
|
||||
awaitAssert(routees.size should be(8))
|
||||
routeeAddresses should contain(address(second))
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -348,10 +348,10 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
}.get
|
||||
|
||||
cluster.down(downAddress)
|
||||
expectMsgType[Terminated](15.seconds).actor must be(downRouteeRef)
|
||||
expectMsgType[Terminated](15.seconds).actor should be(downRouteeRef)
|
||||
awaitAssert {
|
||||
routeeAddresses must contain(notUsedAddress)
|
||||
routeeAddresses must not contain (downAddress)
|
||||
routeeAddresses should contain(notUsedAddress)
|
||||
routeeAddresses should not contain (downAddress)
|
||||
}
|
||||
|
||||
val iterationCount = 10
|
||||
|
|
@ -361,8 +361,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
routeeAddresses.size must be(3)
|
||||
replies.values.sum must be(iterationCount)
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-10")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue