diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-15 16:49:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 16:49:14 (GMT) |
commit | 50e0866f8792941d2aea8937c63d1cb37bbc35cf (patch) | |
tree | 39d7ab435d4e961ca1212c5ab6453b0bb687376b /Lib/test/test_multiprocessing_main_handling.py | |
parent | 46e455f21c23b03fd68055fbd97e9d0c449f00a5 (diff) | |
download | cpython-50e0866f8792941d2aea8937c63d1cb37bbc35cf.zip cpython-50e0866f8792941d2aea8937c63d1cb37bbc35cf.tar.gz cpython-50e0866f8792941d2aea8937c63d1cb37bbc35cf.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_multiprocessing_main_handling.py')
-rw-r--r-- | Lib/test/test_multiprocessing_main_handling.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_multiprocessing_main_handling.py b/Lib/test/test_multiprocessing_main_handling.py index 35e9cd6..6b30a89 100644 --- a/Lib/test/test_multiprocessing_main_handling.py +++ b/Lib/test/test_multiprocessing_main_handling.py @@ -62,7 +62,8 @@ if __name__ == '__main__': pool.map_async(f, [1, 2, 3], callback=results.extend) # up to 1 min to report the results - for _ in support.sleeping_retry(60, "Timed out waiting for results"): + for _ in support.sleeping_retry(support.LONG_TIMEOUT, + "Timed out waiting for results"): if results: break @@ -93,7 +94,8 @@ results = [] with Pool(5) as pool: pool.map_async(int, [1, 4, 9], callback=results.extend) # up to 1 min to report the results - for _ in support.sleeping_retry(60, "Timed out waiting for results"): + for _ in support.sleeping_retry(support.LONG_TIMEOUT, + "Timed out waiting for results"): if results: break |