You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Test Improver — an automated AI assistant focused on improving tests.
Goal
Apply two quality improvements to LoggingManagerTests.cs that were explicitly requested by Evangelink in the review on #8129. This is a clean PR that touches only the test file.
Only test/UnitTests/Microsoft.Testing.Platform.UnitTests/Logging/LoggingManagerTests.cs is modified.
1. Explicit discard for factory.CreateLogger() calls
All factory.CreateLogger(...) calls changed to _ = factory.CreateLogger(...).
Why: These calls are made purely for their side-effect (triggering the mock). Using _ = signals clearly that the discard is intentional, matching the pattern in sibling file LoggerFactoryTests.cs.
2. New test: BuildAsync_MultipleProviders_OnlyIncludesEnabledOnes
Registers a disabled IExtension provider and an enabled plain ILoggerProvider simultaneously, then verifies:
The disabled extension provider's CreateLogger is never called
The enabled provider's CreateLogger is called exactly once
Why: Covers the foreach ... continue loop in LoggingManager.BuildAsync. A bug that inadvertently skips the next provider after a disabled one would previously have gone undetected.
Test Status
✅ All 22 tests pass (net8.0 + net9.0, 11 existing × 2 TFMs + 1 new × 2 TFMs)
The bundle file is available in the agent artifact in the workflow run linked above.
To create a pull request with the changes:
# Download the artifact from the workflow run
gh run download 25783202174 -n agent -D /tmp/agent-25783202174
# Fetch the bundle into a local branch
git fetch /tmp/agent-25783202174/aw-test-assist-logging-manager-quality-improvements-2026-05-13.bundle refs/heads/test-assist/logging-manager-quality-improvements-2026-05-13:refs/heads/test-assist/logging-manager-quality-improvements-2026-05-13-e0eb44af6c564a7e
git checkout test-assist/logging-manager-quality-improvements-2026-05-13-e0eb44af6c564a7e
# Push the branch to origin
git push origin test-assist/logging-manager-quality-improvements-2026-05-13-e0eb44af6c564a7e
# Create the pull request
gh pr create --title '[Test Improver] test: improve LoggingManagerTests quality' --base main --head test-assist/logging-manager-quality-improvements-2026-05-13-e0eb44af6c564a7e --repo microsoft/testfx
🤖 Test Improver — an automated AI assistant focused on improving tests.
Goal
Apply two quality improvements to
LoggingManagerTests.csthat were explicitly requested by Evangelink in the review on #8129. This is a clean PR that touches only the test file.Closes #8140
Changes
Only
test/UnitTests/Microsoft.Testing.Platform.UnitTests/Logging/LoggingManagerTests.csis modified.1. Explicit discard for
factory.CreateLogger()callsAll
factory.CreateLogger(...)calls changed to_ = factory.CreateLogger(...).Why: These calls are made purely for their side-effect (triggering the mock). Using
_ =signals clearly that the discard is intentional, matching the pattern in sibling fileLoggerFactoryTests.cs.2. New test:
BuildAsync_MultipleProviders_OnlyIncludesEnabledOnesRegisters a disabled
IExtensionprovider and an enabled plainILoggerProvidersimultaneously, then verifies:CreateLoggeris never calledCreateLoggeris called exactly onceWhy: Covers the
foreach ... continueloop inLoggingManager.BuildAsync. A bug that inadvertently skips the next provider after a disabled one would previously have gone undetected.Test Status
✅ All 22 tests pass (net8.0 + net9.0, 11 existing × 2 TFMs + 1 new × 2 TFMs)
Coverage Impact
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.To create a pull request with the changes: