tarantool / tarantool/tarantool-python
Ping test fails because of Windows time precision
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 108
- Forks
- 51
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 1
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le test de ping dans test/suites/test_dml.py autour des lignes 145-150 et consultez PR #213 pour le contexte de Windows CI. Vérifiez comment le test mesure et vérifie le résultat du ping, puis déterminez la précision documentée de Windows ainsi que le comportement du test nécessaire pour obtenir un résultat fiable. Le travail est terminé lorsque le test de ping n’échoue plus à cause de la précision de l’horloge de Windows et que ses attentes en matière de précision sont documentées, le cas échéant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- testing-qa
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100