Stabilize immediate WaitsFor assertion test - #6576
Conversation
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
Greptile SummaryThis PR makes the immediate
Confidence Score: 5/5The PR appears safe to merge with no actionable issues identified. The revised test directly verifies first-attempt success, and the polling implementation invokes the assertion factory once per attempt and exits immediately when that assertion passes.
|
| Filename | Overview |
|---|---|
| tests/TUnit.Assertions.Tests/WaitsForAssertionTests.cs | Replaces a flaky elapsed-time assertion with an exact invocation-count check that matches WaitsFor polling semantics. |
Reviews (1): Last reviewed commit: "test: remove WaitsFor timing flake" | Re-trigger Greptile
Code reviewVerified the change against the actual No bugs found, and no CLAUDE.md violations — this is a test-only change with no core engine metadata, source-gen, or public API impact, so the dual-mode/snapshot/AOT rules don't apply here. One optional, non-blocking observation for future consistency: several other tests in this same file rely on the same environment-sensitive pattern this PR eliminated — e.g. |
Summary
WaitsFortest with an exact attempt-count assertionRoot cause
Ubuntu CI exceeded the test's 100 ms threshold by 0.6408 ms under load even though the assertion passed immediately. Elapsed time was an indirect and environment-sensitive proxy for retry behavior.
Impact
The test now checks the intended behavior deterministically and no longer flakes on slow CI runners.
Validation
dotnet test tests/TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj --configuration Release --framework net10.0 --no-build --treenode-filter "/*/*/WaitsForAssertionTests/*"— 27 passedOriginating failure: https://github.com/thomhurst/TUnit/actions/runs/31318658536/job/93257973205