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-44287: asyncio test_popen() uses longer timeout #26832

Merged
merged 1 commit into from Jun 21, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 21, 2021

Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use battle-tested test.support.SHORT_TIMEOUT timeout rather
than a hardcoded timeout of 10 seconds: it's 30 seconds by default,
but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.

https://bugs.python.org/issue44287

@vstinner
Copy link
Member Author

vstinner commented Jun 21, 2021

@vstinner
Copy link
Member Author

vstinner commented Jun 21, 2021

@pablogsal: Let me introduce to you the battle-tested timeout.

Copy link
Member

@pablogsal pablogsal left a comment

I only hope these are military grade timeout

@@ -107,7 +107,8 @@ def test_popen(self):

events = [ovin.event, ovout.event, overr.event]
# Super-long timeout for slow buildbots.
res = _winapi.WaitForMultipleObjects(events, True, 10000)
res = _winapi.WaitForMultipleObjects(events, True,
support.SHORT_TIMEOUT * 1000)
Copy link
Member

@corona10 corona10 Jun 21, 2021

Choose a reason for hiding this comment

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

TypeError: WaitForMultipleObjects() argument 3 must be int, not float

support.SHORT_TIMEOUT looks like float value (30.0)

Copy link
Member Author

@vstinner vstinner Jun 21, 2021

Choose a reason for hiding this comment

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

Oh right, it should now be fixed.

Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
@vstinner
Copy link
Member Author

vstinner commented Jun 21, 2021

I only hope these are military grade timeout

It is since I updated my PR.

@vstinner vstinner merged commit be1cb32 into python:main Jun 21, 2021
13 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jun 21, 2021

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒🤖

@vstinner vstinner deleted the asyncio_timeout branch Jun 21, 2021
@bedevere-bot
Copy link

bedevere-bot commented Jun 21, 2021

GH-26841 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 21, 2021
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb32)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 21, 2021
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb32)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot
Copy link

bedevere-bot commented Jun 21, 2021

GH-26842 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request Jun 22, 2021
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb32)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Jun 22, 2021
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.

WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit be1cb32)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants