Replace 'after' barrier with explicit barrier inside test method.
* It's no problem using after, but scalatest will output the test method as completed (green) before running after, so it looks confusing in the logs * Using unique barrier names adds extra traceability in case of failures.
This commit is contained in:
parent
52f122107c
commit
e4104cfd06
11 changed files with 32 additions and 49 deletions
|
|
@ -4,7 +4,6 @@
|
|||
package akka.cluster
|
||||
|
||||
import com.typesafe.config.ConfigFactory
|
||||
import org.scalatest.BeforeAndAfter
|
||||
import akka.remote.testkit.MultiNodeConfig
|
||||
import akka.remote.testkit.MultiNodeSpec
|
||||
import akka.testkit._
|
||||
|
|
@ -20,15 +19,11 @@ object NodeStartupMultiJvmSpec extends MultiNodeConfig {
|
|||
class NodeStartupMultiJvmNode1 extends NodeStartupSpec
|
||||
class NodeStartupMultiJvmNode2 extends NodeStartupSpec
|
||||
|
||||
abstract class NodeStartupSpec extends MultiNodeSpec(NodeStartupMultiJvmSpec) with MultiNodeClusterSpec with ImplicitSender with BeforeAndAfter {
|
||||
abstract class NodeStartupSpec extends MultiNodeSpec(NodeStartupMultiJvmSpec) with MultiNodeClusterSpec {
|
||||
import NodeStartupMultiJvmSpec._
|
||||
|
||||
override def initialParticipants = 2
|
||||
|
||||
after {
|
||||
testConductor.enter("after")
|
||||
}
|
||||
|
||||
lazy val firstAddress = node(first).address
|
||||
lazy val secondAddress = node(second).address
|
||||
|
||||
|
|
@ -40,6 +35,7 @@ abstract class NodeStartupSpec extends MultiNodeSpec(NodeStartupMultiJvmSpec) wi
|
|||
awaitUpConvergence(numberOfMembers = 1)
|
||||
assertLeader(first)
|
||||
}
|
||||
testConductor.enter("after-1")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +54,7 @@ abstract class NodeStartupSpec extends MultiNodeSpec(NodeStartupMultiJvmSpec) wi
|
|||
cluster.latestGossip.members.size must be(2)
|
||||
awaitCond(cluster.convergence.isDefined)
|
||||
assertLeader(first, second)
|
||||
testConductor.enter("after-2")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue