Skip to content

bpo-44287: asyncio test_popen() uses longer timeout #26832

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

Merged
merged 1 commit into from
Jun 21, 2021
Merged

bpo-44287: asyncio test_popen() uses longer timeout #26832

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 vstinner added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Jun 21, 2021
@vstinner
Copy link
Member Author

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

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.

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

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

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

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
@miss-islington
Copy link
Contributor

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 June 21, 2021 23:58
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 21, 2021
@bedevere-bot
Copy link

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 <[email protected]>
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 <[email protected]>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jun 21, 2021
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 <[email protected]>
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 <[email protected]>
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.

6 participants