From 0fb69d39cac330988f9579c323718deba6543f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 23 Feb 2016 16:20:18 +0100 Subject: [PATCH] tests: qvm-sync-clock is asynchronouse, take it into account --- tests/vm_qrexec_gui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/vm_qrexec_gui.py b/tests/vm_qrexec_gui.py index ae5299b7..0b4ac402 100644 --- a/tests/vm_qrexec_gui.py +++ b/tests/vm_qrexec_gui.py @@ -690,6 +690,10 @@ class TC_00_AppVMMixin(qubes.tests.SystemTestsMixin): self.assertEquals(retcode, 0, "qvm-sync-clock failed with code {}". format(retcode)) + # qvm-sync-clock is asynchronous - it spawns qubes.SetDateTime + # service, send it timestamp value and exists without waiting for + # actual time set + time.sleep(1) (vm_time, _) = self.testvm1.run("date -u +%s", passio_popen=True).communicate() self.assertAlmostEquals(int(vm_time), int(start_time), delta=30)