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
RetryExtensions.AddRetryProvider — the public entry point that wires the entire retry-failed-tests feature onto an ITestApplicationBuilder (command-line options provider, test-host application lifetime callback, data consumer/test session lifetime handler, and test-host orchestrator) — had zero direct test coverage. All existing Retry-area test files (RetryTests, RetryDataConsumerTests, RetryArgumentsBuilderTests, RetryOrchestratorHelperTests) construct the individual extension classes directly and never exercise this wiring method itself.
Approach
Added RetryExtensionsTests.cs with 3 tests using a real ITestApplicationBuilder (via TestApplication.CreateBuilderAsync):
Verifies the retry command-line options provider is discoverable end-to-end via CommandLineManager.BuildAsync.
Verifies exactly one test-host orchestrator factory is registered (via reflection on the internal _factories list, following the repo's established pattern for internal-state assertions).
Verifies the test-host application lifetime callback, data consumer, and test session lifetime handler are all registered, and that the data consumer / test session lifetime handler share the same composite-registered RetryDataConsumer singleton instance — mirroring the real TestHostBuilder build pipeline (lifecycle callbacks registered into the service provider before data consumers are built; the same alreadyBuiltServices list shared across both composite-extension build calls).
Two of the three tests reach into internal implementation details via casts to internal platform types (CommandLineManager, TestHostManager, TestHostOrchestratorManager) and one reflection-based field read (_factories), following the established pattern used throughout this test project (IVT-granted internal type casts + reflection for otherwise-unobservable internal state). This ties the tests to internal structure, but is consistent with how the rest of the Microsoft.Testing.Extensions.UnitTests project already tests similar wiring extension methods.
Note
This was originally intended as a pull request, but the git push operation failed.
Original error: The process '/usr/bin/git' failed with exit code 128
🤖 Automated content by GitHub Copilot. Generated by the Test Improver workflow. · copilot · auto · 661.5 AIC · ⌖ 13.3 AIC · ⊞ 16.8K · [◷]( · ◷) Comment /test-assist to run again
Add this agentic workflow to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/test-improver.md@main
Goal and rationale
RetryExtensions.AddRetryProvider— the public entry point that wires the entire retry-failed-tests feature onto anITestApplicationBuilder(command-line options provider, test-host application lifetime callback, data consumer/test session lifetime handler, and test-host orchestrator) — had zero direct test coverage. All existing Retry-area test files (RetryTests,RetryDataConsumerTests,RetryArgumentsBuilderTests,RetryOrchestratorHelperTests) construct the individual extension classes directly and never exercise this wiring method itself.Approach
Added
RetryExtensionsTests.cswith 3 tests using a realITestApplicationBuilder(viaTestApplication.CreateBuilderAsync):CommandLineManager.BuildAsync._factorieslist, following the repo's established pattern for internal-state assertions).RetryDataConsumersingleton instance — mirroring the realTestHostBuilderbuild pipeline (lifecycle callbacks registered into the service provider before data consumers are built; the samealreadyBuiltServiceslist shared across both composite-extension build calls).Test Status
./build.sh -restoresucceeded.dotnet build test/UnitTests/Microsoft.Testing.Extensions.UnitTests/Microsoft.Testing.Extensions.UnitTests.csproj -c Debug -f net8.0: 0 warnings, 0 errors.--filter "FullyQualifiedName~RetryExtensionsTests"): 3/3 passed.Microsoft.Testing.Extensions.UnitTestssuite (net8.0): 1879 total, 1842 succeeded, 0 failed, 37 skipped (pre-existing) — no regressions.dotnet format whitespace TestFx.slnx --verify-no-changes --include <file>: clean (only the expected harmless F#-project warning).Reproducibility
Trade-offs
Two of the three tests reach into internal implementation details via casts to internal platform types (
CommandLineManager,TestHostManager,TestHostOrchestratorManager) and one reflection-based field read (_factories), following the established pattern used throughout this test project (IVT-granted internal type casts + reflection for otherwise-unobservable internal state). This ties the tests to internal structure, but is consistent with how the rest of theMicrosoft.Testing.Extensions.UnitTestsproject already tests similar wiring extension methods.Note
This was originally intended as a pull request, but the git push operation failed.
Original error: The process '/usr/bin/git' failed with exit code 128
Workflow Run: View run details and download bundle artifact
The bundle file is available in the
agentartifact in the workflow run linked above.Create the pull request manually
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
github.comsouthcentralus0.in.applicationinsights.azure.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
Add this agentic workflow to your repo
To install this agentic workflow, run