-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add warning timeout for tests that run >1min #35405
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
||
for rem in to_remove { | ||
running_tests.remove(&rem); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the book-keeping here be extracted to a function so it doesn't obscure the main logic of the loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is, everything from line 905 to here.
Thanks @futile! Looks great. |
this makes it easier to identify hanging tests
328b92f
to
65a2e7a
Compare
updated the PR and addressed the comments. |
requires less bookkeeping. also move some functionality into functions, to keep the loop cleaner.
65a2e7a
to
e995061
Compare
cc @rust-lang/tools this is adding warning message whenever a test runs for over 60 seconds. |
@bors r+ |
📌 Commit e995061 has been approved by |
⌛ Testing commit e995061 with merge 7dfc03a... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
@bors: retry On Tuesday, August 9, 2016, bors notifications@github.com wrote:
|
Add warning timeout for tests that run >1min This makes it easier to identify hanging tests. As described in #2873, when a test doesn't finish, we so far had no information on which test that was. In this PR, we add a duration of 60 seconds for each test, after which a warning will be printed mentioning that this specific test has been running for a long time already. Example output: https://gist.github.com/futile/6ea3eed85fe632df8633c1b03c08b012 r? @brson
Is it possible to disable this warning or increase the time out? I am running some integration tests that do some reasonably intensive calculations that take a few minutes to complete and the 60 second warning is misleading in this case. |
@Wojtek242 this seems useful, and was actually also discussed in #2873 before. There the consensus was that this functionality should be its own issue. Personally, I think it wouldn't be too much effort to add the required functionality to rustc. The code and files changed in this PR should be a good start! |
This makes it easier to identify hanging tests. As described in #2873,
when a test doesn't finish, we so far had no information on which test
that was. In this PR, we add a duration of 60 seconds for each test,
after which a warning will be printed mentioning that this specific test
has been running for a long time already.
Example output:
https://gist.github.com/futile/6ea3eed85fe632df8633c1b03c08b012
r? @brson