Skip to content
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

--linger requires 2 Ctrl+C to abort k6 #1369

Closed
na-- opened this issue Mar 20, 2020 · 1 comment
Closed

--linger requires 2 Ctrl+C to abort k6 #1369

na-- opened this issue Mar 20, 2020 · 1 comment

Comments

@na--
Copy link
Member

na-- commented Mar 20, 2020

When you execute k6 run --verbose --linger github.com/loadimpact/k6/samples/thresholds_readme_example.js locally, and hit Ctrl+C after k6 has initialized all of the VUs and has started running the test, but before the test has finished, currently, k6 will output Linger set; waiting for Ctrl+C... and wait indefinitely...

This seems a bit odd to me - I think if there was a single Ctrl+C, it shouldn't wait for you to do it again, just because of --linger, so this seems like a minor k6 bug to me... For example, if you hit Ctrl+C when VUs are initializing, the test aborts immediately

@na-- na-- self-assigned this Mar 23, 2020
na-- added a commit that referenced this issue Apr 9, 2020
This allows metric processing to still occur, even after the script run has completed. In practice, this allows you to run k6 with the --linger --no-teardown flags, and execute the teardown() function manually through the REST API, after the main test run has completed.

This also fixes #1369 - now a second Ctrl+C will _always_ abort k6, albeit in a very abrupt way. On the other hand, the first Ctrl+C would be more graceful than it currently is, since it will now allow teardown() to be executed.
na-- added a commit that referenced this issue Apr 9, 2020
This allows metric processing to still occur, even after the script run has completed. In practice, this allows you to run k6 with the --linger --no-teardown flags, and execute the teardown() function manually through the REST API, after the main test run has completed.

This also fixes #1369 - now a second Ctrl+C will _always_ abort k6, albeit in a very abrupt way. On the other hand, the first Ctrl+C would be more graceful than it currently is, since it will now allow teardown() to be executed.
@na--
Copy link
Member Author

na-- commented Apr 14, 2020

Closed by #1390

@na-- na-- closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant