Repository navigation
Wait for the shutdown duration metric in the HTTP/2 abort test - #70624
Closed
joshbarros wants to merge 1 commit into
Closed
joshbarros wants to merge 1 commit into
joshbarros wants to merge 1 commit into
Conversation
Http2Connection_ServerShutdown_Abort read the MetricCollector snapshot right after server shutdown. Metric-listener delivery can land just after shutdown completes, so the collection was empty and the test failed intermittently. Wait for at least one measurement, as the comparable HTTP/2 metrics tests already do. Fixes dotnet#70583
joshbarros
requested review from
BrennanConroy,
SamMonoRT and
halter73
as code owners
November 16, 2026 17:33
Contributor
|
Thanks for your PR, @joshbarros. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Member
|
Dupe of #70582 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Http2Connection_ServerShutdown_Abortread theMetricCollectorsnapshot immediately afterserver.DisposeAsync()completed. Metric-listener delivery can land just after shutdown, so the collection was occasionally empty and the test failed withExpected count: 1, Actual count: 0.Wait for at least one measurement before asserting, matching the comparable HTTP/2 metrics tests in the same file (
WaitForMeasurementsAsync(minCount: 1)).Validation
dotnet test src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj --filter "FullyQualifiedName~KestrelMetricsTests": 21 passed, 0 failed.Fixes #70583