You could parameterize the (parent) actors with a function which creates child 
actors (and returns refs). For "normal mode” provide a function that creates 
the actual child actors, for testing inject a TestProbe.ref.

Alternatively you can achieve the same with a protected factory method for 
child actors which you have to override for testing.

Heiko

> On 2 Oct 2016, at 19:57, Denis Papathanasiou <denis.papathanas...@gmail.com> 
> wrote:
> 
> I have a simple akka system in scala which creates two actors of the same 
> type, which in turn create a pair of actors.
> 
> Those final (child) actors complete some processing, and reply back to the 
> orignal actors who spawned them.
> 
> The original actors kick off the processing with an ask (?) message, and they 
> wait for all the responses before the actor system shuts down.
> 
> I've read the testing section of the akka documentation -- 
> http://doc.akka.io/docs/akka/2.4/scala/testing.html -- and have completed 
> unit tests for each of the individual actors.
> 
> But I'm stuck on how to write the integration test, especially using 
> TestProbe for each of the child actors.
> 
> Are there any good extended examples I could look at for reference?
> 
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <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 https://groups.google.com/group/akka-user 
> <https://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to