From: Kienan Stewart Date: Thu, 10 Oct 2024 18:41:45 +0000 (+0000) Subject: Tests: Stop draining LiveViewer when iterator is inactive X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c6183a33cfcdbeeeb6c7aefa0f4a44fec4fc227b;p=lttng-tools.git Tests: Stop draining LiveViewer when iterator is inactive Change-Id: Ic67cea7c3fa57ed5c48bbab7d21d206a827852ad Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/tests/utils/lttngtest/environment.py b/tests/utils/lttngtest/environment.py index c6dd0397a..fe37cfa7c 100644 --- a/tests/utils/lttngtest/environment.py +++ b/tests/utils/lttngtest/environment.py @@ -140,6 +140,8 @@ class _LiveViewer: while True: try: for msg in self._live_iterator: + if type(msg) is bt2._MessageIteratorInactivityMessageConst: + break self._events.append(msg) break except bt2.TryAgain as e: