From b7b489dd0754338fcc46915cfe3c2b44856a5ec3 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 1 Sep 2021 10:38:31 -0400 Subject: [PATCH] Drop shielded stream api usage --- tests/test_task_broadcasting.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/test_task_broadcasting.py b/tests/test_task_broadcasting.py index 34a761a..55f6d3f 100644 --- a/tests/test_task_broadcasting.py +++ b/tests/test_task_broadcasting.py @@ -64,7 +64,6 @@ async def open_sequence_streamer( sequence: List[int], arb_addr: Tuple[str, int], start_method: str, - shield: bool = False, ) -> tractor.MsgStream: @@ -83,7 +82,7 @@ async def open_sequence_streamer( ) as (ctx, first): assert first is None - async with ctx.open_stream(shield=shield) as stream: + async with ctx.open_stream() as stream: yield stream await portal.cancel_actor() @@ -224,16 +223,8 @@ def test_faster_task_to_recv_is_cancelled_by_slower( arb_addr, start_method, - # NOTE: this MUST be set to avoid the stream terminating - # early when the faster subtask is cancelled by the slower - # parent task. - shield=True, - ) as stream: - # alt to passing kwarg above. - # with stream.shield(): - async with trio.open_nursery() as n: n.start_soon( ensure_sequence,