Remove address vals in tests, fix race in TransitionSpec, see #2201
This commit is contained in:
parent
fb04786072
commit
12e90a98dc
19 changed files with 53 additions and 94 deletions
|
|
@ -36,10 +36,6 @@ abstract class NodeLeavingAndExitingSpec
|
|||
|
||||
import NodeLeavingAndExitingMultiJvmSpec._
|
||||
|
||||
lazy val firstAddress = node(first).address
|
||||
lazy val secondAddress = node(second).address
|
||||
lazy val thirdAddress = node(third).address
|
||||
|
||||
"A node that is LEAVING a non-singleton cluster" must {
|
||||
|
||||
// FIXME make it work and remove ignore
|
||||
|
|
@ -48,7 +44,7 @@ abstract class NodeLeavingAndExitingSpec
|
|||
awaitClusterUp(first, second, third)
|
||||
|
||||
runOn(first) {
|
||||
cluster.leave(secondAddress)
|
||||
cluster.leave(second)
|
||||
}
|
||||
testConductor.enter("second-left")
|
||||
|
||||
|
|
@ -60,13 +56,13 @@ abstract class NodeLeavingAndExitingSpec
|
|||
awaitCond(cluster.latestGossip.members.exists(_.status == MemberStatus.Leaving)) // wait on LEAVING
|
||||
val hasLeft = cluster.latestGossip.members.find(_.status == MemberStatus.Leaving) // verify node that left
|
||||
hasLeft must be('defined)
|
||||
hasLeft.get.address must be(secondAddress)
|
||||
hasLeft.get.address must be(address(second))
|
||||
|
||||
// 2. Verify that 'second' node is set to EXITING
|
||||
awaitCond(cluster.latestGossip.members.exists(_.status == MemberStatus.Exiting)) // wait on EXITING
|
||||
val hasExited = cluster.latestGossip.members.find(_.status == MemberStatus.Exiting) // verify node that exited
|
||||
hasExited must be('defined)
|
||||
hasExited.get.address must be(secondAddress)
|
||||
hasExited.get.address must be(address(second))
|
||||
}
|
||||
|
||||
testConductor.enter("finished")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue