Caused by: java.lang.IllegalStateException: need system property multinode.max-nodes to be set
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_VERSIONval clusterTools = "com.typesafe.akka" %% "akka-cluster-tools" % AKKA_VERSIONval clusterMetrics = "com.typesafe.akka" % "akka-cluster-metrics_2.11" % AKKA_VERSIONSeq(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}}
import com.typesafe.sbt.SbtMultiJvmimport com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvmimport 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 compilationparallelExecution in Test := false, // disable parallel testsexecuteTests in Test <<=(executeTests in Test, executeTests in MultiJvm) map {case ((testResults), (multiJvmResults)) =>val overall =if (testResults.overall.id < multiJvmResults.overall.id) multiJvmResults.overallelse testResults.overallTests.Output(overall,testResults.events ++ multiJvmResults.events,testResults.summaries ++ multiJvmResults.summaries)})}
addSbtPlugin("com.typesafe.sbt" % "sbt-multi-jvm" % "0.3.11")
import akka.remote.testconductor.RoleNameimport akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec}import com.typesafe.config.ConfigFactoryprivate 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 nodenodeList.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 nodescommonConfig(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 NodeSystemSpecfinal class NodeSystemSpecMultiJvmNode2 extends NodeSystemSpecprivate[test] abstract class NodeSystemSpecextends MultiNodeSpec(NodeSystemConfig) with STMultiNodeSpec {override def initialParticipants: Int = roles.size"A node" should {"do something" in {}}}trait STMultiNodeSpecextends MultiNodeSpecCallbackswith WordSpecLikewith MustMatcherswith BeforeAndAfterAllwith ImplicitSender {this: MultiNodeSpec ⇒override def beforeAll() = multiNodeSpecBeforeAll()override def afterAll() = multiNodeSpecAfterAll()}
I am using Intellij 14.1 and I run the multi-node test. I notice a few things1) The multi-jvm folder is automatically unmarked as the Test Sources Root2) 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
--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
Patrik Nordwall
Typesafe - Reactive apps on the JVM
Twitter: @patriknw