tarantool / tarantool/tarantool-python
Ping test fails because of Windows time precision
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 108
- フォーク
- 51
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
test/suites/test_dml.py の 145-150 行付近にある ping テストから始め、Windows CI のコンテキストについて PR #213 を確認してください。テストが ping の結果をどのように測定してアサートしているかを確認し、そのうえで、文書化されている Windows の精度と、信頼できる結果に必要なテストの動作を判断してください。完了の条件は、Windows のクロック精度が原因で ping テストが失敗しなくなり、該当する場合はその精度に関する期待値が文書化されていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100