Hello,
I discovered a strange behavior when I set a boolean value in a session. With the following Simulation:
class TestSimulation extends Simulation {
val endSim = new Date().getTime() + (1 minute).toMillis;
val httpConf = http
.baseURL(“http://www.test.com:8080”)
.acceptHeader("/")
.acceptCharsetHeader(“ISO-8859-1,utf-8;q=0.7,*;q=0.3”)
.acceptEncodingHeader(“gzip,deflate,sdch”)
.acceptLanguageHeader(“en-US,en;q=0.8”)
.userAgentHeader(“Test/1.0.0”)
val scn = scenario(“Test”)
.exec(session => {
session.set(“continue”, true);
})
.asLongAs(session => (session(“continue”).asOption[Boolean].getOrElse(false) && new Date().getTime() < endSim).success) {
exec(session => {
println(“Set continue to false”)
session.set(“continue”, false)
})
.exec(session => {
println(“test”)
session
})
}
setUp(scn.inject(ramp(10).over(10))).protocols(httpConf)
}
I have the following output:
Set error to false
Set error to false
…
But I never reach the “test” println
If I change session.set(“error”, false) by session.set(“error”, true) then it works. I also tried with an Int instead of a Boolean and I get the same behavior when the value becomes 0
I am using last commit from gatling master
Thanks