-
Notifications
You must be signed in to change notification settings - Fork 260
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
Allow AssemblyCleanup/ClassCleanup to have TestContext parameter #4387
base: main
Are you sure you want to change the base?
Conversation
Copilot
AI
left a comment
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 reviewed 5 out of 9 changed files in this pull request and generated 2 comments.
Files not reviewed (4)
- src/Adapter/MSTestAdapter.PlatformServices/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
- src/Adapter/MSTest.TestAdapter/Execution/ClassCleanupManager.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Execution/TestAssemblyInfo.cs: Evaluated as low risk
- src/Adapter/MSTest.TestAdapter/Execution/TestExecutionManager.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs:494
- Passing
null!
forTestContext
can lead to aNullReferenceException
if the method expects aTestContext
parameter. Ensure a validTestContext
is passed.
ClassCleanupException = classCleanupMethod is not null ? InvokeCleanupMethod(classCleanupMethod, BaseClassCleanupMethods.Count, null!) : null;
src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs:499
- Passing
null!
forTestContext
can lead to aNullReferenceException
if the method expects aTestContext
parameter. Ensure a validTestContext
is passed.
ClassCleanupException = InvokeCleanupMethod(classCleanupMethod, baseClassCleanupQueue.Count, null!);
src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs:367
- The new ForceCleanup method signature should be covered by tests to ensure that the sourceLevelParameters and logger are correctly passed and utilized.
internal void ForceCleanup(IDictionary<string, object?> sourceLevelParameters, IMessageLogger logger) => ClassCleanupManager.ForceCleanup(_typeCache, sourceLevelParameters, logger);
src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.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.
LGTM
Fixes #4233