Another couple loose-ifies for discovery and advanced fault suites

py313_support
Tyler Goodlet 2025-03-03 13:57:54 -05:00
parent d5c3907295
commit 3a0ad0f53f
2 changed files with 9 additions and 6 deletions

View File

@ -255,15 +255,16 @@ async def break_ipc_after_started(
def test_stream_closed_right_after_ipc_break_and_zombie_lord_engages(): def test_stream_closed_right_after_ipc_break_and_zombie_lord_engages():
''' '''
Verify that is a subactor's IPC goes down just after bringing up a stream Verify that is a subactor's IPC goes down just after bringing up
the parent can trigger a SIGINT and the child will be reaped out-of-IPC by a stream the parent can trigger a SIGINT and the child will be
the localhost process supervision machinery: aka "zombie lord". reaped out-of-IPC by the localhost process supervision machinery:
aka "zombie lord".
''' '''
async def main(): async def main():
with trio.fail_after(3): with trio.fail_after(3):
async with tractor.open_nursery() as n: async with tractor.open_nursery() as an:
portal = await n.start_actor( portal = await an.start_actor(
'ipc_breaker', 'ipc_breaker',
enable_modules=[__name__], enable_modules=[__name__],
) )

View File

@ -318,7 +318,9 @@ async def close_chans_before_nursery(
async with portal2.open_stream_from( async with portal2.open_stream_from(
stream_forever stream_forever
) as agen2: ) as agen2:
async with trio.open_nursery() as n: async with trio.open_nursery(
strict_exception_groups=False,
) as n:
n.start_soon(streamer, agen1) n.start_soon(streamer, agen1)
n.start_soon(cancel, use_signal, .5) n.start_soon(cancel, use_signal, .5)
try: try: