From e59819a4cd9fc85cc5893784156cb756f612400a Mon Sep 17 00:00:00 2001 From: Stefan Ganzer Date: Thu, 27 Jun 2019 17:04:45 +0200 Subject: [PATCH] ActorHierarchyExperiments: Send a `start` message to the first actor (#27204) * Send a `start` message to the first actor Otherwise, only the actor system is started, but none of the actors. * Send a `start` message to the first actor Otherwise, only the actor system is started, but none of the actors. --- .../java/jdocs/typed/tutorial_1/ActorHierarchyExperiments.java | 3 ++- .../scala/typed/tutorial_1/ActorHierarchyExperiments.scala | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/akka-docs/src/test/java/jdocs/typed/tutorial_1/ActorHierarchyExperiments.java b/akka-docs/src/test/java/jdocs/typed/tutorial_1/ActorHierarchyExperiments.java index 291e289a73..4a1bcc5923 100644 --- a/akka-docs/src/test/java/jdocs/typed/tutorial_1/ActorHierarchyExperiments.java +++ b/akka-docs/src/test/java/jdocs/typed/tutorial_1/ActorHierarchyExperiments.java @@ -188,7 +188,8 @@ class Main extends AbstractBehavior { public class ActorHierarchyExperiments { public static void main(String[] args) { - ActorSystem.create(Main.createBehavior(), "testSystem"); + ActorRef testSystem = ActorSystem.create(Main.createBehavior(), "testSystem"); + testSystem.tell("start"); } } // #print-refs diff --git a/akka-docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala b/akka-docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala index 6aca175a89..d3c9036b14 100644 --- a/akka-docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala +++ b/akka-docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala @@ -146,7 +146,8 @@ class Main(context: ActorContext[String]) extends AbstractBehavior[String] { } object ActorHierarchyExperiments extends App { - ActorSystem(Main(), "testSystem") + val testSystem = ActorSystem(Main(), "testSystem") + testSystem ! "start" } //#print-refs