-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramping-vus
bug: gracefulStop
is racing with iteration start
#2237
Comments
The In your example, k6 will actually start up the second VU right at t=30s, but it will immediately stop it right after that, before it can even start a single iteration. If add another stage with 2 VUs in your test (e.g. That said, I think we still have a minor bug with the handling of this... 😞 If this script: import { sleep } from 'k6';
import exec from 'k6/execution';
export const options = {
stages: [
{ duration: '30s', target: 2 },
]
}
export default function () {
console.log(`[t=${(new Date()) - exec.scenario.startTime}ms] VU{${exec.vu.idInInstance}/${exec.vu.idInTest}} ran scenario iteration ${exec.scenario.iterationInTest} (${exec.vu.iterationInScenario} for VU) in ${exec.scenario.name}`);
sleep(1);
} Is executed with
So, as I said, k6 actually starts the second VU at t=30s, but then immediately stops it, whereas I'd expect it to make at least a single iteration because of the default
So yeah, the ramping up is working as intended, we briefly get 2 VUs at t=30s. Unfortunately, it seems like we have a minor bug with the implementation of Thanks for opening this issue, @nicodn! I'll adjust the title to reflect my findings. |
ramping-vus
bug: gracefulStop
is racing with iteration start
k6 version
v0.34.1
OS
macOS & Linux
Docker version and image
No response
Expected Behaviour
Setting a stage, eg. via CLI args of
--stage 30s:2
should utilize 2 vus during the test.Actual Behaviour
The test report shows that only 1 vu was used. It behaves exactly the same as if I had set
--stage 30s:1
.It seems the target number is exclusive of the last vu instead of inclusive when target > 1.
Steps to Reproduce the Problem
k6 run --stage 30s:2 yourtest.js
The text was updated successfully, but these errors were encountered: