tarantool / tarantool/tarantool-python

Ping test fails because of Windows time precision

Abierto
#214 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug ci
Lenguaje dominante
Python
Estrellas
108
Forks
51
Merge medio
1 d 8 h
PR fusionados (30 d)
1

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con la prueba de ping en test/suites/test_dml.py alrededor de las líneas 145-150 y revisa PR #213 para conocer el contexto de Windows CI. Comprueba cómo la prueba mide y verifica el resultado del ping y, a continuación, determina la precisión documentada de Windows y el comportamiento de la prueba necesario para obtener un resultado fiable. Se considera terminado cuando la prueba de ping ya no falla debido a la precisión del reloj de Windows y sus expectativas de precisión están documentadas, si corresponde.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing-qa
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.