Re-enable Microsoft.Extensions.Hosting FunctionalTests/TestApp shutdown coverage across local and Helix environments#128252
Conversation
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/f2762648-8aaf-44cd-a0bb-269b2a6b371d Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
|
@copilot , the shutdown tests are failing with this error on helix machines: Comments Error message Stack trace |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/e8bb9c1b-1794-4ebc-a563-bec6823fec1c Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
... Fixed in b9cd702. I removed the source-tree lookup and switched the shutdown tests to run TestApp from the deployed test output ( |
|
@copilot , this time it failed with this error: Test Failures (700 tests failed) ❌ Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun [Console] [Details] [Artifacts] [0.70% failure rate] |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/a1953635-73f1-414e-9fc3-75367c72699e Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
Fixed in 609f415. I updated Hosting FunctionalTests process cleanup to handle environments where |
|
@copilot , now the error is this: Test Failures (700 tests failed) ❌ Microsoft.AspNetCore.Hosting.FunctionalTests.ShutdownTests.ShutdownTestRun [Console] [Details] [Artifacts] [0.79% failure rate] |
|
@copilot fix it (the previous post with the error) |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/553de7ef-ead5-4cc6-adbb-ff2eda8d0c24 Co-authored-by: rosebyte <14963300+rosebyte@users.noreply.github.com>
Fixed in 3599810. I removed the Unix cleanup dependency on the external
Addressed in 3599810 with the same fix: process termination no longer shells out to |
Description
Microsoft.Extensions.Hostingfunctional shutdown tests were effectively dead code: they were globally suppressed and pointed at an empty app path, so they never executed meaningful TestApp coverage.This PR re-enables those tests, restores TestApp execution, and hardens Helix behavior for environments that differ from local developer machines.
FunctionalTests/TestApp wiring
applicationPath = string.Emptypath.DeploymentParameters.ApplicationNametoMicrosoft.Extensions.Hosting.TestAppso deploy/run targets the correct assembly.AppContext.BaseDirectoryinstead of repository-root discovery.ApplicationPublisheroverride in the test to use existing deployed output on Helix instead of requiringMicrosoft.Extensions.Hosting.TestApp.csprojin the workitem.Re-enable test execution
IgnoreForCIfromMicrosoft.Extensions.Hosting.Functional.Tests.csproj.ActiveIssueassembly-level suppression fromFunctionalTests/Properties/AssemblyInfo.cs.Helix robustness follow-up
ProcessExtensions.GetAllChildIdsUnixto gracefully handleWin32Exceptionwhenpgrepcannot be started (for example on minimal Helix environments).ProcessExtensions.KillProcessUnixto use managedProcess.GetProcessById(...).Kill()instead of shelling out to the externalkillcommand.Testing
./build.sh clr+libs -rc releasedotnet build /t:test ./tests/FunctionalTests/Microsoft.Extensions.Hosting.Functional.Tests.csproj