Nothing like that in TestKit, reason being - you don't usually interact with Actors like that. I think the test should feel more like "when this happens, will it be restarted by it's parent"? etc. I'd rather structure the test like that, but maybe there's something I'm missing in your use-case.
On Fri, May 9, 2014 at 12:56 PM, Carsten Saathoff <[email protected]>wrote: > Hi, > > I am currently trying to figure out how to best test whether an actor > throws an exception. The only solution I can think of is creating that > actor as a child of another actor and use the standard supervision to > somehow propagate the exception to the test code (probably there are > several ways to do it that way). However, that feels somewhat complicated. > Is there a more elegant way to test it or support in the Testkit that I am > not able to find? > > thanks > > 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 [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. > -- Cheers, Konrad 'ktoso' Malawski hAkker - Typesafe, Inc <http://www.scaladays.org/> -- >>>>>>>>>> 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.
