Compile warning when changing simulation rate


If I change the simulation rate to anything other than this:


For example, to this:

setUp(scn.inject(constantUsersPerSec(10) during(5 seconds)).protocols(httpProtocol))

I receive a compile warning when running tests.

I have set the -feature flag

$ gatling:testOnly -feature GeoIpDetection

But, I am still asked to set the -feature flag.

I wondered if I should be worried about this warning?

Many Thanks



This is not a Gatling warning, but a scalac (Scala compiler) warning.
“seconds” in “5 seconds’ is a postfix operator and since Scala 2.10, postfix operators generates warnings as they are potentially unsafe (postfix operators can mess with Scala’s semicolon inference).
Two ways of fixing that :

  • Do not use postfix operators : replace 5 seconds by 5.seconds
  • Add “-feature” and "-language:postfixOps” to the scalacOptions in your SBT project.



Hi Pierre,

Many thanks for your reply and explanation.

As a side note, Gatling is an extremely well-designed and implemented load-tool with the correct philosophy of “tests as code”.