2

Let's say I have this configuration

val scn = (name: String) => scenario(name)
  .forever() {
    .exec(request)
  }

setUp(
  scn("scn1").inject(atOnceUsers(1))
    .throttle(
      jumpToRps(1), holdFor(10 seconds)
    ),
  scn("scn2").inject(atOnceUsers(1))
    .throttle(jumpToRps(1), holdFor(20 seconds))
).protocols(http.baseURLs(url))

I would expect to run the whole simulation for 20 seconds - until all is finished. What actually happens is that the simulation is stopped after 10 seconds, right after the first scenario finishes.

---- Requests ------------------------------------------------------------------
> Global                                                   (OK=20     KO=0     )
> scn1 / HTTP Request                                      (OK=10     KO=0     )
> scn2 / HTTP Request                                      (OK=10     KO=0     )

---- scn1 ----------------------------------------------------------------------
[--------------------------------------------------------------------------]  0%
        waiting: 0      / active: 1      / done:0     
---- scn2 ----------------------------------------------------------------------
[--------------------------------------------------------------------------]  0%
        waiting: 0      / active: 1      / done:0     
================================================================================

Simulation foo.Bar completed in 10 seconds

To overcome this in general, I need to configure all scenarios that ends earlier then the final one to wait with zero throttle.

setUp(
  scn.inject(atOnceUsers(1))
     .throttle(
       jumpToRps(1), holdFor(10 seconds),
       jumpToRps(0), holdFor(10 seconds)  // <-- added wait 
     ),
  scn.inject(atOnceUsers(1))
     .throttle(jumpToRps(1), holdFor(20 seconds))
).protocols(http.baseURLs(url))

Is this expected behavior? What other options do I have to make my simulation run until all scenarios are finished or until maxDuration?

user219882
  • 15,274
  • 23
  • 93
  • 138

1 Answers1

0

Possible explanation could be that Feeder loops on data and when there is no more data it exists. In this case call "circular" on your feeder so that it goes back to the top of the sequence once the end is reached

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116