diff --git a/test/parallel_testsuite.py b/test/parallel_testsuite.py index cd321557558bd..20e113be96767 100644 --- a/test/parallel_testsuite.py +++ b/test/parallel_testsuite.py @@ -16,7 +16,6 @@ import common from common import errlog -from tools.shared import cap_max_workers_in_pool from tools.utils import WINDOWS @@ -33,6 +32,17 @@ def python_multiprocessing_structures_are_buggy(): return (v.major, v.minor, v.micro) <= (3, 12, 7) or (v.major, v.minor, v.micro) == (3, 13, 0) +def cap_max_workers_in_pool(max_workers, is_browser): + if is_browser: + # TODO experiment with this number. In browser tests we'll be creating + # a chrome instance per worker which is expensive. + max_workers = int(max_workers / 2) + # Python has an issue that it can only use max 61 cores on Windows: https://github.com/python/cpython/issues/89240 + if WINDOWS: + return min(max_workers, 61) + return max_workers + + def run_test(test, failfast_event, lock, progress_counter, num_tests): # If failfast mode is in effect and any of the tests have failed, # and then we should abort executing further tests immediately. diff --git a/tools/shared.py b/tools/shared.py index d062e6143e0e0..400c9c396d362 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -128,17 +128,6 @@ def returncode_to_str(code): return f'returned {code}' -def cap_max_workers_in_pool(max_workers, is_browser): - if is_browser: - # TODO experiment with this number. In browser tests we'll be creating - # a chrome instance per worker which is expensive. - max_workers = int(max_workers / 2) - # Python has an issue that it can only use max 61 cores on Windows: https://github.com/python/cpython/issues/89240 - if WINDOWS: - return min(max_workers, 61) - return max_workers - - def run_multiple_processes(commands, env=None, route_stdout_to_temp_files_suffix=None,