File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
chapter04/src/test/scala/com/reactivedesignpatterns/chapter4 Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -10,19 +10,18 @@ class StepParentSpec extends WordSpec with Matchers with BeforeAndAfterAll {
10
10
" Result in the supervisor returning a reference to that actor" in {
11
11
implicit val system = ActorSystem ()
12
12
val testProbe = TestProbe ()
13
- val parent = system.actorOf(Props ( new StepParent (testProbe.ref)) , " stepParent" )
13
+ val parent = system.actorOf(Props [ StepParent ] , " stepParent" )
14
14
parent.tell(Props [MyActor ], testProbe.ref)
15
15
val child = testProbe.expectMsgType[ActorRef ]
16
- child ! TestMessage
17
16
}
18
17
}
19
18
}
20
19
21
20
case object TestMessage
22
21
23
- class StepParent ( target : ActorRef ) extends Actor {
22
+ class StepParent extends Actor {
24
23
override val supervisorStrategy = OneForOneStrategy () {
25
- case thr : Throwable => target ! thr; Restart
24
+ case thr => Restart
26
25
}
27
26
def receive = {
28
27
case p : Props =>
You can’t perform that action at this time.
0 commit comments