From ce414c784cbe19edba8597073a8c386a6b839c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Sat, 8 Feb 2025 01:07:38 +0100 Subject: [PATCH] integration-tests: Wait for holds to disappear with a lambda --- tests/integration_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration_test.py b/tests/integration_test.py index 1d54903..0b27018 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -2120,8 +2120,10 @@ class Tests(dbusmock.DBusTestCase): retcode = launch_process.wait() self.assertEqual(retcode, -signal.SIGTERM) - holds = self.get_dbus_property("ActiveProfileHolds") - self.assertEqual(len(holds), 0) + self.assert_eventually( + lambda: len(self.get_dbus_property("ActiveProfileHolds")) == 0, + message=lambda: f"Holds are {self.get_dbus_property('ActiveProfileHolds')}", + ) def test_launch_sigint_wrapper(self): self.create_platform_profile()