From 2d4b6de4f49cd37f82410213705e2c9cecf268de Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 22 Nov 2019 19:27:54 -0500 Subject: [PATCH] Spawn even less suba-actors in Windows CI Seems like we've probably got some greater limitations with Windows and "nested" spawned sub-processes... --- tests/test_cancellation.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 7bbdd08..040d8b6 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -1,6 +1,7 @@ """ Cancellation and error propagation """ +import platform from itertools import repeat import pytest @@ -87,7 +88,6 @@ def test_multierror(arb_addr): tractor.run(main, arbiter_addr=arb_addr) - @pytest.mark.parametrize('delay', (0, 0.5)) @pytest.mark.parametrize( 'num_subactors', range(25, 26), @@ -270,19 +270,20 @@ async def spawn_and_error(num) -> None: ) -@pytest.mark.parametrize( - 'num_subactors', - # NOTE: any more then this and the forkserver will - # start bailing hard...gotta look into it - range(4, 5), - ids='{}_subactors'.format, -) @tractor_test -async def test_nested_multierrors(loglevel, num_subactors, start_method): +async def test_nested_multierrors(loglevel, start_method): """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. """ + if platform.system() == 'Windows': + # Windows CI seems to be partifcularly fragile on Python 3.8.. + num_subactors = 2 + else: + # XXX: any more then this and the forkserver will + # start bailing hard...gotta look into it + num_subactors = 4 + try: async with tractor.open_nursery() as nursery: