From ae6e18a41e2f17e22ed4bd19285f531b008b6f31 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 11 Feb 2022 12:45:07 +0300 Subject: [PATCH 1/3] bpo-46711: increase timeout for `test_logging::test_post_fork_child_no_deadlock` --- Lib/test/test_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 4f3315161cf20f..adf12d7f6c2ddf 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -747,7 +747,7 @@ def lock_holder_thread_fn(): fork_happened__release_locks_and_end_thread.set() lock_holder_thread.join() - support.wait_process(pid, exitcode=0) + support.wait_process(pid, exitcode=0, timeout=support.LONG_TIMEOUT) class BadStream(object): From c7c20a4f1b9b499fd7caf4a80bf0dd9305305b36 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 11 Feb 2022 12:49:51 +0300 Subject: [PATCH 2/3] Use `timeout` in `support.wait_process` --- Lib/test/support/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d80472d8776f6c..c0398fdc15a2c6 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -2056,7 +2056,7 @@ def wait_process(pid, *, exitcode, timeout=None): # process is still running dt = time.monotonic() - t0 - if dt > SHORT_TIMEOUT: + if dt > timeout: try: os.kill(pid, signal.SIGKILL) os.waitpid(pid, 0) From b067c74f477844e0d98bc6df5f7fab480f8a2901 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 11 Feb 2022 20:34:56 +0300 Subject: [PATCH 3/3] Add info about timeout --- Lib/test/support/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index c0398fdc15a2c6..775d7e6a12917c 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -2065,7 +2065,8 @@ def wait_process(pid, *, exitcode, timeout=None): pass raise AssertionError(f"process {pid} is still running " - f"after {dt:.1f} seconds") + f"after {dt:.1f} seconds, " + f"timeout is {timeout} seconds") sleep = min(sleep * 2, max_sleep) time.sleep(sleep)