I get where you're coming from. People may rely on test with TestActor ref 
and not do the proper actor specs. Those IT specs are mandatory.

On Friday, September 12, 2014 4:24:36 PM UTC-4, Akka Team wrote:
>
> Hi Sean,
> I personally am not a big fan of TestActorRef (others may disagree - this 
> may be a matter of taste...), as it changes the timing semantics of the 
> thing you're testing.
>
> Of course it makes testing (in some cases) easier, but the sacrifice is 
> that you assume single-threaded execution, 
> which may sometimes mean that you won't catch errors / races that you 
> would have caught if the tests were pure pure Actors.
> Also, one might be tempted to get the underlying Actor instance and write 
> assertions against it's internal state - which binds your test more to the 
> internals of the 
> Actor than it should (I think) and leads to testing state and not behavior 
> of the Actor. Having that said, for simple actors it may certainly be 
> simpler to use TestActorRef, but
> I'd use it "after thinking if that's a good idea" and not as the default 
> way of testing Actors.
>
> I hope this helps!
>
> -- Konrad
>
> On Fri, Sep 12, 2014 at 6:54 PM, Sean Walsh <sean....@reactibility.com 
> <javascript:>> wrote:
>
>> Konrad, isn't TestActorRef valuable for unit testing with actors? This 
>> assumes the proper IT test coverage is there as well as an outer layer of 
>> the onion.
>>
>> On Wednesday, September 10, 2014 10:16:48 AM UTC-4, Akka Team wrote:
>>>
>>> By interacting with them – same as normal Actors.
>>> I would not encourage the use of TestActorRef actually - it is very 
>>> limiting (threading wise).
>>> Simply ask the actor for what you want to know from it.
>>>
>>> Also, there will be an specific Akka Persistence TestKit "soon"!
>>> Here's the issue about it: https://github.com/akka/akka/issues/15571
>>>
>>> -- Konrad `ktoso` Malawski
>>>
>>> On Wed, Sep 10, 2014 at 3:53 PM, Shajahan Palayil <shajah...@gmail.com> 
>>> wrote:
>>>
>>>> How does one unit test persistent actors. I understand that there's 
>>>> akka-testkit which one can use to get the underlying actor object of a 
>>>> test 
>>>> actor reference like below.
>>>>
>>>> final TestActorRef<MyActor> ref = TestActorRef.create(system, props, 
>>>> "testA");final MyActor actor = ref.underlyingActor();
>>>> assertTrue(actor.testMe());
>>>>
>>>> But this doesn't work for persistent actors as mentioned here 
>>>> <https://github.com/akka/akka/issues/15569>.
>>>>
>>>> Question: how does one unit test a persistent actor methods ?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Shajahan.
>>>>  
>>>> -- 
>>>> >>>>>>>>>> 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+...@googlegroups.com.
>>>> To post to this group, send email to akka...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Akka Team
>>> Typesafe - The software stack for applications that scale
>>> 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 akka-user+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <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 - The software stack for applications that scale
> 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 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