Skip to content

[HTTP] Fix PING test for 0 lifetime connection #117077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

ManickaP
Copy link
Member

Fixes #116862

  • Separates the test for 0 lifetime, it has to have a different logic since the connection will get closed after the first request.
  • Fixes PING frame counting to exclude RTT related PINGs.

@Copilot Copilot AI review requested due to automatic review settings June 27, 2025 07:47
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@ManickaP
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@Copilot 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 improves HTTP/2 keep-alive ping tests by handling zero‐lifetime connections separately and excluding RTT-related pings from the counter.

  • Adds a dedicated test (KeepAliveConfigured_KeepAlivePingsAreSentEvenWith0ConnectionLifetime) to verify pings are still sent when PooledConnectionLifetime is zero.
  • Simplifies the existing policy-based test by removing the lifetime parameter cases.
  • Modifies ProcessIncomingFramesAsync to only count real pings (pingFrame.Data >= 0), ignoring RTT pings.
Comments suppressed due to low confidence (1)

src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2KeepAlivePing.cs:342

  • Consider adding a unit test that simulates RTT-related PING frames (with Data < 0) to verify that these frames are correctly excluded from the ping counter.
                            if (pingFrame.Data >= 0)

Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@ManickaP
Copy link
Member Author

/ba-g failures are unrelated

@ManickaP ManickaP merged commit f91b0b5 into dotnet:main Jun 30, 2025
81 of 96 checks passed
@ManickaP ManickaP deleted the http-ping-test branch June 30, 2025 06:59
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.

[HTTP] Outerloop PING test timeout
2 participants