Skip to content

Commit a15045d

Browse files
committed
Log when stopping GrpcStreamBroadcaster instances
There's already a similar log message when starting to stream. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 2445ff8 commit a15045d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/frequenz/client/base/streaming.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def is_running(self) -> bool:
8888

8989
async def stop(self) -> None:
9090
"""Stop the streaming helper."""
91+
_logger.info("%s: stopping the stream", self._stream_name)
9192
if self._task.done():
9293
return
9394
self._task.cancel()

tests/streaming/test_grpc_stream_broadcaster.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ async def test_streaming_error( # pylint: disable=too-many-arguments
218218
'\tdebug_error_string = "mock debug_error_string"\n'
219219
">.",
220220
),
221+
(
222+
"frequenz.client.base.streaming",
223+
logging.INFO,
224+
"test_helper: stopping the stream",
225+
),
221226
]
222227

223228

0 commit comments

Comments
 (0)