Thanks Patrik but still it takes the same amount of time. While waiting I get these in the logs

[INFO] [06/22/2015 19:43:31.255] [testSystem-akka.actor.default-dispatcher-4] [akka://testSystem/deadLetters] Message [akka.cluster.InternalClusterAction$InitJoinNack] from Actor[akka://testSystem/system/cluster/core/daemon#-2049681964] to Actor[akka://testSystem/deadLetters] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [06/22/2015 19:43:32.172] [testSystem-akka.actor.default-dispatcher-3] [akka://testSystem/deadLetters] Message [akka.cluster.InternalClusterAction$InitJoin$] from Actor[akka://testSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#1602924580] to Actor[akka://testSystem/deadLetters] was not delivered. [3] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [06/22/2015 19:43:33.171] [testSystem-akka.actor.default-dispatcher-19] [akka://testSystem/deadLetters] Message [akka.cluster.InternalClusterAction$InitJoin$] from Actor[akka://testSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#1602924580] to Actor[akka://testSystem/deadLetters] was not delivered. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [06/22/2015 19:43:34.173] [testSystem-akka.actor.default-dispatcher-18] [akka://testSystem/deadLetters] Message [akka.cluster.InternalClusterAction$InitJoin$] from Actor[akka://testSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#1602924580] to Actor[akka://testSystem/deadLetters] was not delivered. [5] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [06/22/2015 19:43:35.173] [testSystem-akka.actor.default-dispatcher-18] [akka://testSystem/deadLetters] Message [akka.cluster.InternalClusterAction$InitJoin$] from Actor[akka://testSystem/system/cluster/core/daemon/firstSeedNodeProcess-1#1602924580] to Actor[akka://testSystem/deadLetters] was not delivered. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. [INFO] [06/22/2015 19:43:36.180] [testSystem-akka.actor.default-dispatcher-17] [Cluster(akka://testSystem)] Cluster Node [akka.tcp://testSystem@127.0.0.1:2700] - Node [akka.tcp://testSystem@127.0.0.1:2700] is JOINING, roles [index-server]


On 22/06/15 12:15, Patrik Nordwall wrote:
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 <akka-user@googlegroups.com <mailto:akka-user@googlegroups.com>> 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,
        20seconds
    )

    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
    <kostas.koug...@googlemail.com
    <mailto:kostas.koug...@googlemail.com>> wrote:

        Hi,

        I am creating an end to end test for my cluster by creating 2
        of them in the same jvm :

        valcluster1=Cluster(SystemName,server1Config)
        valcluster2=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 akka-user+unsubscr...@googlegroups.com
        <mailto:akka-user+unsubscr...@googlegroups.com>.
        To post to this group, send email to
        akka-user@googlegroups.com <mailto: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.




--
    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 akka-user+unsubscr...@googlegroups.com
    <mailto:akka-user+unsubscr...@googlegroups.com>.
    To post to this group, send email to akka-user@googlegroups.com
    <mailto: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.

-- >>>>>>>>>> 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
    <mailto:akka-user+unsubscr...@googlegroups.com>.
    To post to this group, send email to akka-user@googlegroups.com
    <mailto: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.




--

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 akka-user+unsubscr...@googlegroups.com <mailto:akka-user+unsubscr...@googlegroups.com>. To post to this group, send email to akka-user@googlegroups.com <mailto: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.

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