Am Samstag, 10. Mai 2014 16:44:13 UTC+2 schrieb rkuhn:
>
> 10 maj 2014 kl. 16:11 skrev Carsten Saathoff 
> <car...@kreuzverweis.com<javascript:>
> >:
> That is the purpose of `TestActorRef.receive(msg, sender)`, but the 
> restriction is that it covers only message processing which comes directly 
> from the test procedure. In general you should not care which 
>

The restriction is what restrained me from using it in my specific use case.
 

> actors are involved and whether your actor under test delegates a task to 
> a temporary child actor: you should only test the externally visible 
> behavior, which means running the actor in its natural habitat. That is 
> what we mean when saying that unit testing is mostly a waste of time: you 
> should concentrate on functional tests. OTOH I would love to redefine “unit 
> testing” to mean “functional testing of a unit” (which conveniently is one 
> actor, including its descendants).
>

I agree with you that one should concentrate on functional testing, but 
nevertheless I have to decide on some separation into functional units that 
are tested in one piece. And if throwing an exception is part of the 
externally visible behavior, I still need a tool to test that. And if the 
exception is not triggered by the message directly received, the 
TestActorRef.receive() method doesn't help.

Or are you proposing that a functional unit should never throw Exceptions 
as a part of its external behavior? Or in other words that functional units 
should always form their own dedicated supervision hierarchy?

best

Carsten

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