Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

caseworkctl public_jwks test can fail when another test takes its port

Đã đóng Phù hợp với người mới
#1,623 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu trong crates/registry-caseworkctl/src/dev/public_jwks.rs tại dev::public_jwks::tests::serves_only_public_keys_and_releases_its_listener, và kiểm tra cách cổng tạm thời cùng probe giải phóng được xử lý. Chạy test có tên bằng parallel cargo test. Được xem là hoàn tất khi assertion giải phóng không còn thất bại vì một test khác tạm thời chiếm cổng đã chọn, đồng thời vẫn xác minh rằng server giải phóng listener của nó.

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

Mô tả

area:casework bug criticality:p3 triage:needs-implementation

dev::public_jwks::tests::serves_only_public_keys_and_releases_its_listener in crates/registry-caseworkctl/src/dev/public_jwks.rs failed once in the Rust workspace job on 2026-09-27, on a PR that changed no Rust code:

panicked at crates/registry-caseworkctl/src/dev/public_jwks.rs:159:21:
`Result::unwrap()` on an `Err` value: the explicit public JWKS port is occupied
caused by: Address already in use (os error 98)

A re-run passed.

Suspected cause (not reproduced; about 70% confident)

The test picks a port by binding 127.0.0.1:0 and dropping that listener, starts the server on the port, then after drop(server) calls probe(port) to prove the listener was released. Under parallel cargo test, another test can bind the same ephemeral port in either gap, so the release check fails even though the server did release it.

Fix direction

Test-only. Make the release assertion independent of other processes on the machine, for example by retrying the probe briefly, or by asserting on the server's own socket rather than on the port being free. The production code path is not implicated.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
8 giờ 10 phút
Pull request đã merge (30 ngày)
222

Chuẩn bị môi trường

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.

Issue khác của registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

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.