Hi to all,
I have something strange that I cannot understand.

I have this test that worked very well

 "give online status NeverLogged for never logged user" in new WithUsersData() {
      val auth = createAndAuthenticateUser
      val user1 = auth._1
      val sid1 = auth._2

      val tp1 = TestProbe()

      val dispatcher1 = TestActorRef(DispatcherActor.props(tp1.ref))

      dispatcher1 ! Presence("rid_test2", sid1)
      tp1.expectMsgType[Notification.Presence]

}


Then I added AtLeastOnceDelivery trait to the DispatcherActor for messages 
it needs to send to other actors. Keep in mind that in my test, dispatcher1 
is receiving a message, not sending one. It broke my tests.
It seems to me that dispatcher1 is not ready when I fire the Presence 
message, since I see no logging from that actor. However if I change the 
code this way:

for(i <- 0 to 0){

  dispatcher1 ! Presence("rid_test2", sid1)

}


or in  this way

Thread.sleep(50)

dispatcher1 ! Presence("rid_test2", sid1)


Test is successful. Could you give me some advice in investigating this problem?

Thank you in advance for your precious time.


Giampaolo




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