How to make a group finish running if duration is over


I maybe wrong here but it looks to me that when my defined duration is over K6 stops everything, it does not finish any groups that were in the middle of running. Is there any way to force the groups that have been started to not stop until they are completed when the duration time is over?

Thank you

See similar problem here - Terminating the sessions of VUs when ramping down

Hi @anthonyodonnell,

Currently - no, after we finish (the (in)famous) 1007 PR and it’s released there will be a timeout, for each iteration to be reached before … we stop it in the middle.

There are actually 2 different timeouts:

  1. gracefulRampDown - this is for iterations that should be stopped because we ramp down the number of VUs
  2. gracefulStop - this is for iterations that should be stopped because we are at the end of an executor (most likely the whole test, in most old cases, and probably most future ones)

This is hopefully going to get done in the next month and a half or so … (we have been at it for a while so … no promises :smiley: )

You can use the docker new-executors tag if you want to test it out locally and report any bugs :smiley:

1 Like

Just pinging here with an update that k6 v0.27.0 was just released, and it includes the aforementioned gracefulStop and gracefulRampDown options. For more details, see Release v0.27.0 · grafana/k6 · GitHub and Scenarios