Merge pull request #25029 from chbatey/issue-25028

Disable TlsTcpWithActorSystemSetupSpec when not running tcp-tls tests
This commit is contained in:
Patrik Nordwall 2018-05-02 15:35:40 +02:00 committed by GitHub
commit e10f30d252
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -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
}
}

View file

@ -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)