Hello Oskar, 
based on the two key datapoints from your email: FSM testing + at 
akka.testkit.CallingThreadDispatcher.dispatch(CallingThreadDispatcher.scala:208)
I deduce that you are using TestActorRef (well you’re probably using TestFSMRef 
as suggested by the FSM docs, which also IS-A TestActorRef), which is cool for 
testing one actor in isolation, yet it won’t work nicely when you test 
interaction between actors, because it’s using the CallingThreadDispatcher. 
These abstractions allow to very easily test “one actor”, yet at the trade of 
of effectively being single threaded (sic!), which is why you’re running into 
deadlocks. 

So while these patterns and classes are good for synchronous testing, they 
won’t play well if you have any kind of bigger interaction going on between 
actors. Please use the plain TestKit instead, like explained in the 
“Asynchronous Integration Testing with TestKit" section of the docs.



I hope this helps, happy hakking!



-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to