Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion test/parallel_testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import common
from common import errlog

from tools.shared import cap_max_workers_in_pool
from tools.utils import WINDOWS


Expand All @@ -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.
Expand Down
11 changes: 0 additions & 11 deletions tools/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down