Testing akka actor termination
When testing akka code, I want to make sure a particular actor gets shut down within a time limit. I used to do it like this: Thread.sleep(2.seconds) assertTrue(actorRef.isTerminated()) That isTerminated method is deprecated since Akka 2.2, and good thing too, since my test was wasting everyone’s time. Today I’m doing this instead: import akka.testkit.TestProbeval probe = …