[Python-checkins] Suppress the hang (#18457)
Andrew Svetlov
webhook-mailer at python.org
Wed Feb 26 17:15:17 EST 2020
https://github.com/python/cpython/commit/0c6e3aa67b84adb0fb7c272ae06b7ae77f832295
commit: 0c6e3aa67b84adb0fb7c272ae06b7ae77f832295
branch: master
author: Andrew Svetlov <andrew.svetlov at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-02-27T00:15:12+02:00
summary:
Suppress the hang (#18457)
files:
M Lib/test/test_asyncio/test_subprocess.py
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index a6c3acc420ac7..6657a88e657c2 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -477,12 +477,19 @@ def kill():
proc.kill = kill
returncode = transport.get_returncode()
transport.close()
- await transport._wait()
+ await asyncio.wait_for(transport._wait(), 5)
return (returncode, kill_called)
# Ignore "Close running child process: kill ..." log
with test_utils.disable_logger():
- returncode, killed = self.loop.run_until_complete(kill_running())
+ try:
+ returncode, killed = self.loop.run_until_complete(
+ kill_running()
+ )
+ except asyncio.TimeoutError:
+ self.skipTest(
+ "Timeout failure on waiting for subprocess stopping"
+ )
self.assertIsNone(returncode)
# transport.close() must kill the process if it is still running
More information about the Python-checkins
mailing list