Tests call sleeping_retry() with SHORT_TIMEOUT (#93870)

Tests now call busy_retry() and sleeping_retry() with SHORT_TIMEOUT
or LONG_TIMEOUT (of test.support), rather than hardcoded constants.

Add also WAIT_ACTIVE_CHILDREN_TIMEOUT constant to
_test_multiprocessing.
This commit is contained in:
Victor Stinner 2022-06-15 18:49:14 +02:00 committed by GitHub
parent 46e455f21c
commit 50e0866f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 9 deletions

View file

@ -497,7 +497,7 @@ class FNTLEINTRTest(EINTRBaseTest):
with open(os_helper.TESTFN, 'wb') as f:
# synchronize the subprocess
start_time = time.monotonic()
for _ in support.sleeping_retry(60.0, error=False):
for _ in support.sleeping_retry(support.LONG_TIMEOUT, error=False):
try:
lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
lock_func(f, fcntl.LOCK_UN)