From 29ba19ae5464fab868796d76c3c6ae5a0ae6b33e Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Tue, 22 Mar 2022 15:36:00 +0300 Subject: [PATCH] test: skip flaky ping test on Windows Ping test started to fail (in ~70% cases) after Windows CI migration from Appveyor to GitHub Actions. As a part of this migration, the test tarantool instance was changed from an instance started on a remote Linux server to an instance started on the same Windows server under WSL. Thus, request time has shortened and it supposedly caused the ping test to fail. Python documentation [1] declares that ...though the time is always returned as a floating point number, not all systems provide time with a better precision than 1 second... Particularly, StackOverflow answer [2] argues that For Linux and Mac precision is +- 1 microsecond or 0.001 milliseconds. Python on Windows uses +- 16 milliseconds precision due to clock implementation problems due to process interrupts. based on Windows documentation [3]. Assuming that ping requests between the same server services can easily be under 1 ms, it caused the test to fail. This patch adds skip for the flaky test, refer to #214 for further development. 1. https://docs.python.org/3/library/time.html#time.time 2. https://stackoverflow.com/a/1938096/11646599 3. https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/high-resolution-timers Follows up #182, part of #214 --- test/suites/test_dml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/suites/test_dml.py b/test/suites/test_dml.py index e3922a10..6463778f 100644 --- a/test/suites/test_dml.py +++ b/test/suites/test_dml.py @@ -146,6 +146,9 @@ def test_05_ping(self): # Simple ping test # * No exceptions are raised # * Ping time > 0 + if sys.platform.startswith("win"): + self.skipTest("Windows clock precision causes test to fail sometimes, see #214") + self.assertTrue(self.con.ping() > 0) self.assertEqual(self.con.ping(notime=True), "Success")