akka-cluster-tools compiler warnings as fatal errors (#26647)
This commit is contained in:
parent
cc1138523e
commit
d699332b53
21 changed files with 99 additions and 112 deletions
|
|
@ -28,6 +28,7 @@ import akka.testkit._
|
|||
import akka.cluster.pubsub._
|
||||
import akka.remote.transport.ThrottlerTransportAdapter.Direction
|
||||
import akka.util.Timeout
|
||||
import akka.util.unused
|
||||
|
||||
import scala.concurrent.Await
|
||||
|
||||
|
|
@ -64,7 +65,7 @@ object ClusterClientSpec extends MultiNodeConfig {
|
|||
context.system.terminate()
|
||||
case msg =>
|
||||
testActor.forward(msg)
|
||||
sender() ! Reply(msg + "-ack", Cluster(context.system).selfAddress)
|
||||
sender() ! Reply(s"$msg-ack", Cluster(context.system).selfAddress)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -189,6 +190,19 @@ class ClusterClientSpec extends MultiNodeSpec(ClusterClientSpec) with STMultiNod
|
|||
node(r) / "system" / "receptionist"
|
||||
}
|
||||
|
||||
@unused
|
||||
def docOnly = { //not used, only demo
|
||||
//#initialContacts
|
||||
val initialContacts = Set(
|
||||
ActorPath.fromString("akka.tcp://OtherSys@host1:2552/system/receptionist"),
|
||||
ActorPath.fromString("akka.tcp://OtherSys@host2:2552/system/receptionist"))
|
||||
val settings = ClusterClientSettings(system).withInitialContacts(initialContacts)
|
||||
//#initialContacts
|
||||
|
||||
// make the compiler happy and thinking we use it
|
||||
settings.acceptableHeartbeatPause
|
||||
}
|
||||
|
||||
"A ClusterClient" must {
|
||||
|
||||
"startup cluster" in within(30 seconds) {
|
||||
|
|
@ -278,15 +292,6 @@ class ClusterClientSpec extends MultiNodeSpec(ClusterClientSpec) with STMultiNod
|
|||
receiveN(3).toSet should ===(Set("hello", "hi"))
|
||||
}
|
||||
|
||||
lazy val docOnly = { //not used, only demo
|
||||
//#initialContacts
|
||||
val initialContacts = Set(
|
||||
ActorPath.fromString("akka.tcp://OtherSys@host1:2552/system/receptionist"),
|
||||
ActorPath.fromString("akka.tcp://OtherSys@host2:2552/system/receptionist"))
|
||||
val settings = ClusterClientSettings(system).withInitialContacts(initialContacts)
|
||||
//#initialContacts
|
||||
}
|
||||
|
||||
// strange, barriers fail without this sleep
|
||||
Thread.sleep(1000)
|
||||
enterBarrier("after-4")
|
||||
|
|
@ -436,7 +441,7 @@ class ClusterClientSpec extends MultiNodeSpec(ClusterClientSpec) with STMultiNod
|
|||
c ! ClusterClient.Send("/user/service2", "ping", localAffinity = true)
|
||||
// if we would use remote watch the failure detector would trigger and
|
||||
// connection quarantined
|
||||
expectNoMsg(5 seconds)
|
||||
expectNoMessage(5 seconds)
|
||||
|
||||
testConductor.passThrough(client, receptionistRoleName, Direction.Both).await
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue