summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-22 00:29:13 (GMT)
committerGitHub <noreply@github.com>2021-06-22 00:29:13 (GMT)
commit0ff487b8abe70f091285acf367b795861eed8049 (patch)
treeb98b6bef8c95d314783d2487f232691fb995e1a9
parentd881002fbdf12ddbd93db3e182dc5cdeb1f90386 (diff)
downloadcpython-0ff487b8abe70f091285acf367b795861eed8049.zip
cpython-0ff487b8abe70f091285acf367b795861eed8049.tar.gz
cpython-0ff487b8abe70f091285acf367b795861eed8049.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>
-rw-r--r--Lib/test/test_asyncio/test_windows_utils.py3
-rw-r--r--Misc/NEWS.d/next/Tests/2021-06-21-17-53-41.bpo-44287.YON57s.rst4
2 files changed, 6 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)
diff --git a/Misc/NEWS.d/next/Tests/2021-06-21-17-53-41.bpo-44287.YON57s.rst b/Misc/NEWS.d/next/Tests/2021-06-21-17-53-41.bpo-44287.YON57s.rst
new file mode 100644
index 0000000..66b3afe
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2021-06-21-17-53-41.bpo-44287.YON57s.rst
@@ -0,0 +1,4 @@
+Fix asyncio test_popen() of test_windows_utils by using a longer timeout.
+Use military grade battle-tested :data:`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. Patch by Victor Stinner.