diff --git a/akka-cluster/src/main/scala/akka/cluster/Node.scala b/akka-cluster/src/main/scala/akka/cluster/Node.scala index 9cb5bb6f50..cb00cc1908 100644 --- a/akka-cluster/src/main/scala/akka/cluster/Node.scala +++ b/akka-cluster/src/main/scala/akka/cluster/Node.scala @@ -334,6 +334,8 @@ object Node extends ExtensionId[Node] with ExtensionIdProvider { */ class Node(system: ExtendedActorSystem) extends Extension { + // FIXME rename Node to Cluster + /** * Represents the state for this Node. Implemented using optimistic lockless concurrency. * All state is represented by this immutable case class and managed by an AtomicReference. diff --git a/akka-cluster/src/test/scala/akka/cluster/ClientDowningSpec.scala b/akka-cluster/src/test/scala/akka/cluster/ClientDowningSpec.scala index 08d9adfc39..06a6b124b4 100644 --- a/akka-cluster/src/test/scala/akka/cluster/ClientDowningSpec.scala +++ b/akka-cluster/src/test/scala/akka/cluster/ClientDowningSpec.scala @@ -33,10 +33,7 @@ class ClientDowningSpec extends ClusterSpec("akka.cluster.auto-down = off") with system1 = ActorSystem("system1", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5550 - } + remote.netty.port = 5550 }""") .withFallback(system.settings.config)) .asInstanceOf[ActorSystemImpl] @@ -49,10 +46,7 @@ class ClientDowningSpec extends ClusterSpec("akka.cluster.auto-down = off") with system2 = ActorSystem("system2", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port = 5551 - } + remote.netty.port = 5551 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) @@ -66,10 +60,7 @@ class ClientDowningSpec extends ClusterSpec("akka.cluster.auto-down = off") with system3 = ActorSystem("system3", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5552 - } + remote.netty.port = 5552 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) @@ -83,10 +74,7 @@ class ClientDowningSpec extends ClusterSpec("akka.cluster.auto-down = off") with system4 = ActorSystem("system4", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5553 - } + remote.netty.port = 5553 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) diff --git a/akka-cluster/src/test/scala/akka/cluster/LeaderDowningSpec.scala b/akka-cluster/src/test/scala/akka/cluster/LeaderDowningSpec.scala index 05bda18c5d..1efbf5d945 100644 --- a/akka-cluster/src/test/scala/akka/cluster/LeaderDowningSpec.scala +++ b/akka-cluster/src/test/scala/akka/cluster/LeaderDowningSpec.scala @@ -33,10 +33,7 @@ class LeaderDowningSpec extends ClusterSpec with ImplicitSender { system1 = ActorSystem("system1", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5550 - } + remote.netty.port = 5550 }""") .withFallback(system.settings.config)) .asInstanceOf[ActorSystemImpl] @@ -49,10 +46,7 @@ class LeaderDowningSpec extends ClusterSpec with ImplicitSender { system2 = ActorSystem("system2", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port = 5551 - } + remote.netty.port = 5551 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) @@ -66,10 +60,7 @@ class LeaderDowningSpec extends ClusterSpec with ImplicitSender { system3 = ActorSystem("system3", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5552 - } + remote.netty.port = 5552 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) @@ -83,10 +74,7 @@ class LeaderDowningSpec extends ClusterSpec with ImplicitSender { system4 = ActorSystem("system4", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5553 - } + remote.netty.port = 5553 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) diff --git a/akka-cluster/src/test/scala/akka/cluster/LeaderElectionSpec.scala b/akka-cluster/src/test/scala/akka/cluster/LeaderElectionSpec.scala index ebafade1a0..f250a5f1e4 100644 --- a/akka-cluster/src/test/scala/akka/cluster/LeaderElectionSpec.scala +++ b/akka-cluster/src/test/scala/akka/cluster/LeaderElectionSpec.scala @@ -31,50 +31,35 @@ class LeaderElectionSpec extends ClusterSpec with ImplicitSender { system1 = ActorSystem("system1", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5550 - } + remote.netty.port = 5550 }""") .withFallback(system.settings.config)) .asInstanceOf[ActorSystemImpl] - val remote1 = system1.provider.asInstanceOf[RemoteActorRefProvider] node1 = Node(system1) - val fd1 = node1.failureDetector val address1 = node1.remoteAddress // ======= NODE 2 ======== system2 = ActorSystem("system2", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port = 5551 - } + remote.netty.port = 5551 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) .asInstanceOf[ActorSystemImpl] - val remote2 = system2.provider.asInstanceOf[RemoteActorRefProvider] node2 = Node(system2) - val fd2 = node2.failureDetector val address2 = node2.remoteAddress // ======= NODE 3 ======== system3 = ActorSystem("system3", ConfigFactory .parseString(""" akka { - remote.netty { - hostname = localhost - port=5552 - } + remote.netty.port = 5552 cluster.node-to-join = "akka://system1@localhost:5550" }""") .withFallback(system.settings.config)) .asInstanceOf[ActorSystemImpl] - val remote3 = system3.provider.asInstanceOf[RemoteActorRefProvider] node3 = Node(system3) - val fd3 = node3.failureDetector val address3 = node3.remoteAddress "be able to 'elect' a single leader" taggedAs LongRunningTest in {