diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 1838915fe28261..c6e419da9f4295 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -558,6 +558,7 @@ def close_loop(loop): pass else: if isinstance(watcher, asyncio.ThreadedChildWatcher): + # Wait for subprocess to finish, but not forever for thread in list(watcher._threads.values()): thread.join(timeout=support.SHORT_TIMEOUT)