=act #3857 Ensure that only relevant test messages go to dead letters

*   Since there was no sender for the `Create` message in the test, the
    created `ActorRef` was also sent to dead letters, creating a race
    where the test could start to subscribe _too early_ and receive the
    `ActorRef` instead of the expected string.
This commit is contained in:
Björn Antonsson 2014-02-03 11:54:13 +01:00
parent 6ad0550006
commit 7f189366b9

View file

@ -343,6 +343,8 @@ class ActorSelectionSpec extends AkkaSpec("akka.loglevel=DEBUG") with DefaultTim
}
"send ActorSelection wildcard targeted to missing actor to deadLetters" in {
val creator = TestProbe()
implicit def self = creator.ref
val top = system.actorOf(p, "top")
top ! Create("child1")
top ! Create("child2")