fix: update ExternalCancellationTests documentation and add ExcludeOn attribute for Windows#4059
fix: update ExternalCancellationTests documentation and add ExcludeOn attribute for Windows#4059
Conversation
Code Review - PR #4059SummaryThis PR addresses Windows CI issues by adding the [ExcludeOn(OS.Windows)] attribute to ExternalCancellationTests and improves the documentation with a detailed explanation of why these tests are skipped on Windows. Strengths
Code Quality
Considerations
VerdictApproved This is a clean, well-documented fix that appropriately handles platform-specific limitations. The documentation is particularly well-written and provides excellent context for future developers. Reviewed following TUnit's development guidelines (CLAUDE.md) |
… attribute for Windows
61ad250 to
76bba5b
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue with ExternalCancellationTests on Windows by adding comprehensive documentation explaining the platform limitation and applying the ExcludeOn attribute to skip these tests on Windows, where CliWrap's graceful cancellation doesn't work reliably.
Key Changes:
- Added detailed
<remarks>documentation explaining why tests are skipped on Windows (CliWrap'sGenerateConsoleCtrlEventlimitation with child processes) - Applied
[ExcludeOn(OS.Windows)]attribute to the test class to prevent execution on Windows - Added necessary
using TUnit.Core.Enumsimport
Pull Request Review - ExternalCancellationTests Windows Exclusion✅ SummaryThis PR appropriately addresses Windows CI failures by excluding tests that rely on CliWrap's graceful cancellation mechanism, which has known issues on Windows. Code Quality: ✅ ExcellentPositives:
Implementation: ✅ CorrectTechnical Analysis:
Potential Concerns:
|
…trixDataSource Change MatrixDataSourceAttribute to convert underlying type values back to enum instances using Enum.ToObject(), so ArgumentFormatter.FormatDefault() correctly identifies them as enums and displays their names (e.g., "ToEven") instead of numeric values (e.g., "0"). Fixes: #4059 Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
* Initial plan * Use enum names instead of numeric values for test display names in MatrixDataSource Change MatrixDataSourceAttribute to convert underlying type values back to enum instances using Enum.ToObject(), so ArgumentFormatter.FormatDefault() correctly identifies them as enums and displays their names (e.g., "ToEven") instead of numeric values (e.g., "0"). Fixes: #4059 Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> * Move enum display name logic to ArgumentFormatter instead of changing parameter injection Revert MatrixDataSourceAttribute.cs to original (no changes to parameter injection/exclusion logic). Instead, add a parameter-type-aware Format overload to ArgumentFormatter that converts numeric values to enum names for display only. Updated callers: TestContext.GetDisplayName(), DisplayNameAttribute, DisplayNameSubstitutor. Updated PublicAPI snapshots for the new public method. Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> * Address review feedback: handle null ToString and catch specific exception type Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
No description provided.