Fix port configuration for basic cluster example spec (#29836)
This commit is contained in:
parent
ae22f114b2
commit
385e075fdc
1 changed files with 10 additions and 14 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
package docs.akka.cluster.typed
|
||||
|
||||
import akka.actor.testkit.typed.scaladsl.ActorTestKit
|
||||
import akka.actor.testkit.typed.scaladsl.LogCapturing
|
||||
import akka.testkit.SocketUtil
|
||||
import com.github.ghik.silencer.silent
|
||||
|
|
@ -119,6 +120,8 @@ class BasicClusterConfigSpec extends AnyWordSpec with ScalaFutures with Eventual
|
|||
val sys2Port = SocketUtil.temporaryLocalPort()
|
||||
def config(port: Int) = ConfigFactory.parseString(s"""
|
||||
akka.remote.classic.netty.tcp.port = $port
|
||||
akka.remote.artery.canonical.port = $port
|
||||
akka.cluster.jmx.multi-mbeans-in-same-jvm = on
|
||||
akka.cluster.seed-nodes = [ "akka://ClusterSystem@127.0.0.1:$sys1Port", "akka://ClusterSystem@127.0.0.1:$sys2Port" ]
|
||||
""")
|
||||
|
||||
|
|
@ -128,10 +131,8 @@ class BasicClusterConfigSpec extends AnyWordSpec with ScalaFutures with Eventual
|
|||
Cluster(system1)
|
||||
Cluster(system2)
|
||||
} finally {
|
||||
system1.terminate()
|
||||
system1.whenTerminated.futureValue
|
||||
system2.terminate()
|
||||
system2.whenTerminated.futureValue
|
||||
ActorTestKit.shutdown(system1)
|
||||
ActorTestKit.shutdown(system2)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -200,10 +201,8 @@ class BasicClusterManualSpec extends AnyWordSpec with ScalaFutures with Eventual
|
|||
cluster2.isTerminated shouldEqual true
|
||||
}
|
||||
} finally {
|
||||
system.terminate()
|
||||
system.whenTerminated.futureValue
|
||||
system2.terminate()
|
||||
system2.whenTerminated.futureValue
|
||||
ActorTestKit.shutdown(system)
|
||||
ActorTestKit.shutdown(system2)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -287,12 +286,9 @@ class BasicClusterManualSpec extends AnyWordSpec with ScalaFutures with Eventual
|
|||
system3.whenTerminated.futureValue
|
||||
|
||||
} finally {
|
||||
system1.terminate()
|
||||
system1.whenTerminated.futureValue
|
||||
system2.terminate()
|
||||
system2.whenTerminated.futureValue
|
||||
system3.terminate()
|
||||
system3.whenTerminated.futureValue
|
||||
ActorTestKit.shutdown(system1)
|
||||
ActorTestKit.shutdown(system2)
|
||||
ActorTestKit.shutdown(system3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue