Skip to content

Commit 1d0ab3a

Browse files
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
1 parent e3f8277 commit 1d0ab3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/suites/test_dml.py

+3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def test_05_ping(self):
146146
# Simple ping test
147147
# * No exceptions are raised
148148
# * Ping time > 0
149+
if sys.platform.startswith("win"):
150+
self.skipTest("Windows clock precision causes test to fail sometimes, see #214")
151+
149152
self.assertTrue(self.con.ping() > 0)
150153
self.assertEqual(self.con.ping(notime=True), "Success")
151154

0 commit comments

Comments
 (0)