How to obtain reference to ActorSystem

Hello everyone

I am introducing Gatling to my company and in my first project I am also using skuber, a scala-kubernetes api, which also uses Akka (and Streams) under its covers. The rationale behind this: I want to deploy a load-test-environment in Openshift during the Simulation before-block, and tear it down the the after-block.

skuber needs an implicit ActorSystem and Materializer to function, so I’ve just created another inside the Gatling simulation. Now, since the Gatling simulation is run inside an ActorSystem spawning another one inside might not be a good idea. I am already experiencing that my JVM doesn’t exit after the simulation was run.

So my question is, can I get a reference to the ActorSystem used by Gatling via API, so I can reuse this reference for skuber? Is it safe to run a second ActorSystem inside? Are there other options?

best regards

Looks like a bad idea to me to hack Gatling’s resources.

Is it safe to run a second ActorSystem inside?

Yes, all the more as this ActorSystem won’t do anything when the load test is actually running.

Thanks for the clarrification