> On 05 Aug 2015, at 10:17, Patrik Nordwall <[email protected]> wrote: > > On Wed, Aug 5, 2015 at 8:23 AM, Heiko Seeberger <[email protected] > <mailto:[email protected]>> wrote: >> On 04 Aug 2015, at 22:52, Patrik Nordwall <[email protected] >> <mailto:[email protected]>> wrote: >> >> There is no support in testkit for creating fake Terminated messages. That >> would probably be a nice addition. >> >> I guess you have already explored and rejected the option to actually stop >> the watched actor in the test. > > Sort of. I’m implementing a simple publish-subscribe solution. The mediator > watches subscribers and removes these upon termination. The latter I would > like to test, i.e. be sure that terminated actors are removed from the > mediator. Stopping a subscriber means that it is “hard to use” in assertions > ;-) > > Any ideas how to test this? Maybe TestActorRef is the only way ... > > I would use a separate message to request the current subscribers that you > can use from the test to verify that the stopped subscriber is removed from > the mediator.
I think I like that. Thanks! Heiko -- Heiko Seeberger Home: heikoseeberger.de <http://heikoseeberger.de/> Twitter: @hseeberger <https://twitter.com/hseeberger> Public key: keybase.io/hseeberger <https://keybase.io/hseeberger> -- >>>>>>>>>> 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.
