I am using Intellij 14.1 and I run the multi-node test. I notice a few things
1) The multi-jvm folder is automatically unmarked as the *Test Sources Root* 2) It causes an exception : *Caused by: java.lang.IllegalStateException: need system property multinode.max-nodes to be set* Here are my questions: 1) Can you run multi-node testing with IntelliJ 14.1 Ide? 2) If not, how do I run it using the SBT prompt? (I do not understand the instructions here http://doc.akka.io/docs/akka/snapshot/dev/multi-node-testing.html#Running_the_Multi_Node_Tests ) I have the following *Dependencies.scala **(in root project)**:* object Dependencies { val AKKA_VERSION = "2.4.0-RC3" val SCALA_VERSION = "2.11.7" val SCALA_TEST_VERSION = "2.2.5" val core = { val compile = { val akka = "com.typesafe.akka" % "akka-actor_2.11" % AKKA_VERSION val clusterTools = "com.typesafe.akka" %% "akka-cluster-tools" % AKKA_VERSION val clusterMetrics = "com.typesafe.akka" % "akka-cluster-metrics_2.11" % AKKA_VERSION Seq(akka, clusterTools, clusterMetrics) } val test = { val scalaTest = "org.scalatest" % "scalatest_2.11" % SCALA_TEST_VERSION % "test" val akkaTest = "com.typesafe.akka" % "akka-testkit_2.11" % AKKA_VERSION % "test" val multiNodeTest = "com.typesafe.akka" %% "akka-multi-node-testkit" % AKKA_VERSION % "test" Seq(scalaTest, akkaTest, multiNodeTest) } compile ++ test } } *ProjectBuild.scala **(in root project)**:* import com.typesafe.sbt.SbtMultiJvm import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm import sbt.Keys._ import sbt._ object ProjectBuild extends Build { lazy val root = Project(id = “root", base = file(".")) .aggregate(macros, core) lazy val macros = Project(id = "macros", base = file("macros")) lazy val core = Project(id = "core", base = file("core")) .dependsOn(macros) .settings(libraryDependencies ++= Dependencies.core) .settings(multiJvmSettings) .configs(MultiJvm) lazy val multiJvmSettings = SbtMultiJvm.multiJvmSettings ++ Seq( compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in Test), // make sure that MultiJvm test are compiled by the default test compilation parallelExecution in Test := false, // disable parallel tests executeTests in Test <<= (executeTests in Test, executeTests in MultiJvm) map { case ((testResults), (multiJvmResults)) => val overall = if (testResults.overall.id < multiJvmResults.overall.id) multiJvmResults.overall else testResults.overall Tests.Output(overall, testResults.events ++ multiJvmResults.events, testResults.summaries ++ multiJvmResults.summaries) } ) } *plugins.sbt (in root project):* addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.3.11") *Spec (in core project):* import akka.remote.testconductor.RoleName import akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec} import com.typesafe.config.ConfigFactory private object NodeSystemConfig extends MultiNodeConfig { val first = role("first") val second = role("second") def nodeList: Seq[RoleName] = Seq(first, second) // Extract individual sigar library for every node nodeList.foreach(r => nodeConfig(r) { ConfigFactory.parseString( s""" |akka.cluster.metrics.enabled = off |akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] |akka.cluster.metrics.native-library-extract-folder=target/native/${r.name} """.stripMargin) }) // Configuration for all nodes commonConfig(ConfigFactory.parseString(""" |akka.actor.provider = "akka.cluster.ClusterActorRefProvider" |akka.remote.log-remote-lifecycle-events = off |akka.cluster.roles = [compute] |akka.cluster.auto-join = off |akka.cluster.auto-down = on |akka.loggers = ["akka.testkit.TestEventListener"] |akka.loglevel = INFO """.stripMargin)) } final class NodeSystemSpecMultiJvmNode1 extends NodeSystemSpec final class NodeSystemSpecMultiJvmNode2 extends NodeSystemSpec private[test] abstract class NodeSystemSpec extends MultiNodeSpec(NodeSystemConfig) with STMultiNodeSpec { override def initialParticipants: Int = roles.size "A node" should { "do something" in { } } } trait STMultiNodeSpec extends MultiNodeSpecCallbacks with WordSpecLike with MustMatchers with BeforeAndAfterAll with ImplicitSender { this: MultiNodeSpec ⇒ override def beforeAll() = multiNodeSpecBeforeAll() override def afterAll() = multiNodeSpecAfterAll() } -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
