I started writing some tests using the TestKit, and it's quite nice - but I quickly realized the ActorSystem persists between tests. This seems a bit odd to me, since it introduces potential coupling between the order of test execution and their results. It doesn't feel like what I would expect the default behavior to be.
Is there a particular reason for this? Is the fact that I want to reset my system between each test a smell? I want to do this in my particular test class because I am testing persistence.
Lastly, is there an easy way to change the behavior?
I found this old thread:
https://groups.google.com/forum/embed/#!topic/akka-user/-Cvf9K5P0a0Which has a solution, albeit a somewhat complicated one. It seems like this would be a very good thing to be able to do simply, without needing to create and destroy a new ActorSystem for every test manually (ex: have a "reset system" method I can call in test teardown). I'm wondering if there's an easier way to do it today.
Thank you!
Spencer