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
This commit is contained in:
Patrik Nordwall 2019-05-06 11:08:57 +02:00 committed by GitHub
parent c70370b4d6
commit 4e5c8fe626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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