forked from goodboy/tractor
1
0
Fork 0

Spawn even less suba-actors in Windows CI

Seems like we've probably got some greater limitations
with Windows and "nested" spawned sub-processes...
more_thorough_super_tests
Tyler Goodlet 2019-11-22 19:27:54 -05:00
parent f977d37cee
commit 2d4b6de4f4
1 changed files with 10 additions and 9 deletions

View File

@ -1,6 +1,7 @@
""" """
Cancellation and error propagation Cancellation and error propagation
""" """
import platform
from itertools import repeat from itertools import repeat
import pytest import pytest
@ -87,7 +88,6 @@ def test_multierror(arb_addr):
tractor.run(main, arbiter_addr=arb_addr) tractor.run(main, arbiter_addr=arb_addr)
@pytest.mark.parametrize('delay', (0, 0.5)) @pytest.mark.parametrize('delay', (0, 0.5))
@pytest.mark.parametrize( @pytest.mark.parametrize(
'num_subactors', range(25, 26), '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 @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. """Test that failed actor sets are wrapped in `trio.MultiError`s.
This test goes only 2 nurseries deep but we should eventually have tests This test goes only 2 nurseries deep but we should eventually have tests
for arbitrary n-depth actor trees. 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: try:
async with tractor.open_nursery() as nursery: async with tractor.open_nursery() as nursery: