From 4e5c8fe626e9f353a4c7201036195645a3d0a47e Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Mon, 6 May 2019 11:08:57 +0200 Subject: [PATCH] ResetSystemMessageSeqNrSpec should not run with classic remoting, #26849 (#26856) * ResetSystemMessageSeqNrSpec should not run with classic remoting, #26849 * Jenkins job overrides config with -Dakka.remote.artery.enabled=off * use Scalatest withFixture --- .../akka/remote/artery/ArteryMultiNodeSpec.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 e8d3016763..7b2d2cd0e0 100644 --- a/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala +++ b/akka-remote/src/test/scala/akka/remote/artery/ArteryMultiNodeSpec.scala @@ -9,6 +9,8 @@ import akka.actor.setup.ActorSystemSetup import akka.remote.RARP import akka.testkit.{ AkkaSpec, SocketUtil } import com.typesafe.config.{ Config, ConfigFactory } +import org.scalatest.Outcome +import org.scalatest.Pending /** * Base class for remoting tests what needs to test interaction between a "local" actor system @@ -38,6 +40,15 @@ abstract class ArteryMultiNodeSpec(config: Config) private var remoteSystems: Vector[ActorSystem] = Vector.empty + override protected def withFixture(test: NoArgTest): Outcome = { + // note that withFixture is also used in FlightRecorderSpecIntegration + if (!RARP(system).provider.remoteSettings.Artery.Enabled) { + info(s"${getClass.getName} is only enabled for Artery") + Pending + } else + super.withFixture(test) + } + /** * @return A new actor system configured with artery enabled. The system will * automatically be terminated after test is completed to avoid leaks.