=tes Use ConversionCheckedTripleEquals
This commit is contained in:
parent
142d9a51af
commit
30df518421
196 changed files with 2275 additions and 2266 deletions
|
|
@ -121,9 +121,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 should be(roles.size) }
|
||||
awaitAssert { currentRoutees(router).size should ===(roles.size) }
|
||||
val routees = currentRoutees(router)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(roles.map(address).toSet)
|
||||
router
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
replies(first) should be > (0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ abstract class AdaptiveLoadBalancingRouterSpec extends MultiNodeSpec(AdaptiveLoa
|
|||
val replies = receiveReplies(iterationCount)
|
||||
|
||||
replies(third) should be > (replies(second))
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -196,9 +196,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 should be(9) }
|
||||
awaitAssert { currentRoutees(router3).size should ===(9) }
|
||||
val routees = currentRoutees(router3)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(address(first)))
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(Set(address(first)))
|
||||
}
|
||||
enterBarrier("after-4")
|
||||
}
|
||||
|
|
@ -207,9 +207,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 should be(6) }
|
||||
awaitAssert { currentRoutees(router4).size should ===(6) }
|
||||
val routees = currentRoutees(router4)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(Set(
|
||||
address(first), address(second), address(third)))
|
||||
}
|
||||
enterBarrier("after-5")
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ abstract class ClusterConsistentHashingGroupSpec extends MultiNodeSpec(ClusterCo
|
|||
settings = ClusterRouterGroupSettings(totalInstances = 10, paths, allowLocalRoutees = true, useRole = None)).props(),
|
||||
"router")
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router).size should be(3) }
|
||||
awaitAssert { currentRoutees(router).size should ===(3) }
|
||||
val keys = List("A", "B", "C", "D", "E", "F", "G")
|
||||
for (_ ← 1 to 10; k ← keys) { router ! k }
|
||||
enterBarrier("messages-sent")
|
||||
|
|
@ -86,11 +86,11 @@ abstract class ClusterConsistentHashingGroupSpec extends MultiNodeSpec(ClusterCo
|
|||
val b = expectMsgType[Collected].messages
|
||||
val c = expectMsgType[Collected].messages
|
||||
|
||||
a.intersect(b) should be(Set.empty)
|
||||
a.intersect(c) should be(Set.empty)
|
||||
b.intersect(c) should be(Set.empty)
|
||||
a.intersect(b) should ===(Set.empty)
|
||||
a.intersect(c) should ===(Set.empty)
|
||||
b.intersect(c) should ===(Set.empty)
|
||||
|
||||
(a.size + b.size + c.size) should be(keys.size)
|
||||
(a.size + b.size + c.size) should ===(keys.size)
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,9 +88,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 should be(4) }
|
||||
awaitAssert { currentRoutees(router1).size should ===(4) }
|
||||
val routees = currentRoutees(router1)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(Set(address(first), address(second)))
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(Set(address(first), address(second)))
|
||||
}
|
||||
enterBarrier("after-2")
|
||||
}
|
||||
|
|
@ -111,9 +111,9 @@ abstract class ClusterConsistentHashingRouterSpec extends MultiNodeSpec(ClusterC
|
|||
|
||||
runOn(first) {
|
||||
// it may take some time until router receives cluster member events
|
||||
awaitAssert { currentRoutees(router1).size should be(6) }
|
||||
awaitAssert { currentRoutees(router1).size should ===(6) }
|
||||
val routees = currentRoutees(router1)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -126,9 +126,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 should be(6) }
|
||||
awaitAssert { currentRoutees(router2).size should ===(6) }
|
||||
val routees = currentRoutees(router2)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(roles.map(address).toSet)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -168,9 +168,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 should be(6) }
|
||||
awaitAssert { currentRoutees(router).size should ===(6) }
|
||||
val routees = currentRoutees(router)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should be(roles.map(address).toSet)
|
||||
routees.map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }.toSet should ===(roles.map(address).toSet)
|
||||
|
||||
router ! "a"
|
||||
val destinationA = expectMsgType[ActorRef]
|
||||
|
|
|
|||
|
|
@ -140,10 +140,10 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
"deploy routees to the member nodes in the cluster" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
router1.isInstanceOf[RoutedActorRef] should be(true)
|
||||
router1.isInstanceOf[RoutedActorRef] should ===(true)
|
||||
|
||||
// max-nr-of-instances-per-node=2 times 2 nodes
|
||||
awaitAssert(currentRoutees(router1).size should be(4))
|
||||
awaitAssert(currentRoutees(router1).size should ===(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -154,9 +154,9 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
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)
|
||||
replies(third) should ===(0)
|
||||
replies(fourth) should ===(0)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
@ -173,7 +173,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
runOn(first) {
|
||||
// 2 nodes, 2 routees on each node
|
||||
within(10.seconds) {
|
||||
awaitAssert(currentRoutees(router4).size should be(4))
|
||||
awaitAssert(currentRoutees(router4).size should ===(4))
|
||||
}
|
||||
|
||||
val iterationCount = 10
|
||||
|
|
@ -185,9 +185,9 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
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)
|
||||
replies(third) should ===(0)
|
||||
replies(fourth) should ===(0)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -200,7 +200,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=2 times 4 nodes
|
||||
awaitAssert(currentRoutees(router1).size should be(8))
|
||||
awaitAssert(currentRoutees(router1).size should ===(8))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -210,7 +210,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -222,7 +222,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 2 routee on each node
|
||||
awaitAssert(currentRoutees(router4).size should be(8))
|
||||
awaitAssert(currentRoutees(router4).size should ===(8))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -232,7 +232,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
val replies = receiveReplies(GroupRoutee, iterationCount)
|
||||
|
||||
replies.values.foreach { _ should be > (0) }
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-5")
|
||||
|
|
@ -242,7 +242,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// max-nr-of-instances-per-node=1 times 3 nodes
|
||||
awaitAssert(currentRoutees(router3).size should be(3))
|
||||
awaitAssert(currentRoutees(router3).size should ===(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -251,11 +251,11 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) should be(0)
|
||||
replies(first) should ===(0)
|
||||
replies(second) should be > (0)
|
||||
replies(third) should be > (0)
|
||||
replies(fourth) should be > (0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-6")
|
||||
|
|
@ -264,7 +264,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
"deploy routees to specified node role" taggedAs LongRunningTest in {
|
||||
|
||||
runOn(first) {
|
||||
awaitAssert(currentRoutees(router5).size should be(2))
|
||||
awaitAssert(currentRoutees(router5).size should ===(2))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -275,9 +275,9 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
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)
|
||||
replies(third) should ===(0)
|
||||
replies(fourth) should ===(0)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-7")
|
||||
|
|
@ -286,10 +286,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] should be(true)
|
||||
router2.isInstanceOf[RoutedActorRef] should ===(true)
|
||||
|
||||
// totalInstances = 3, maxInstancesPerNode = 1
|
||||
awaitAssert(currentRoutees(router2).size should be(3))
|
||||
awaitAssert(currentRoutees(router2).size should ===(3))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -302,8 +302,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
val routees = currentRoutees(router2)
|
||||
val routeeAddresses = routees map { case ActorRefRoutee(ref) ⇒ fullAddress(ref) }
|
||||
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
routeeAddresses.size should ===(3)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-8")
|
||||
|
|
@ -318,15 +318,15 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
runOn(first) {
|
||||
// 4 nodes, 2 routees on each node
|
||||
awaitAssert(currentRoutees(router4).size should be(8))
|
||||
awaitAssert(currentRoutees(router4).size should ===(8))
|
||||
|
||||
testConductor.blackhole(first, second, Direction.Both).await
|
||||
|
||||
awaitAssert(routees.size should be(6))
|
||||
awaitAssert(routees.size should ===(6))
|
||||
routeeAddresses should not contain (address(second))
|
||||
|
||||
testConductor.passThrough(first, second, Direction.Both).await
|
||||
awaitAssert(routees.size should be(8))
|
||||
awaitAssert(routees.size should ===(8))
|
||||
routeeAddresses should contain(address(second))
|
||||
|
||||
}
|
||||
|
|
@ -349,7 +349,7 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
}.get
|
||||
|
||||
cluster.down(downAddress)
|
||||
expectMsgType[Terminated](15.seconds).actor should be(downRouteeRef)
|
||||
expectMsgType[Terminated](15.seconds).actor should ===(downRouteeRef)
|
||||
awaitAssert {
|
||||
routeeAddresses should contain(notUsedAddress)
|
||||
routeeAddresses should not contain (downAddress)
|
||||
|
|
@ -362,8 +362,8 @@ abstract class ClusterRoundRobinSpec extends MultiNodeSpec(ClusterRoundRobinMult
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
routeeAddresses.size should be(3)
|
||||
replies.values.sum should be(iterationCount)
|
||||
routeeAddresses.size should ===(3)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-10")
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
props(Props[SomeActor]),
|
||||
"router-2")
|
||||
|
||||
awaitAssert(currentRoutees(router).size should be(4))
|
||||
awaitAssert(currentRoutees(router).size should ===(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -110,10 +110,10 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) should be(0) // should not be deployed locally, does not have required role
|
||||
replies(first) should ===(0) // should not be deployed locally, does not have required role
|
||||
replies(second) should be > 0
|
||||
replies(third) should be > 0
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-2")
|
||||
|
|
@ -130,7 +130,7 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
props(Props[SomeActor]),
|
||||
"router-3")
|
||||
|
||||
awaitAssert(currentRoutees(router).size should be(4))
|
||||
awaitAssert(currentRoutees(router).size should ===(4))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -139,10 +139,10 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
|
||||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) should be(0) // should not be deployed locally, does not have required role
|
||||
replies(first) should ===(0) // should not be deployed locally, does not have required role
|
||||
replies(second) should be > 0
|
||||
replies(third) should be > 0
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-3")
|
||||
|
|
@ -159,7 +159,7 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
props(Props[SomeActor]),
|
||||
"router-4")
|
||||
|
||||
awaitAssert(currentRoutees(router).size should be(2))
|
||||
awaitAssert(currentRoutees(router).size should ===(2))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -169,9 +169,9 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
val replies = receiveReplies(PoolRoutee, iterationCount)
|
||||
|
||||
replies(first) should be > 0
|
||||
replies(second) should be(0)
|
||||
replies(third) should be(0)
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies(second) should ===(0)
|
||||
replies(third) should ===(0)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -188,7 +188,7 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
props(Props[SomeActor]),
|
||||
"router-5")
|
||||
|
||||
awaitAssert(currentRoutees(router).size should be(6))
|
||||
awaitAssert(currentRoutees(router).size should ===(6))
|
||||
|
||||
val iterationCount = 10
|
||||
for (i ← 0 until iterationCount) {
|
||||
|
|
@ -200,7 +200,7 @@ abstract class UseRoleIgnoredSpec extends MultiNodeSpec(UseRoleIgnoredMultiJvmSp
|
|||
replies(first) should be > 0
|
||||
replies(second) should be > 0
|
||||
replies(third) should be > 0
|
||||
replies.values.sum should be(iterationCount)
|
||||
replies.values.sum should ===(iterationCount)
|
||||
}
|
||||
|
||||
enterBarrier("after-5")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue