diff --git a/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/ReceptionistExampleSpec.scala b/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/ReceptionistExampleSpec.scala index 7e22fee02b..ba9e1e680d 100644 --- a/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/ReceptionistExampleSpec.scala +++ b/akka-cluster-typed/src/test/scala/docs/akka/cluster/typed/ReceptionistExampleSpec.scala @@ -173,11 +173,12 @@ akka { remote { netty.tcp { hostname = "127.0.0.1" - port = 0 + port = 2551 } } } #config +akka.remote.netty.tcp.port = 0 """) } @@ -196,11 +197,16 @@ class ReceptionistExampleSpec extends WordSpec with ScalaFutures { "A remote basic example" must { "show register" in { - val system1 = ActorSystem(guardianJustPingService, "PingPongExample", clusterConfig) - val system2 = ActorSystem(guardianJustPinger, "PingPongExample", clusterConfig) + // FIXME cannot use guardian as it touches receptionist #24279 + import scaladsl.adapter._ + val system1 = akka.actor.ActorSystem("PingPongExample", clusterConfig) + val system2 = akka.actor.ActorSystem("PingPongExample", clusterConfig) - val cluster1 = Cluster(system1) - val cluster2 = Cluster(system2) + system1.spawnAnonymous(guardianJustPingService) + system2.spawnAnonymous(guardianJustPinger) + + val cluster1 = Cluster(system1.toTyped) + val cluster2 = Cluster(system2.toTyped) cluster1.manager ! Join(cluster1.selfMember.address) cluster1.manager ! Join(cluster2.selfMember.address)