Skip to content

KestrelMetricsTests.Http2Connection_ServerShutdown_Abort intermittently misses shutdown metric #70583

Open

Agent suggestions

Public preview

Description

@mmitche

Failing Test(s)

  • Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.KestrelMetricsTests.Http2Connection_ServerShutdown_Abort

Error Message

Assert.Collection() Failure: Mismatched item count
Collection: []
Expected count: 1
Actual count: 0

Stacktrace

Details
at Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.KestrelMetricsTests.Http2Connection_ServerShutdown_Abort() in /_/src/Servers/Kestrel/test/InMemory.FunctionalTests/KestrelMetricsTests.cs:line 838

Logs

Details
Unavailable: dev.azure.com DNS resolution failed during the automated run and one bounded recheck. The GitHub Build Analysis check retained the test identity, error, stack, and platform, but not the complete Helix log or timeline attempt history.

Build

Build 1674206

Content from an automated Copilot CI-flakiness triage run.

Failure

The HTTP/2 shutdown metrics test completed server shutdown but observed no kestrel.connection.duration measurement, failing the PR's final-head Windows build.

Possible cause

The test snapshots MetricCollector immediately after shutdown, while comparable HTTP/2 metrics tests wait for WaitForMeasurementsAsync(minCount: 1) before asserting. The likely cause is an observation race between shutdown completion and metric-listener delivery, but the inaccessible Azure timeline prevents confirmation of the exact attempt and recovery sequence.

Affected builds and PRs

PR PR target branch Build(s) Notes
#70453 main Failed build 1674206 Windows amd64 VS 2026; the metric collection was empty when one shutdown duration measurement was expected.

Related implementation: #70582. Fork triage history: mmitche/AspNetCore#47.

Activity

  1. added
    area-networking
    on Nov 13, 2026
  2. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    Triage Summary

    Area: area-networking (Kestrel in-memory functional test, KestrelMetricsTests)
    Type: Task (flaky test failure; test maintenance)

    Potential Duplicates

    • None found

    Notes

    Generated by Issue Triage Agent for dotnet/aspnetcore for #70583 · copilot · auto · 21.9 AIC · ⌖ 1.04 AIC · ⊞ 7.6K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingfeature-kestreltest-failure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions