From 783fe53b06c4e53c1cab8095cd3feea7f0a0f360 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 24 Jan 2020 00:55:40 -0500 Subject: [PATCH] Don't mix trip with multiprocessing for now It seems that mixing the two backends in the test suite results in hangs due to lingering forkservers and resource managers from `multiprocessing`? Likely we'll need either 2 separate CI runs to work or someway to be sure that these lingering servers are killed in between tests. --- tests/conftest.py | 2 +- tests/test_cancellation.py | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d8607ec..bdef563 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -38,7 +38,7 @@ def pytest_generate_tests(metafunc): methods = get_all_start_methods() if platform.system() != "Windows": - methods += ['trio_run_in_process'] + methods = ['trio_run_in_process'] if 'fork' in methods: # fork not available on windows, so check before removing # XXX: the fork method is in general incompatible with diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 80b66f1..a8e0bec 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -284,16 +284,21 @@ async def spawn_and_error(breadth, depth) -> None: @tractor_test -async def test_nested_multierrors(loglevel, start_method): +async def test_nested_multierrors(loglevel): """Test that failed actor sets are wrapped in `trio.MultiError`s. This test goes only 2 nurseries deep but we should eventually have tests for arbitrary n-depth actor trees. """ - # XXX: forkserver can't seem to handle any more then 2 depth - # process trees for whatever reason. - # Any more process levels then this and we start getting pretty slow anyway - depth = 3 - subactor_breadth = 2 + # if start_method == 'trio_run_in_process': + depth = 2 + subactor_breadth = 3 + # else: + # # XXX: multiprocessing can't seem to handle any more then 2 depth + # # process trees for whatever reason. + # # Any more process levels then this and we see bugs that cause + # # hangs and broken pipes all over the place... + # depth = 1 + # subactor_breadth = 2 with trio.fail_after(120): try: