You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there's an error in the setup() or teardown() function or when they time out, k6 will abort the script execution and print something like ERRO[0000] Engine error error="setup: Error: my_intentional_error at setup (...) or ERRO[0010] Engine error error="setup: context cancelled at setup (...)", but the actual exit code of k6 itself will still be 0, as if everything is OK.
This is in stark contrast to errors in the init code, which immediately abort k6 and change the exit code to 255. The actual error code is subject to future change, the important point is that it's not 0. The setup() and teardown() functions should behave the same way, since there's no concurrency with their execution, it's just a single transient VU executing them and it's important for users to have feedback that something went wrong during their execution.
The text was updated successfully, but these errors were encountered:
There are now 4 new non zero exit codes that will be revisioned at later
date when we more exit codes arise.
The 4 new ones are for each of setup and teardown timeouts, if it is a
timeout in the engine but it is not in setup/teardown - no such is known
at this time and 1 for engine error which is not timeout.
When there's an error in the
setup()
orteardown()
function or when they time out, k6 will abort the script execution and print something likeERRO[0000] Engine error error="setup: Error: my_intentional_error at setup (...)
orERRO[0010] Engine error error="setup: context cancelled at setup (...)"
, but the actual exit code of k6 itself will still be 0, as if everything is OK.This is in stark contrast to errors in the init code, which immediately abort k6 and change the exit code to 255. The actual error code is subject to future change, the important point is that it's not 0. The
setup()
andteardown()
functions should behave the same way, since there's no concurrency with their execution, it's just a single transient VU executing them and it's important for users to have feedback that something went wrong during their execution.The text was updated successfully, but these errors were encountered: