I do have a scenarios where scenarios are supposed to be running in sequential fashion, and the scenario runs for about 4 hours, hence i have to refresh token, and token refresh is working fine for every 15v mins.
val executionTime = 2.hours
val authTimeout = 5.minutes
val safetyMargin = 30.seconds
val authenticate : ChainBuilder = exec(AuthRequest.auth_token)
.exec(session => session.set("timeout", authTimeout.fromNow))
private val refreshPing: ScenarioBuilder = scenario("scenarioXYZ")
.exec(authenticate)
.during(executionTime) {
doIf(session => {session("timeout").as[Deadline].timeLeft <= safetyMargin}) {
exec(authenticate)
}
However in the set up file, i used andThen() to run scenarios sequentially, I tried all the below combinations, after refreshing token, it is not moving to the next scenario, it is just waiting for refresh token scenario to completely finish looks like, can you please advise how to proceed?
setUp(
AuctionSimulation_round1.inject(
nothingFor(1),
atOnceUsers(1),
).andThen(
refreshToken.inject(atOnceUsers(1)),
openBids_Round.inject(nothingFor(1),
atOnceUsers(1))).
andThen(
submitBids_round1.inject(nothingFor(1),
atOnceUsers(1), rampUsers(10).during(50))).
andThen(
closeBids_Round.inject(nothingFor(1),
atOnceUsers(1)))
)
setUp(
AuctionSimulation_round1.inject(
nothingFor(1),
atOnceUsers(1))
.andThen(refreshToken.inject(atOnceUsers(1)
).andThen(openBids_Round.inject(nothingFor(1),
atOnceUsers(1)).
andThen(submitBids_round1.inject(nothingFor(1),
atOnceUsers(1),
rampUsers(10).during(50))).
andThen(closeBids_Round.inject(nothingFor(1),
atOnceUsers(1))))))
10:54
setUp(
AuctionSimulation_round1.inject(
nothingFor(1),
atOnceUsers(1),
//refreshToken.inject(atOnceUsers(1)
).andThen(refreshToken.inject(nothingFor(1),
atOnceUsers(1)).
andThen(openBids_Round.inject(nothingFor(1),
atOnceUsers(1)).
andThen(submitBids_round1.inject(nothingFor(1),
atOnceUsers(1),
rampUsers(10).during(50))).
andThen(closeBids_Round.inject(nothingFor(1),
atOnceUsers(1))))))