Tests trying to find unused ports are flakey when automated
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- networking, testing
Hướng nghiên cứu
Bắt đầu trong tests/test_tcp.py, đặc biệt là các test sử dụng find_free_port xung quanh test_create_server_5 và test_create_server_6. Tái hiện các lỗi trong môi trường tự động hoặc bận, sau đó đánh giá việc sử dụng cổng 0, một socket IPv4/IPv6 dùng chung hoặc thử lại việc tạo socket đầu tiên. Công việc được hoàn tất khi các test không còn thất bại vì cổng đã chọn đang được sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- uvloop version: 0.17.0
- Python version: 3.10
- Platform: nix/darwin
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: N/A - Does uvloop behave differently from vanilla asyncio? How?: N/A
The tests using find_free_port (like https://github.com/MagicStack/uvloop/blob/d2deffefa18653636eb03ea77a5dab6e4febf6c6/tests/test_tcp.py#L252) may fail in busy CI environments. For example building for nixpkgs involves running tests every time. It ends up with: (https://hydra.nixos.org/build/197525892/nixlog/1)
=================================== FAILURES ===================================
_______________________ Test_UV_TCP.test_create_server_5 _______________________
Traceback (most recent call last):
File "/private/tmp/tmp.xkcj6kx4o4/tests/test_tcp.py", line 245, in test_create_server_5
self.loop.run_until_complete(runner())
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/private/tmp/tmp.xkcj6kx4o4/tests/test_tcp.py", line 238, in runner
srv = await self.loop.create_server(
File "uvloop/loop.pyx", line 1790, in create_server
OSError: [Errno 48] error while attempting to bind on address ('::', 50000, 0, 0): address already in use
_______________________ Test_UV_TCP.test_create_server_6 _______________________
Traceback (most recent call last):
File "/private/tmp/tmp.xkcj6kx4o4/tests/test_tcp.py", line 271, in test_create_server_6
self.loop.run_until_complete(runner())
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/private/tmp/tmp.xkcj6kx4o4/tests/test_tcp.py", line 255, in runner
srv1 = await self.loop.create_server(
File "uvloop/loop.pyx", line 1790, in create_server
OSError: [Errno 48] error while attempting to bind on address ('::', 50000, 0, 0): address already in use
=============================== warnings summary ===============================
Do those tests need to use a common ipv4/6 socket? Could they use only one protocol at a time with port 0 and then get the local port number from the result?
Or maybe build the retry loop around the first socket creation rather than 2 independent steps?
- Ngôn ngữ chính
- Cython
- Star
- 11.9k
- Fork
- 615
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MagicStack/uvloop
-
License not clear Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MagicStack/uvloop#759 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MagicStack/uvloop#741 · 2 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MagicStack/uvloop#702 · 8 bình luận · 9 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
MagicStack/uvloop#766 ·
-
Directly constructed subprocess pipe protocols segfault when callbacks use a non-process owner Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
MagicStack/uvloop#765 ·
Tất cả issue của MagicStack/uvloop
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
home-assistant/supervisor#7248 ·
-
bug cert blocker needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
project-chip/connectedhomeip#74373 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
sonic-net/sonic-mgmt#28113 ·
-
kind/bug kind/community-report needs/triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100