+tes #16431 support for TestProbe with user-defined name
This commit is contained in:
parent
49d9082851
commit
f480989b25
6 changed files with 55 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue