tarantool / tarantool/tarantool-python

Ping test fails because of Windows time precision

Đang mở
#214 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug ci
Ngôn ngữ chính
Python
Star
108
Fork
51
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với bài kiểm tra ping trong test/suites/test_dml.py, khoảng các dòng 145-150, và xem lại PR #213 để hiểu ngữ cảnh Windows CI. Kiểm tra cách bài kiểm tra đo lường và kiểm tra kết quả ping, sau đó xác định độ chính xác của Windows đã được tài liệu hóa và hành vi kiểm tra cần thiết để có được kết quả đáng tin cậy. Hoàn thành khi bài kiểm tra ping không còn thất bại do độ chính xác của đồng hồ Windows và các kỳ vọng về độ chính xác của bài kiểm tra đã được tài liệu hóa nếu phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.