[gnome-settings-daemon/benzea/fix-xsettings-ci-race] xsettings: Fix race condition in fontconfig timestamp test
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/fix-xsettings-ci-race] xsettings: Fix race condition in fontconfig timestamp test
- Date: Tue, 18 Aug 2020 09:10:52 +0000 (UTC)
commit f68ad66f4727059ddaec1c81dcdc094088504802
Author: Benjamin Berg <bberg redhat com>
Date: Tue Aug 18 11:07:03 2020 +0200
xsettings: Fix race condition in fontconfig timestamp test
The timestamp resolution of FontconfigTimestamp is only one second, and
setup time of the test may be faster in some cases.
Move one of the delays so that we are guaranteed to have at least one
second between the initial creation of fonts.conf and the later update.
We still have another delay afterwards that should give us plenty of
time for the property to be updated.
plugins/xsettings/test.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/xsettings/test.py b/plugins/xsettings/test.py
index 9c1b4a09..4cce676e 100755
--- a/plugins/xsettings/test.py
+++ b/plugins/xsettings/test.py
@@ -170,9 +170,9 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
self.assertEqual(before, 0)
# Copy the fonts.conf again
+ time.sleep(1)
shutil.copy(os.path.join(os.path.dirname(__file__), 'fontconfig-test/fonts.conf'),
os.path.join(self.fc_dir, 'fonts.conf'))
- time.sleep(1)
# gdbus_log_write = open(os.path.join(self.workdir, 'gdbus-after.log'), 'wb')
# process = subprocess.Popen(['gdbus', 'introspect', '--session', '--dest', 'org.gtk.Settings',
'--object-path', '/org/gtk/Settings'],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]