Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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
  • Loading branch information
DifferentialOrange committed Mar 31, 2022
commit 44fc747fb3d525239e84ae87aadb5996c7b96520
3 changes: 3 additions & 0 deletions test/suites/test_dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down