Thank you friend, that worked well and I was able to run my first multi-ivm 
test. Here is what my test 
<https://github.com/hhimanshu/akka-cluster-investigation/blob/master/cluster_simple/src/multi-jvm/scala/SimpleClusterListenerSpec.scala>
 
code looks like.

When I run it, I get

$ sbt clean compile 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 18, 2015 9:43:50 PM

[info] Updating 
{file:/Users/harit/IdeaProjects/libs/akka-cluster-investigation/}cluster_simple...

[info] Updating 
{file:/Users/harit/IdeaProjects/libs/akka-cluster-investigation/}akka-cluster-investigation...

[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: 6 s, completed Oct 18, 2015 9:43:56 PM

[info] Compiling 1 Scala source to 
/Users/harit/IdeaProjects/libs/akka-cluster-investigation/cluster_simple/target/scala-2.11/multi-jvm-classes...

[info] * SimpleClusterListenerSpec

[JVM-1] Run starting. Expected test count is: 2

[JVM-1] SimpleClusterListenerSpecMultiJvmNode1:

[JVM-1] - Illustrate how to start-up a cluster

[JVM-1] - show that SimpleClusterListener receives message

[JVM-1] [WARN] [10/18/2015 21:44:01.571] 
[SimpleClusterListenerSpec-akka.actor.default-dispatcher-16] 
[akka://SimpleClusterListenerSpec/user/controller/127.0.0.1:53775-server1] 
received dead letter from 
Actor[akka://SimpleClusterListenerSpec/deadLetters]: ClientDisconnected

[JVM-1] Run completed in 1 second, 889 milliseconds.

[JVM-1] Total number of tests run: 2

[JVM-1] Suites: completed 1, aborted 0

[JVM-1] Tests: succeeded 2, failed 0, canceled 0, ignored 0, pending 0

[JVM-1] All tests passed.

[info] Run completed in 37 milliseconds.

[info] Total number of tests run: 0

[info] Suites: completed 0, aborted 0

[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0

[info] No tests were executed.

[success] Total time: 5 s, completed Oct 18, 2015 9:44:01 PM


Thank you again for your help
+ Harit

On Sunday, October 18, 2015 at 8:22:46 AM UTC-7, matheus...@gmail.com wrote:
>
> 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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