Simplified config and removed old too-long timeout.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
parent
5e6f856743
commit
ea99a1f315
2 changed files with 16 additions and 28 deletions
|
|
@ -17,19 +17,13 @@ object ClientDowningNodeThatIsUnreachableMultiJvmSpec extends MultiNodeConfig {
|
||||||
val third = role("third")
|
val third = role("third")
|
||||||
val fourth = role("fourth")
|
val fourth = role("fourth")
|
||||||
|
|
||||||
val waitForConvergence = 20 seconds
|
|
||||||
|
|
||||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||||
akka {
|
akka.cluster {
|
||||||
#loglevel = "DEBUG"
|
|
||||||
#stdout-loglevel = "DEBUG"
|
|
||||||
cluster {
|
|
||||||
gossip-frequency = 100 ms
|
gossip-frequency = 100 ms
|
||||||
leader-actions-frequency = 100 ms
|
leader-actions-frequency = 100 ms
|
||||||
periodic-tasks-initial-delay = 300 ms
|
periodic-tasks-initial-delay = 300 ms
|
||||||
auto-down = off
|
auto-down = off
|
||||||
}
|
}
|
||||||
}
|
|
||||||
""")))
|
""")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,9 +40,9 @@ class ClientDowningNodeThatIsUnreachableSpec extends MultiNodeSpec(ClientDowning
|
||||||
def node = Cluster(system)
|
def node = Cluster(system)
|
||||||
|
|
||||||
def assertMemberRing(nrOfMembers: Int, canNotBePartOfRing: Seq[Address] = Seq.empty[Address]): Unit = {
|
def assertMemberRing(nrOfMembers: Int, canNotBePartOfRing: Seq[Address] = Seq.empty[Address]): Unit = {
|
||||||
awaitCond(node.latestGossip.members.size == nrOfMembers, waitForConvergence)
|
awaitCond(node.latestGossip.members.size == nrOfMembers)
|
||||||
awaitCond(node.latestGossip.members.forall(_.status == MemberStatus.Up), waitForConvergence)
|
awaitCond(node.latestGossip.members.forall(_.status == MemberStatus.Up))
|
||||||
awaitCond(canNotBePartOfRing forall (address => !(node.latestGossip.members exists (_.address == address))), waitForConvergence)
|
awaitCond(canNotBePartOfRing forall (address => !(node.latestGossip.members exists (_.address == address))))
|
||||||
}
|
}
|
||||||
|
|
||||||
"Client of a 4 node cluster" must {
|
"Client of a 4 node cluster" must {
|
||||||
|
|
|
||||||
|
|
@ -17,19 +17,13 @@ object ClientDowningNodeThatIsUpMultiJvmSpec extends MultiNodeConfig {
|
||||||
val third = role("third")
|
val third = role("third")
|
||||||
val fourth = role("fourth")
|
val fourth = role("fourth")
|
||||||
|
|
||||||
val waitForConvergence = 20 seconds
|
|
||||||
|
|
||||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||||
akka {
|
akka.cluster {
|
||||||
#loglevel = "DEBUG"
|
|
||||||
#stdout-loglevel = "DEBUG"
|
|
||||||
cluster {
|
|
||||||
gossip-frequency = 100 ms
|
gossip-frequency = 100 ms
|
||||||
leader-actions-frequency = 100 ms
|
leader-actions-frequency = 100 ms
|
||||||
periodic-tasks-initial-delay = 300 ms
|
periodic-tasks-initial-delay = 300 ms
|
||||||
auto-down = off
|
auto-down = off
|
||||||
}
|
}
|
||||||
}
|
|
||||||
""")))
|
""")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,9 +40,9 @@ class ClientDowningNodeThatIsUpSpec extends MultiNodeSpec(ClientDowningNodeThatI
|
||||||
def node = Cluster(system)
|
def node = Cluster(system)
|
||||||
|
|
||||||
def assertMemberRing(nrOfMembers: Int, canNotBePartOfRing: Seq[Address] = Seq.empty[Address]): Unit = {
|
def assertMemberRing(nrOfMembers: Int, canNotBePartOfRing: Seq[Address] = Seq.empty[Address]): Unit = {
|
||||||
awaitCond(node.latestGossip.members.size == nrOfMembers, waitForConvergence)
|
awaitCond(node.latestGossip.members.size == nrOfMembers)
|
||||||
awaitCond(node.latestGossip.members.forall(_.status == MemberStatus.Up), waitForConvergence)
|
awaitCond(node.latestGossip.members.forall(_.status == MemberStatus.Up))
|
||||||
awaitCond(canNotBePartOfRing forall (address => !(node.latestGossip.members exists (_.address.port == address.port))), waitForConvergence)
|
awaitCond(canNotBePartOfRing forall (address => !(node.latestGossip.members exists (_.address.port == address.port))))
|
||||||
}
|
}
|
||||||
|
|
||||||
"Client of a 4 node cluster" must {
|
"Client of a 4 node cluster" must {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue