JVM crash on Akka TestKit usage

The problem that bugged me a bit just recently is now gone.

First I had to disable JVM exit on fatal akka error (akka.jvm-exit-on-fatal-error = off). This brought me to a weird:

sbt.ForkMain$ForkError: assertion failed: timeout 1 second expired: at scala.Predef$.assert(Predef.scala:179) at akka.testkit.TestKitBase$class.poll$1(TestKit.scala:226)

Direct googling didn’t help but googling some parts of stacktrace brought me onto this thread:

http://www.manning-sandbox.com/thread.jspa?messageID=164633

So it brought me to a dumb explanation of problems I was having: something is wrong in how Scala/Akka/TestKit versions are aligned. After a small check I changed my TestKit reference in build.sbt to this:

“com.typesafe.akka” % “akka-testkit_2.10" % “2.3.5" % “test”

And it worked ☺ Not sure if it was an explicit 2.10 reference or just a higher version of TestKit — but anyway I’m happy it all works now.

Show your support

Clapping shows how much you appreciated Ivan Suhinin’s story.