diff --git a/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala b/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala index 0071f57be7..d9729f3ecf 100644 --- a/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala @@ -63,4 +63,9 @@ abstract class ArteryMultiNodeSpec(config: Config) extends AkkaSpec(config.withF remoteSystems = Vector.empty super.afterTermination() } + + def arteryTcpTlsEnabled(system: ActorSystem = system): Boolean = { + val arterySettings = ArterySettings(system.settings.config.getConfig("akka.remote.artery")) + arterySettings.Enabled && arterySettings.Transport == ArterySettings.TlsTcp + } } diff --git a/akka-remote/src/test/scala/akka/remote/artery/tcp/TlsTcpSpec.scala b/akka-remote/src/test/scala/akka/remote/artery/tcp/TlsTcpSpec.scala index 9f6db890e0..b8542b6a40 100644 --- a/akka-remote/src/test/scala/akka/remote/artery/tcp/TlsTcpSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/artery/tcp/TlsTcpSpec.scala @@ -163,8 +163,7 @@ class TlsTcpWithHostnameVerificationSpec extends ArteryMultiNodeSpec( "Artery with TLS/TCP and hostname-verification=on" must { "reject invalid" in { // this test only makes sense with tls-tcp transport - val arterySettings = ArterySettings(system.settings.config.getConfig("akka.remote.artery")) - if (!arterySettings.Enabled || arterySettings.Transport != ArterySettings.TlsTcp) + if (!arteryTcpTlsEnabled()) pending systemB.actorOf(TestActors.echoActorProps, "echo") @@ -179,6 +178,7 @@ class TlsTcpWithActorSystemSetupSpec val sslProviderServerProbe = TestProbe() val sslProviderClientProbe = TestProbe() + val sslProviderSetup = SSLEngineProviderSetup(sys ⇒ new ConfigSSLEngineProvider(sys) { override def createServerSSLEngine(hostname: String, port: Int): SSLEngine = { sslProviderServerProbe.ref ! "createServerSSLEngine" @@ -198,6 +198,9 @@ class TlsTcpWithActorSystemSetupSpec "Artery with TLS/TCP with SSLEngineProvider defined via Setup" must { "use the right SSLEngineProvider" in { + if (!arteryTcpTlsEnabled()) + pending + systemB.actorOf(TestActors.echoActorProps, "echo") val path = rootB / "user" / "echo" system.actorSelection(path) ! Identify(path.name)