Skip to content

Commit 4e8370e

Browse files
committed
Update existing success test to special retry_on_exhausted case
This is because the default success case should never retry at all from now on. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
1 parent bde2081 commit 4e8370e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/streaming/test_grpc_stream_broadcaster.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def no_retry() -> mock.MagicMock:
4040
async def ok_helper(
4141
no_retry: mock.MagicMock, # pylint: disable=redefined-outer-name
4242
receiver_ready_event: asyncio.Event, # pylint: disable=redefined-outer-name
43+
retry_on_exhausted_stream: bool,
4344
) -> AsyncIterator[streaming.GrpcStreamBroadcaster[int, str]]:
4445
"""Fixture for GrpcStreamBroadcaster."""
4546

@@ -55,6 +56,7 @@ async def asynciter(ready_event: asyncio.Event) -> AsyncIterator[int]:
5556
stream_method=lambda: asynciter(receiver_ready_event),
5657
transform=_transformer,
5758
retry_strategy=no_retry,
59+
retry_on_exhausted_stream=retry_on_exhausted_stream,
5860
)
5961
yield helper
6062
await helper.stop()
@@ -79,7 +81,8 @@ async def __anext__(self) -> int:
7981
return self._current
8082

8183

82-
async def test_streaming_success(
84+
@pytest.mark.parametrize("retry_on_exhausted_stream", [True])
85+
async def test_streaming_success_retry_on_exhausted(
8386
ok_helper: streaming.GrpcStreamBroadcaster[
8487
int, str
8588
], # pylint: disable=redefined-outer-name

0 commit comments

Comments
 (0)