[gnome-settings-daemon/wip/benzea/ci] power: Resolve possible active watch race condition in power test
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/benzea/ci] power: Resolve possible active watch race condition in power test
- Date: Wed, 11 Apr 2018 11:13:24 +0000 (UTC)
commit c343f5de1d53ce1c0e0634e73684939a1f2cc530
Author: Benjamin Berg <bberg redhat com>
Date: Wed Apr 11 13:08:34 2018 +0200
power: Resolve possible active watch race condition in power test
This resolves an obscure race condition which causes mutter to fire
active watch/idle watch events in the wrong order.
Failure: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/jobs/23097
Mutter issue: https://gitlab.gnome.org/GNOME/mutter/issues/113
plugins/power/test.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index b22bafed..29df9358 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -524,6 +524,8 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
# Raise the idle delay, and see that we stop being idle
# and get idle again after the timeout
self.settings_session['idle-delay'] = 10
+ # Resolve possible race condition, see also https://gitlab.gnome.org/GNOME/mutter/issues/113
+ time.sleep(0.2)
self.reset_idle_timer()
time.sleep(5)
self.assertEqual(self.get_status(), gsdpowerenums.GSM_PRESENCE_STATUS_AVAILABLE)
@@ -532,6 +534,8 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
# Lower the delay again, and see that we get idle as we should
self.settings_session['idle-delay'] = 5
+ # Resolve possible race condition, see also https://gitlab.gnome.org/GNOME/mutter/issues/113
+ time.sleep(0.2)
self.reset_idle_timer()
time.sleep(2)
self.assertEqual(self.get_status(), gsdpowerenums.GSM_PRESENCE_STATUS_AVAILABLE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]