Skip to content

Commit 4b4ab65

Browse files
authored
Log when stopping GrpcStreamBroadcaster instances (#118)
There's already a similar log message when starting to stream.
2 parents 2445ff8 + a15045d commit 4b4ab65

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/frequenz/client/base/streaming.py

+1
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

+5
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)