Skip to content

Cleanup TestProgressState#50056

Merged
nohwnd merged 13 commits intomainfrom
dev/ygerges/cleanup-TestProgressState
Aug 11, 2025
Merged

Cleanup TestProgressState#50056
nohwnd merged 13 commits intomainfrom
dev/ygerges/cleanup-TestProgressState

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 commented Aug 5, 2025

Closes #48369

Copilot AI review requested due to automatic review settings August 5, 2025 15:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the TestProgressState class to improve code clarity and maintainability by consolidating duplicate logic and removing unused properties. The main focus is on cleaning up the test result reporting mechanism.

Key changes:

  • Refactored three similar test reporting methods into a single generic method
  • Removed unused properties (ExitCode, FlakyTests) and comments
  • Added comprehensive test coverage for the TestProgressState class

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs New comprehensive test file covering all scenarios for TestProgressState functionality
src/Cli/dotnet/Commands/Test/TestApplicationEventHandlers.cs Removed outdated TODO comment about handling duplicate test results
src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs Major refactoring - consolidated duplicate logic into ReportGenericTestResult method and removed unused properties
src/Cli/dotnet/Commands/Test/Terminal/TerminalTestReporter.cs Removed unused flaky test tracking logic and ExitCode property usage
Comments suppressed due to low confidence (1)

test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs:46

  • The test is missing FluentAssertions using statement. The Should() extension method requires 'using FluentAssertions;' to be added to the imports.
                state.SkippedTests.Should().Be(1);

Comment thread test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs Outdated
Comment thread src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs
Comment thread src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs
Comment thread src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs
@Youssef1313 Youssef1313 force-pushed the dev/ygerges/cleanup-TestProgressState branch from ebbadf2 to 2f75af6 Compare August 5, 2025 15:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs Outdated
Comment thread test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs
Comment thread src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs Outdated
Comment thread test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs Outdated
Comment thread src/Cli/dotnet/Commands/Test/Terminal/TestProgressState.cs
Comment thread test/dotnet.Tests/CommandTests/Test/TestProgressStateTests.cs Outdated
@nohwnd nohwnd merged commit f3569b1 into main Aug 11, 2025
27 checks passed
@nohwnd nohwnd deleted the dev/ygerges/cleanup-TestProgressState branch August 11, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet test for MTP - Retry] Consider only re-tried test nodes when subtracting failures

3 participants