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. |
Updated [TUnit](https://github.com/thomhurst/TUnit) from 1.64.6 to 1.64.13. <details> <summary>Release notes</summary> _Sourced from [TUnit's releases](https://github.com/thomhurst/TUnit/releases)._ ## 1.64.13 <!-- Release notes generated using configuration in .github/release.yml at v1.64.13 --> ## What's Changed ### Other Changes * Stabilize immediate WaitsFor assertion test by @thomhurst in thomhurst/TUnit#6576 * fix: Allow Item.Member after HasSingleItem by @SnakyBeaky in thomhurst/TUnit#6583 ### Dependencies * chore(deps): update tunit to 1.64.6 by @thomhurst in thomhurst/TUnit#6577 * chore(deps): update dependency nsubstitute to 6.2.0 by @thomhurst in thomhurst/TUnit#6580 * chore(deps): update dependency microsoft.playwright to 1.62.0 by @thomhurst in thomhurst/TUnit#6582 * chore(deps): update dependency microsoft.net.stringtools to 18.9.6 by @thomhurst in thomhurst/TUnit#6584 ## New Contributors * @SnakyBeaky made their first contribution in thomhurst/TUnit#6583 **Full Changelog**: thomhurst/TUnit@v1.64.6...v1.64.13 Commits viewable in [compare view](thomhurst/TUnit@v1.64.6...v1.64.13). </details> Updated [TUnit.AspNetCore](https://github.com/thomhurst/TUnit) from 1.64.6 to 1.64.13. <details> <summary>Release notes</summary> _Sourced from [TUnit.AspNetCore's releases](https://github.com/thomhurst/TUnit/releases)._ ## 1.64.13 <!-- Release notes generated using configuration in .github/release.yml at v1.64.13 --> ## What's Changed ### Other Changes * Stabilize immediate WaitsFor assertion test by @thomhurst in thomhurst/TUnit#6576 * fix: Allow Item.Member after HasSingleItem by @SnakyBeaky in thomhurst/TUnit#6583 ### Dependencies * chore(deps): update tunit to 1.64.6 by @thomhurst in thomhurst/TUnit#6577 * chore(deps): update dependency nsubstitute to 6.2.0 by @thomhurst in thomhurst/TUnit#6580 * chore(deps): update dependency microsoft.playwright to 1.62.0 by @thomhurst in thomhurst/TUnit#6582 * chore(deps): update dependency microsoft.net.stringtools to 18.9.6 by @thomhurst in thomhurst/TUnit#6584 ## New Contributors * @SnakyBeaky made their first contribution in thomhurst/TUnit#6583 **Full Changelog**: thomhurst/TUnit@v1.64.6...v1.64.13 Commits viewable in [compare view](thomhurst/TUnit@v1.64.6...v1.64.13). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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