diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-22 00:22:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 00:22:02 (GMT) |
commit | c032a12cbb7d6e2d6a292b0e9220c33ef7349d28 (patch) | |
tree | 83fed564a81ee0b86b0a5d13299d65638b99c09f /Lib/test/test_asyncio/test_windows_utils.py | |
parent | 1e16217204c0e8e595c4d1e869c81899bfe3376b (diff) | |
download | cpython-c032a12cbb7d6e2d6a292b0e9220c33ef7349d28.zip cpython-c032a12cbb7d6e2d6a292b0e9220c33ef7349d28.tar.gz cpython-c032a12cbb7d6e2d6a292b0e9220c33ef7349d28.tar.bz2 |
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 be1cb3214d09d4bf0288bc45f3c1f167f67e4514)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_asyncio/test_windows_utils.py')
-rw-r--r-- | Lib/test/test_asyncio/test_windows_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_windows_utils.py b/Lib/test/test_asyncio/test_windows_utils.py index 45c09bb..eafa5be 100644 --- a/Lib/test/test_asyncio/test_windows_utils.py +++ b/Lib/test/test_asyncio/test_windows_utils.py @@ -107,7 +107,8 @@ class PopenTests(unittest.TestCase): events = [ovin.event, ovout.event, overr.event] # Super-long timeout for slow buildbots. - res = _winapi.WaitForMultipleObjects(events, True, 10000) + res = _winapi.WaitForMultipleObjects(events, True, + int(support.SHORT_TIMEOUT * 1000)) self.assertEqual(res, _winapi.WAIT_OBJECT_0) self.assertFalse(ovout.pending) self.assertFalse(overr.pending) |