Merge pull request #22184 from johanandren/wip-22180-custom-actor-system-in-multinodespec-johanandren

Custom ActorSystem creation in MultiNodeSpec
This commit is contained in:
Patrik Nordwall 2017-02-10 11:05:09 +01:00 committed by GitHub
commit f83ec3f4cd

View file

@ -256,9 +256,16 @@ abstract class MultiNodeSpec(val myself: RoleName, _system: ActorSystem, _roles:
import MultiNodeSpec._
/**
* Constructor for using arbitrary logic to create the actor system used in
* the multi node spec (the `Config` passed to the creator must be used in
* the created actor system for the multi node tests to work)
*/
def this(config: MultiNodeConfig, actorSystemCreator: Config ActorSystem) =
this(config.myself, actorSystemCreator(ConfigFactory.load(config.config)), config.roles, config.deployments)
def this(config: MultiNodeConfig) =
this(config.myself, ActorSystem(MultiNodeSpec.getCallerName(classOf[MultiNodeSpec]), ConfigFactory.load(config.config)),
config.roles, config.deployments)
this(config, config ActorSystem(MultiNodeSpec.getCallerName(classOf[MultiNodeSpec]), config))
val log: LoggingAdapter = Logging(system, this.getClass)