Feature request: Add a global timeout for running all the tests #1898
roblabla
started this conversation in
Feature requests
Replies: 1 comment
-
I really love this idea! Good point about |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Motivation
Currently, in CI, we have setup a timeout so that jobs don't take an undue amount of time running if things hang. We also have setup an auto-retry on all tests in nextest to try and remove some flakiness (I know, not ideal). Unfortunately, this means that sometimes, when some tests fail, the nextest takes a much longer time to finish, and ends up hitting the timeout configured in CI. When this happens, the test results with stdout don't show, as the CI timeout is very "abrupt".
Proposal
Add a
global-timeout
option in the nextest.toml. When this value is configured, a timeout is started from the moment the first test is started. When this timeout is reached, it kills all currently running tests (similar to those tests hitting their own slow-timeout value), all unrun tests are marked as failed, and the test results are printed.Alternatives
I believe something similar could be achieved through the use of the
timeout
command in unix. However, on windows, things are a bit more complicated. It's still probably achievable by starting nextest in the background - saving its PID, sleeping for the timeout period, and gracefully sending a kill signal to nextest. But it's not as straightforward as just setting a purpose-fit configuration option in nextest.Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions