mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix flaky multiprocessing tests (#6725)
This commit is contained in:
1 parent
2e5257d098
commit
81d89d1d90
2 files changed
+4
-4
No files matched your search
@@ -108,14 +108,12 @@ env:
|
||||
ENV_POLLUTING_TESTS_COMMON: >-
|
||||
ENV_POLLUTING_TESTS_LINUX: >-
|
||||
test.test_multiprocessing_fork.test_processes
|
||||
test.test_multiprocessing_fork.test_threads
|
||||
test.test_multiprocessing_forkserver.test_processes
|
||||
test.test_multiprocessing_forkserver.test_threads
|
||||
test.test_multiprocessing_spawn.test_processes
|
||||
test.test_multiprocessing_spawn.test_threads
|
||||
ENV_POLLUTING_TESTS_MACOS: >-
|
||||
test.test_multiprocessing_forkserver.test_processes
|
||||
test.test_multiprocessing_forkserver.test_threads
|
||||
test.test_multiprocessing_spawn.test_processes
|
||||
test.test_multiprocessing_spawn.test_threads
|
||||
ENV_POLLUTING_TESTS_WINDOWS: >-
|
||||
|
||||
Vendored
+4
-2
@@ -6597,7 +6597,8 @@ class BaseMixin(object):
|
||||
support.print_warning(f'Dangling processes: {processes}')
|
||||
processes = None
|
||||
|
||||
threads = set(threading._dangling) - set(cls.dangling[1])
|
||||
# TODO: RUSTPYTHON: Filter out stopped threads since gc.collect() is a no-op
|
||||
threads = {t for t in threading._dangling if t.is_alive()} - {t for t in cls.dangling[1] if t.is_alive()}
|
||||
if threads:
|
||||
test.support.environment_altered = True
|
||||
support.print_warning(f'Dangling threads: {threads}')
|
||||
@@ -6794,7 +6795,8 @@ def install_tests_in_module_dict(remote_globs, start_method,
|
||||
support.print_warning(f'Dangling processes: {processes}')
|
||||
processes = None
|
||||
|
||||
threads = set(threading._dangling) - set(dangling[1])
|
||||
# TODO: RUSTPYTHON: Filter out stopped threads since gc.collect() is a no-op
|
||||
threads = {t for t in threading._dangling if t.is_alive()} - {t for t in dangling[1] if t.is_alive()}
|
||||
if threads:
|
||||
need_sleep = True
|
||||
test.support.environment_altered = True
|
||||
|
||||
Reference in new issue
Block a user