pekko/akka-docs/rst/scala/code/docs/cluster/ClusterDocSpec.scala
Patrik Nordwall f98b4c1f5e =clu #18345 Support local address in cluster commands
* and clarify the doc sample for leave
2015-09-04 08:53:36 +02:00

27 lines
506 B
Scala

/**
* Copyright (C) 2015 Typesafe Inc. <http://www.typesafe.com>
*/
package docs.cluster
import akka.cluster.Cluster
import akka.testkit.AkkaSpec
object ClusterDocSpec {
val config =
"""
akka.actor.provider = "akka.cluster.ClusterActorRefProvider"
akka.remote.netty.tcp.port = 0
"""
}
class ClusterDocSpec extends AkkaSpec(ClusterDocSpec.config) {
"demonstrate leave" in {
//#leave
val cluster = Cluster(system)
cluster.leave(cluster.selfAddress)
//#leave
}
}