Skip to content

Conversation

@DeagleGross
Copy link
Member

Spotted test failing multiple times in an unrelated to Http3 \ certs PR change:
#65186

Test uses the hardcoded path to save\load the certificate:

private static string GetCertificatePath()
{
    var appData = Environment.GetEnvironmentVariable("APPDATA");
    var home = Environment.GetEnvironmentVariable("HOME");
    var basePath = appData != null ? Path.Combine(appData, "ASP.NET", "https") : null;
    basePath = basePath ?? (home != null ? Path.Combine(home, ".aspnet", "https") : null);
    return Path.Combine(basePath, $"{typeof(Http3TlsTests).Assembly.GetName().Name}.pfx");
}

and the guess is that it is corrupted between the runs. I added saving and deleting the cert after test is finished to ensure there is no effect on this between the runs. If that does not help, we should quarantine it and fix later

Fixes #65248

Copilot AI review requested due to automatic review settings January 28, 2026 11:06
@DeagleGross DeagleGross self-assigned this Jan 28, 2026
@github-actions github-actions bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Jan 28, 2026
@DeagleGross DeagleGross requested a review from wtgodbe January 28, 2026 11:06
Copy link
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 addresses test flakiness in the LoadDevelopmentCertificateViaConfiguration test by ensuring proper cleanup of certificate files between test runs. The test was failing intermittently due to corrupted certificate files persisting across test executions.

Changes:

  • Wrapped the test logic in a try-finally block to guarantee certificate file cleanup
  • Moved certificate path retrieval outside the try block for proper scoping
  • Added file deletion in the finally block to prevent file corruption between test runs

…sTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine Interop.FunctionalTests.Http3.Http3TlsTests.LoadDevelopmentCertificateViaConfiguration

1 participant