tarantool / tarantool/tarantool-python
Ping test fails because of Windows time precision
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 108
- Forks
- 51
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
See https://github.com/tarantool/tarantool-python/pull/213 PR. The issue is as follows: ping test started to fail (in ~70% cases) after I migrated Windows CI 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 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, this StackOverflow answer 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.
Assuming that ping requests between the same server services can easily be under 1 ms, it caused the test to fail.
I see two ways to "solve" this issue:
- Rework the test, document ping return value precision on Windows.
- Rework time measurement to be more precise on Windows.
The second approach is more time-consuming and I'm not sure there are any users that really need this to be fixed. So I think it should be the first one until someone interested in the second one appears.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Ping-Test in test/suites/test_dml.py ungefähr in den Zeilen 145–150 und sieh dir PR #213 wegen des Windows-CI-Kontexts an. Prüfe, wie der Test das Ping-Ergebnis misst und bestätigt, und ermittle anschließend die dokumentierte Windows-Präzision sowie das für ein zuverlässiges Ergebnis erforderliche Testverhalten. Fertig ist die Aufgabe, wenn der Ping-Test nicht mehr wegen der Uhrpräzision von Windows fehlschlägt und seine Präzisionserwartungen dokumentiert sind, sofern zutreffend.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100