]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)
authorVictor Stinner <vstinner@python.org>
Fri, 4 Nov 2022 13:41:33 +0000 (14:41 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2022 13:41:33 +0000 (14:41 +0100)
The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT.  It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".

Lib/test/support/__init__.py

index 1dee708deb8c09a442bd77311ddf1efafa02fa71..a631bfc80cfaf0fa66c57abdea1095b4b3fd6e96 100644 (file)
@@ -2097,7 +2097,7 @@ def wait_process(pid, *, exitcode, timeout=None):
 
     Raise an AssertionError if the process exit code is not equal to exitcode.
 
-    If the process runs longer than timeout seconds (SHORT_TIMEOUT by default),
+    If the process runs longer than timeout seconds (LONG_TIMEOUT by default),
     kill the process (if signal.SIGKILL is available) and raise an
     AssertionError. The timeout feature is not available on Windows.
     """
@@ -2105,7 +2105,7 @@ def wait_process(pid, *, exitcode, timeout=None):
         import signal
 
         if timeout is None:
-            timeout = SHORT_TIMEOUT
+            timeout = LONG_TIMEOUT
 
         start_time = time.monotonic()
         for _ in sleeping_retry(timeout, error=False):