Skip to content

Commit 522cbbb

Browse files
committed
Load the config from the correct path
1 parent f6aab17 commit 522cbbb

File tree

1 file changed

+3
-1
lines changed
  • modules/swagger-codegen/src/main/resources/scala-gatling

1 file changed

+3
-1
lines changed

modules/swagger-codegen/src/main/resources/scala-gatling/api.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ class {{classname}}Simulation extends Simulation {
1515
1616
def getCurrentDirectory = new File("").getAbsolutePath
1717
def userDataDirectory = getCurrentDirectory + "/src/gatling/resources/data"
18+
def userConfDirectory = getCurrentDirectory + "/src/gatling/resources/conf"
1819
1920
// basic test setup
2021
val configName = System.getProperty("testConfig", "baseline")
21-
val config = ConfigFactory.load(configName).withFallback(ConfigFactory.load("default"))
22+
val config = ConfigFactory.parseFile(new File(userConfDirectory + File.separator + configName + ".conf"))
23+
.withFallback(ConfigFactory.parseFile(new File(userConfDirectory + File.separator + "default.conf")))
2224
val durationSeconds = config.getInt("performance.durationSeconds")
2325
val rampUpSeconds = config.getInt("performance.rampUpSeconds")
2426
val rampDownSeconds = config.getInt("performance.rampDownSeconds")

0 commit comments

Comments
 (0)