tests: Work-around profiles reload taking too long

This commit is contained in:
Bastien Nocera 2021-03-15 12:38:55 +01:00
parent 862c7db8a8
commit 556b8b3f98

View file

@ -509,6 +509,8 @@ class Tests(dbusmock.DBusTestCase):
with open(os.path.join(acpi_dir, "platform_profile_choices") ,'w') as choices:
choices.write("low-power\nbalanced\nperformance\n")
# Wait for profiles to get reloaded
self.assertEventually(lambda: len(self.get_dbus_property('Profiles')) == 3)
profiles = self.get_dbus_property('Profiles')
self.assertEqual(len(profiles), 3)
self.assertEqual(self.get_dbus_property('ActiveProfile'), 'balanced')