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

Add warning timeout for tests that run >1min #35405

Merged
merged 2 commits into from
Aug 10, 2016

Conversation

futile
Copy link
Contributor

@futile futile commented Aug 6, 2016

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

@rust-highfive
Copy link
Collaborator

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.

@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Aug 6, 2016

for rem in to_remove {
running_tests.remove(&rem);
}
Copy link
Contributor

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?

Copy link
Contributor

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.

@brson
Copy link
Contributor

brson commented Aug 6, 2016

Thanks @futile! Looks great.

this makes it easier to identify hanging tests
@futile futile force-pushed the tests_warn_timeout branch from 328b92f to 65a2e7a Compare August 6, 2016 13:15
@futile
Copy link
Contributor Author

futile commented Aug 6, 2016

updated the PR and addressed the comments.

requires less bookkeeping. also move some functionality into functions,
to keep the loop cleaner.
@futile futile force-pushed the tests_warn_timeout branch from 65a2e7a to e995061 Compare August 7, 2016 11:40
@brson
Copy link
Contributor

brson commented Aug 8, 2016

cc @rust-lang/tools this is adding warning message whenever a test runs for over 60 seconds.

@brson
Copy link
Contributor

brson commented Aug 8, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2016

📌 Commit e995061 has been approved by brson

@bors
Copy link
Contributor

bors commented Aug 9, 2016

⌛ Testing commit e995061 with merge 7dfc03a...

@bors
Copy link
Contributor

bors commented Aug 9, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member

@bors: retry

On Tuesday, August 9, 2016, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt-rustbuild
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-rustbuild/builds/2121


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
#35405 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95GNhY5VEGXY3HL1hee1Y5_OR24N6ks5qeERYgaJpZM4JeJ3M
.

@bors
Copy link
Contributor

bors commented Aug 10, 2016

⌛ Testing commit e995061 with merge ae77410...

bors added a commit that referenced this pull request Aug 10, 2016
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
@bors bors merged commit e995061 into rust-lang:master Aug 10, 2016
@Wojtek242
Copy link

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.

@futile
Copy link
Contributor Author

futile commented Jul 3, 2018

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants