[gnome-settings-daemon/benzea/brightness-update-ci-issue] tests: Wait longer for brightness updates




commit 65b2393a95156dda10c827d4712093cd95238857
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jul 26 18:10:08 2021 +0200

    tests: Wait longer for brightness updates
    
    Sometimes the test_legacy_brightness_rounding seems to fail, in rare
    cases with the brightness file being empty. This is possible in busy CI
    environments due to the short time window (<= 200ms) and because the
    script first truncates the file.
    
    Increase the timeout in order to avoid such a CI failure. Note that
    writing the update atomically is not really feasible.

 plugins/power/test.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index e1d7d5e6..530ab698 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -1187,31 +1187,31 @@ class PowerPluginTest8(PowerPluginBase):
         obj_gsd_power_prop_iface = dbus.Interface(obj_gsd_power, dbus.PROPERTIES_IFACE)
 
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 0)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 0)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 10)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 2)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 20)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 3)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 25)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 4)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 49)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 7)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 50)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 8)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 56)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 8)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 57)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 9)
         obj_gsd_power_prop_iface.Set('org.gnome.SettingsDaemon.Power.Screen', 'Brightness', 98)
-        time.sleep(0.4)
+        time.sleep(0.6)
         self.assertEqual(self.get_brightness(), 15)
 
     def test_no_backlight(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]