You could try to decrease the interval of these periodic tasks: akka.cluster.gossip-interval = 500 ms akka.cluster.leader-actions-interval = 500 ms
On Fri, Jun 19, 2015 at 10:11 PM, 'Konstantinos Kougios' via Akka User List <[email protected]> wrote: > Thanks Patrik, this worked. For me I know that 3 members should join, so > I was able to do this like > > TestKit.awaitCond( > cluster1.state.members.size == 3 && cluster2.state.members.size == 3 && > driverCluster.state.members.size == 3, 20 seconds > ) > > Still though my test takes 11 secs to run due to some cluster initial comm > delays, any ideas how to give them a kick start? > > > On 16/06/15 10:15, Patrik Nordwall wrote: > > Try awaitAssert in TestKit. Something like: > > val addresses = Set(Cluster(system1).selfAddress, > Cluster(system2).selfAddress) > within(10.seconds) { > awaitAssert { > Cluster(system1).state.members.map(_.address) should be(addresses) > Cluster(system1).state.members.map(_.status) should > be(Set(MemberStatus.Up)) > Cluster(system2).state.members.map(_.address) should be(addresses) > Cluster(system2).state.members.map(_.status) should > be(Set(MemberStatus.Up)) > } > } > > Regards, > Patrik > > On Mon, Jun 15, 2015 at 8:00 AM, Kostas kougios < > [email protected]> wrote: > >> Hi, >> >> I am creating an end to end test for my cluster by creating 2 of them in >> the same jvm : >> >> val cluster1 = Cluster(SystemName, server1Config)val cluster2 = >> Cluster(SystemName, server2Config) >> >> Thread.sleep(10000) >> >> >> As you can see, I have to use a sleep() to allow the cluster to to talk >> to each other. >> >> Is there a way to speed this up? >> -- >> >>>>>>>>>> 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. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > -- > >>>>>>>>>> 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 a topic in the > Google Groups "Akka User List" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/akka-user/_qr949I2Hxo/unsubscribe. > To unsubscribe from this group and all its topics, 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. > > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
