Skip to content

Re-enable Microsoft.Extensions.Hosting FunctionalTests/TestApp shutdown coverage#128252

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/enable-functional-tests-on-hosting
Draft

Re-enable Microsoft.Extensions.Hosting FunctionalTests/TestApp shutdown coverage#128252
Copilot wants to merge 2 commits into
mainfrom
copilot/enable-functional-tests-on-hosting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

Microsoft.Extensions.Hosting functional 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 updates the tests to use the in-repo TestApp again and removes the suppression that prevented them from running.

  • FunctionalTests/TestApp wiring

    • Replaced the disabled applicationPath = string.Empty path with repository-root discovery logic for tests/TestApp.
    • Set DeploymentParameters.ApplicationName to Microsoft.Extensions.Hosting.TestApp so deploy/run targets the correct published assembly.
  • Re-enable test execution

    • Removed IgnoreForCI from Microsoft.Extensions.Hosting.Functional.Tests.csproj.
    • Removed ActiveIssue assembly-level suppression from FunctionalTests/Properties/AssemblyInfo.cs.
var deploymentParameters = new DeploymentParameters(
    applicationPath,
    RuntimeFlavor.CoreClr,
    RuntimeArchitecture.x64)
{
    ApplicationName = "Microsoft.Extensions.Hosting.TestApp",
    TargetFramework = $"net{version.Major}.{version.Minor}",
    ApplicationType = ApplicationType.Portable,
    PublishApplicationBeforeDeployment = true,
    StatusMessagesEnabled = false
};

Fixes #34090

Copilot AI requested review from Copilot and removed request for Copilot May 15, 2026 12:32
Copilot AI linked an issue May 15, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 15, 2026
Copilot AI requested review from Copilot and removed request for Copilot May 15, 2026 13:03
Copilot AI changed the title [WIP] Fix FunctionalTests/TestApp on Extensions Hosting Re-enable Microsoft.Extensions.Hosting FunctionalTests/TestApp shutdown coverage May 15, 2026
Copilot AI requested a review from rosebyte May 15, 2026 13:07
@github-actions github-actions Bot added area-Extensions-Hosting and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 15, 2026
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.

Enable FunctionalTests/TestApp on Extensions Hosting

2 participants