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

bpo-38614: Use test.support.LONG_TIMEOUT constant #17562

Merged
merged 1 commit into from
Dec 10, 2019
Merged

bpo-38614: Use test.support.LONG_TIMEOUT constant #17562

merged 1 commit into from
Dec 10, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 10, 2019

Replace hardcoded timeout constants in tests with LONG_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

LONG_TIMEOUT is 5 minutes by default, but it can be longer depending
on --timeout command line option.

https://bugs.python.org/issue38614

Replace hardcoded timeout constants in tests with LONG_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

LONG_TIMEOUT is 5 minutes by default, but it can be longer depending
on --timeout command line option.
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I checked locally and this does not make the test suite run longer (no hanging timeout is involved in any successful test) but I assume that now if test hang, will hang 5 times more, no?

@vstinner vstinner merged commit c98b019 into python:master Dec 10, 2019
@vstinner vstinner deleted the long_timeout branch December 10, 2019 20:12
@vstinner
Copy link
Member Author

"but I assume that now if test hang, will hang 5 times more, no?"

Yes, it hangs 5 times longer. But buildbots are automated, they dont waste developers time. If a test hangs 1 min or 1 hour, it is the same for me. But I care of flaky tests which only fail because a timeout is too short.

We can make LONG_TIMEOUT shorter if it becomes an issue. Previously, each test had to be fine tuned :-(

To be clear, if a test hangs, it is a bug 😁

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Replace hardcoded timeout constants in tests with LONG_TIMEOUT of
test.support, so it's easier to ajdust this timeout for all tests at
once.

LONG_TIMEOUT is 5 minutes by default, but it can be longer depending
on --timeout command line option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants