document deadlock risk of TestProbe.watch(TestActorRef), see #2916

This commit is contained in:
Roland 2013-01-23 23:38:22 +01:00
parent 40a67a4097
commit bb7a4b7d40
4 changed files with 58 additions and 0 deletions

View file

@ -206,6 +206,16 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
//#test-special-probe
}
"demonstrate probe watch" in {
import akka.testkit.TestProbe
val target = system.actorFor("/buh")
//#test-probe-watch
val probe = TestProbe()
probe watch target
probe.expectMsgType[Terminated].actor must be(target)
//#test-probe-watch
}
"demonstrate probe reply" in {
import akka.testkit.TestProbe
import scala.concurrent.duration._