Gatling retry request

I have a below request

    val saml = scenario("ACM Token")
        .header("Content-Type", "application/x-www-form-urlencoded")
        .header("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36")
        .header("Accept-Encoding", "gzip, deflate, br")
        .formParam("RelayState", Configuration.relayState)
        .formParam("SAMLResponse", Configuration.saml)
      .exec { session =>
        val token = session("acmToken").as[String]
        val token2 = "Bearer " + token
        session.set("acmToken", token2)
      .exec(session => {
        System.setProperty("acmToken", session("acmToken").as[String])

which is failing randomly when user count is increased and below error is seen

io.gatling.http.client.impl.RequestTimeoutException: Request timeout to after 60000 ms
21:40:10.610 [DEBUG] i.g.h.e.r.DefaultStatsProcessor - Request 'SP' failed for user 462: Request timeout to after 60000 ms
SP: KO Request timeout to after 60000 ms

how can i retry this saml request till the domain is reachable?

Use tryMax:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.