[dev-v5] Remove suppression of the xUnit1069 warning - #5216
Open
Denis Voituron (dvoituron) wants to merge 3 commits into
Open
[dev-v5] Remove suppression of the xUnit1069 warning #5216Denis Voituron (dvoituron) wants to merge 3 commits into
Denis Voituron (dvoituron) wants to merge 3 commits into
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
September 1, 2026 13:39
Denis Voituron (dvoituron)
enabled auto-merge (squash)
September 1, 2026 13:40
Copilot started reviewing on behalf of
Denis Voituron (dvoituron)
September 1, 2026 13:40
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the project-level suppression of xUnit analyzer warning xUnit1069 and updates several bUnit/xUnit tests to explicitly observe the xUnit-provided cancellation token (via Xunit.TestContext.Current.CancellationToken) so timeouts/cancellations are honored.
Changes:
- Removed
xUnit1069from<NoWarn>in the unit test project to re-enable analyzer enforcement. - Added explicit cancellation-token checks (
ThrowIfCancellationRequested) at the start of many async tests. - Updated a few awaits to use
WaitAsync(..., CancellationToken)so cancellation can be observed while awaiting tasks.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Core/Components/Toast/FluentToastProviderTests.razor | Adds test cancellation checks and uses WaitAsync in one async flow. |
| tests/Core/Components/MessageBar/FluentMessageBarProviderTests.razor | Adds cancellation checks broadly and uses WaitAsync for an awaited result. |
| tests/Core/Components/Dialog/FluentMessageBoxTests.razor | Adds cancellation checks to multiple dialog tests and uses WaitAsync in one case. |
| tests/Core/Components/Dialog/FluentDrawerTests.razor | Adds cancellation checks and replaces one Task.CompletedTask await with WaitAsync(ct). |
| tests/Core/Components/Dialog/FluentDialogTests.razor | Adds cancellation checks at the start of many timeout-based tests. |
| tests/Core/Components.Tests.csproj | Removes xUnit1069 from <NoWarn> to enforce analyzer guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.3%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[dev-v5] Remove suppression of the xUnit1069 warning
Implement cancellation token support in Unit Tests.
Remove suppression of the xUnit1069 warning to ensure proper cancellation token checks in tests.
This change enhances test reliability and compliance with cancellation practices.
Unit Tests
No changes