From: Andrew Svetlov Date: Wed, 26 Feb 2020 22:15:12 +0000 (+0200) Subject: Suppress the hang (#18457) X-Git-Tag: v3.9.0a5~232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c6e3aa67b84adb0fb7c272ae06b7ae77f832295;p=thirdparty%2FPython%2Fcpython.git Suppress the hang (#18457) --- diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index a6c3acc420ac..6657a88e657c 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -477,12 +477,19 @@ class SubprocessMixin: 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