Were you able to do this?

Can you provide some guidance on how to do it?

On Sunday, May 4, 2014 at 9:32:49 AM UTC-7, Eugene Dzhurinsky wrote:
>
> Hello!
>
> I've read about the testing with *akka-multi-node-testkit*, however the 
> project I'm working on is based on Maven3. As far as I know, there's no 
> port of the multi-node testkit plugin for Maven.
>
> However I guess it could be possible to *mock* the cluster behavior 
> somehow with the help of *akka-testkit*. The sample code to interact with 
> cluster (as from examples) is
>
>   val cluster = Cluster(context.system)
>
>   override def preStart(): Unit = {
>     //#subscribe
>     cluster.subscribe(self, initialStateMode = InitialStateAsEvents,
>       classOf[MemberEvent], classOf[UnreachableMember])
>     //#subscribe
>   }
>
>   override def postStop(): Unit = cluster.unsubscribe(self)
>
>
> If I could mock an instance of "cluster" - then probably I could send 
> "fake" messages from my test cluster to the instance of my actor. While 
> I've been going into this way, I'd like to know if there's any better way 
> of setting up such a in-jvm Akka cluster and work with it as with "real" 
> cluster.
>
> Thanks!
>

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