Skip to content

Commit

Permalink
Drop caller cancels overrun test; covered in new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Apr 14, 2023
1 parent d4782d8 commit 2c51c09
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_context_stream_semantics.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ async def keep_sending_from_callee(
'overrun_by',
[
('caller', 1, never_open_stream),
('cancel_caller_during_overrun', 1, never_open_stream),
('callee', 0, keep_sending_from_callee),
],
ids='overrun_condition={}'.format,
Expand Down Expand Up @@ -676,14 +675,13 @@ async def main():
if 'caller' in overrunner:

async with ctx.open_stream() as stream:

# itersend +1 msg more then the buffer size
# to cause the most basic overrun.
for i in range(buf_size):
print(f'sending {i}')
await stream.send(i)

if 'cancel' in overrunner:
# without this we block waiting on the child side
await ctx.cancel()

else:
# expect overrun error to be relayed back
# and this sleep interrupted
Expand All @@ -697,7 +695,9 @@ async def main():

# 2 overrun cases and the no overrun case (which pushes right up to
# the msg limit)
if overrunner == 'caller' or 'cancel' in overrunner:
if (
overrunner == 'caller'
):
with pytest.raises(tractor.RemoteActorError) as excinfo:
trio.run(main)

Expand Down

0 comments on commit 2c51c09

Please sign in to comment.