tarantool / tarantool/tarantool-python
Ping test fails because of Windows time precision
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 108
- 派生
- 51
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 1
描述
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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 test/suites/test_dml.py 中大约第 145-150 行的 ping 测试开始,并查看 PR #213 以了解 Windows CI 上下文。检查测试如何测量并断言 ping 结果,然后确定已记录的 Windows 精度,以及获得可靠结果所需的测试行为。完成的标准是:ping 测试不再因 Windows 时钟精度而失败,并且在适用的情况下,其精度预期已被记录。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing-qa
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100