Repository navigation
Add RetryContext.FirstRunResults - #5314
Merged
Youssef Fahmy (Youssef1313) merged 2 commits intoMar 28, 2025
Merged
Conversation
Youssef Fahmy (Youssef1313)
requested review from
Copilot and
Jakub Jareš (nohwnd)
March 25, 2025 13:01
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an enhancement to support capturing the original test results before a retry by adding the OriginalResults property to RetryContext. It also updates the call sites to pass the new parameter.
- Added a new OriginalResults property and updated constructor in RetryContext.
- Modified UnitTestRunner to supply the additional parameter while constructing RetryContext.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/TestFramework/TestFramework/Attributes/TestMethod/RetryContext.cs | Added OriginalResults property and updated constructor to capture initial test results. |
| src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs | Updated the method call to pass the new 'result' parameter to RetryContext. |
Files not reviewed (1)
- src/TestFramework/TestFramework/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
Comments suppressed due to low confidence (1)
src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs:206
- Ensure that the ordering of arguments in the RetryContext constructor call reflects the intended semantics: the first parameter should be for invoking the test function and the second should correctly capture the original test results. Verify that 'result' indeed represents the original results as expected.
result));
Jakub Jareš (nohwnd)
approved these changes
Mar 28, 2025
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.
Fixes #5224