From c6183a33cfcdbeeeb6c7aefa0f4a44fec4fc227b Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 10 Oct 2024 18:41:45 +0000 Subject: [PATCH] Tests: Stop draining LiveViewer when iterator is inactive MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ic67cea7c3fa57ed5c48bbab7d21d206a827852ad Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- tests/utils/lttngtest/environment.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.34.1