Merge pull request #16432 from pawel-wiejacha/pawelwiejacha_16431_named_test_probes

+tes #16431 support for TestProbe with user-defined name
This commit is contained in:
Patrik Nordwall 2014-12-15 14:28:45 +01:00
commit edd9c2d5c6
6 changed files with 55 additions and 6 deletions

View file

@ -211,6 +211,16 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
//#test-special-probe
}
"demonstrate usage of test probe with custom name" in {
//#test-probe-with-custom-name
val worker = TestProbe("worker")
val aggregator = TestProbe("aggregator")
worker.ref.path.name should startWith("worker")
aggregator.ref.path.name should startWith("aggregator")
//#test-probe-with-custom-name
}
"demonstrate probe watch" in {
import akka.testkit.TestProbe
val target = system.actorOf(Props.empty)