gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071)

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".
This commit is contained in:
Victor Stinner 2022-11-04 14:41:33 +01:00 committed by GitHub
parent 387f72588d
commit f09da28768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View 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. 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 kill the process (if signal.SIGKILL is available) and raise an
AssertionError. The timeout feature is not available on Windows. AssertionError. The timeout feature is not available on Windows.
""" """
@ -2105,7 +2105,7 @@ def wait_process(pid, *, exitcode, timeout=None):
import signal import signal
if timeout is None: if timeout is None:
timeout = SHORT_TIMEOUT timeout = LONG_TIMEOUT
start_time = time.monotonic() start_time = time.monotonic()
for _ in sleeping_retry(timeout, error=False): for _ in sleeping_retry(timeout, error=False):