Sorry for the delay Endre. It's been a while I do not read this user list.
Here's the issue: https://github.com/akka/akka/issues/18061

It's my very first one, hope I did it well.

giampaolo

Il giorno domenica 7 giugno 2015 13:56:02 UTC+2, Akka Team ha scritto:
>
> Hi,
>
>
>
> On Fri, Jun 5, 2015 at 10:20 AM, Giampaolo <[email protected] 
> <javascript:>> wrote:
>
>> Many thanks Akka Team for the reply. 
>> Do you think that this info should be added to TestKit doc to avoid this 
>> mistake for Akka newbies like me?
>>
>
> Yes, I think so. Can you file a ticket for this?
>
> -Endre
>  
>
>>
>> giampaolo
>>
>>
>> Il giorno venerdì 29 maggio 2015 15:37:00 UTC+2, Akka Team ha scritto:
>>>
>>> Hi there,
>>> in general we do not encourage the use of TestActorRef - the way it 
>>> works is by forcing the CallingThreadDispatcher, which does not mix well 
>>> with Actors which need to perform work in the background.
>>> For example PersistentActors need to execute recovery etc (if you're 
>>> using AtLeastOnceDelivery it means you must be using Persistence already).
>>>
>>> Summing up, the solution is to not use TestActorRef.
>>> In the tests you show you are not using any of TestActorRefs features 
>>> anyway, so removing should be painless indeed :-)
>>>
>>> Related ticket: https://github.com/akka/akka/issues/15293
>>>
>>> Happy hakking!
>>>
>>> On Wed, May 27, 2015 at 11:17 AM, Giampaolo <[email protected]> 
>>> wrote:
>>>
>>>> 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.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Akka Team
>>> Typesafe - Reactive apps on the JVM
>>> Blog: letitcrash.com
>>> Twitter: @akkateam
>>>  
>>  -- 
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Akka Team
> Typesafe - Reactive apps on the JVM
> Blog: letitcrash.com
> Twitter: @akkateam
>  

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