Skip to content

Commit 0ff487b

Browse files
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
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]>
1 parent d881002 commit 0ff487b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Lib/test/test_asyncio/test_windows_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def test_popen(self):
107107

108108
events = [ovin.event, ovout.event, overr.event]
109109
# Super-long timeout for slow buildbots.
110-
res = _winapi.WaitForMultipleObjects(events, True, 10000)
110+
res = _winapi.WaitForMultipleObjects(events, True,
111+
int(support.SHORT_TIMEOUT * 1000))
111112
self.assertEqual(res, _winapi.WAIT_OBJECT_0)
112113
self.assertFalse(ovout.pending)
113114
self.assertFalse(overr.pending)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix asyncio test_popen() of test_windows_utils by using a longer timeout.
2+
Use military grade battle-tested :data:`test.support.SHORT_TIMEOUT` timeout
3+
rather than a hardcoded timeout of 10 seconds: it's 30 seconds by default, but
4+
it is made longer on slow buildbots. Patch by Victor Stinner.

0 commit comments

Comments
 (0)