anthonyoteri / anthonyoteri/cargo-rigtest

Transient-only retry policy (retry infra failures, never assertions)

Đang mở
#98 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
AI Generated enhancement
Ngôn ngữ chính
Rust
Star
0
Fork
0
Merge trung bình
3 ngày 18 giờ
Pull request đã merge (30 ngày)
8

Mô tả

## Problem

`retries = N` retries on *any* failure, which can mask a real assertion bug. `retry_on_error = ` avoids that but requires threading typed error variants through the test signature. The common need — "retry only on transient infra errors (connection reset / timeout), never on an assertion failure" — is verbose to express.

## Proposal

A built-in transient-only retry mode:

```rust
#[testcase(retries = 2, retry_on = transient)]
async fn t(ctx: Arc) -> Result<(), rigtest::Error> { Ok(()) }
```

- `retry_on = transient` retries on setup-phase failures / a provided error predicate, and **never** on assertion panics.
- Optionally allow registering a global "is this error transient?" classifier for the suite.

## Why

Makes flaky-infra resilience a one-liner without risking a masked regression — assertion failures stay loud, transient blips self-heal. Report the retry count per case so flakiness stays visible.

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

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Trace the existing #[testcase] handling for retries and retry_on_error, including how setup errors and assertion panics are distinguished. Define and test transient-only behavior so matching setup failures retry, assertion panics never do, and each case reports its retry count; also resolve whether suite-wide classification is required.

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

Đánh giá

Công nghệ
rust
Lĩnh vực
testing
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ 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.