-
Notifications
You must be signed in to change notification settings - Fork 288
Obsolete CancelledTestNodeStateProperty #6828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…categories Co-authored-by: Youssef1313 <[email protected]>
src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.Categories.cs
Show resolved
Hide resolved
test/UnitTests/Microsoft.Testing.Platform.UnitTests/Services/TestApplicationResultTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Any occurrence of CancelledTestNodeStateProperty in the codebase should be surrounded by #pragma warning disable CS0618 // Type or member is obsolete and #pragma warning restore CS0618 // Type or member is obsolete
Co-authored-by: Youssef1313 <[email protected]>
…y usages Co-authored-by: Youssef1313 <[email protected]>
Done. Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not opposed to that obsolescence but I am curious as to why? The original design was to say we have 2 parent states success and failure and sub-states from these states allowing to define more precisely the kind of issue so that clients (e.g. Console, IDE...) can make specialized display.
|
I don't see any possible meaningful usage of CancelledTestNodeStateProperty. Happy to discuss if you have examples though. |
Obsolete CancelledTestNodeStateProperty - COMPLETE ✅
Based on the issue discussion and agent instructions, the
CancelledTestNodeStatePropertyshould not have been introduced. When cancellation is requested, test frameworks should throwOperationCanceledExceptionusing the cancellation token passed by Microsoft.Testing.Platform, rather than reporting a cancelled test state.All changes completed:
[Obsolete]attribute toCancelledTestNodeStatePropertyclass inTestNodeProperties.cswith clear guidance messageCancelledTestNodeStatePropertyinWellKnownTestNodeTestRunOutcomeFailedPropertiesandWellKnownTestNodeTestRunOutcomePropertiesarrays with suppressed obsolete warningsCancelledTestNodeStatePropertyin the codebaseFiles updated with pragma warning suppressions:
TestNodeProperties.Categories.cs(2 occurrences)HangDumpActivityIndicator.cs(1 occurrence)MSBuildConsumer.cs(1 occurrence)TerminalOutputDevice.cs(1 occurrence)BrowserOutputDevice.cs(1 occurrence)DotnetTestDataConsumer.cs(1 occurrence)Json.cs(1 occurrence)PerRequestServerDataConsumerService.cs(1 occurrence)SerializerUtilities.cs(1 occurrence)AzureDevOpsReporter.cs(1 occurrence)TestExecutionContext.cs(1 occurrence - MSTest.Engine)TestApplicationResultTests.cs(1 occurrence)TestNodePropertiesTests.cs(already has file-level suppression)Impact:
CancelledTestNodeStatePropertyis marked as obsolete to discourage its useSecurity Summary:
No security vulnerabilities introduced or identified in the changes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.