You need create the node class:
class:

class SimpleClusterListenerSpecMultiJvmNode1 extends 
SimpleClusterListenerSpec
class SimpleClusterListenerSpecMultiJvmNode2 extends 
SimpleClusterListenerSpec

The class name always created using format XXXMultiJvmNodeN and you create 
one class per node you want test


On Sunday, October 18, 2015 at 5:18:08 AM UTC, Harit Himanshu wrote:
>
> Hello everyone,
>
> I started learning akka-cluster today and was trying to write the 
> multi-ivm test.
> I followed all through the document but when I run my application, I see
>
>
> > ; reload ; clean ; compile ; multi-jvm:test
> [info] Loading project definition from 
> /Users/harit/IdeaProjects/libs/akka-cluster-investigation/project
> [info] Set current project to akka-cluster-investigation (in build 
> file:/Users/harit/IdeaProjects/libs/akka-cluster-investigation/)
> [success] Total time: 0 s, completed Oct 17, 2015 10:08:45 PM
> [info] Updating 
> {file:/Users/harit/IdeaProjects/libs/akka-cluster-investigation/}akka-cluster-investigation...
> [info] Updating 
> {file:/Users/harit/IdeaProjects/libs/akka-cluster-investigation/}cluster_simple...
> [info] Resolving jline#jline;2.12.1 ...
> [info] Done updating.
> [info] Resolving jline#jline;2.12.1 ...
> [info] Done updating.
> [info] Compiling 2 Scala sources to 
> /Users/harit/IdeaProjects/libs/akka-cluster-investigation/cluster_simple/target/scala-2.11/classes...
> [success] Total time: 1 s, completed Oct 17, 2015 10:08:46 PM
> [info] Compiling 1 Scala source to 
> /Users/harit/IdeaProjects/libs/akka-cluster-investigation/cluster_simple/target/scala-2.11/multi-jvm-classes...
> [info] Passed: Total 0, Failed 0, Errors 0, Passed 0
> [info] No tests to run for MultiJvm
> [success] Total time: 1 s, completed Oct 17, 2015 10:08:47 PM
>
>
>
> It compiles the class but says no tests to run, My Test looks like  
>
> import akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec}
> import akka.testkit.ImplicitSender
> import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpecLike}
>
>
> object SimpleClusterListenerSpecConfig extends MultiNodeConfig {
>   val cluster = role("cluster")
> }
>
> class SimpleClusterListenerSpec extends 
> MultiNodeSpec(SimpleClusterListenerSpecConfig)
> with WordSpecLike
> with MustMatchers
> with BeforeAndAfterAll
> with ImplicitSender {
>
>   import SimpleClusterListenerSpecConfig._
>
>   override def initialParticipants: Int = roles.size
>
>   "A SimpleClusterListener" must {
>     "wait for all nodes to enter a barrier" in {
>       enterBarrier("startup")
>     }
>
>     runOn(cluster) {
>       enterBarrier("deployed")
>       val clusterSelection = system.actorSelection(node(cluster) / "user" / 
> "clusterListener")
>       clusterSelection ! Hello
>       expectMsg("hello")
>     }
>   }
>
>   override def beforeAll() = multiNodeSpecBeforeAll()
>
>   override def afterAll() = multiNodeSpecAfterAll()
> }
>
>
>
> And the entire code is available on GitHub 
> <https://github.com/hhimanshu/akka-cluster-investigation>. I would really 
> appreciate if some one could help me spot my issue here.
>
> Thanks
> + Harit Himanshu
>
>

-- 
>>>>>>>>>>      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.

Reply via email to