document deadlock risk of TestProbe.watch(TestActorRef), see #2916
This commit is contained in:
parent
40a67a4097
commit
bb7a4b7d40
4 changed files with 58 additions and 0 deletions
|
|
@ -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._
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue