integration-tests: Wait for holds to disappear with a lambda

This commit is contained in:
Marco Trevisan (Treviño) 2025-02-08 01:07:38 +01:00 committed by Marco Trevisan
parent 9ab472e665
commit ce414c784c

View file

@ -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()