Skip to content

test: verify HTTP/2 initial stream limits are advertised - #1752

Merged
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:test/http2-initial-max-concurrent-streams
Nov 28, 2026
Merged

He-Pin merged 1 commit into
apache:mainfrom
He-Pin:test/http2-initial-max-concurrent-streams

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 27, 2026

Copy link
Copy Markdown
Member

Motivation

Have the existing ordinary client and server startup tests set distinct non-default concurrent stream values. Independently decode the actual first emitted SETTINGS bytes, and require the configured value for each endpoint. No streams are opened or production code changed.

Tests

JDK 17; both focused startup tests on Scala 2.13.18 and 3.3.9. Scoped formatting passed.

References

https://www.rfc-editor.org/rfc/rfc9113.html#section-6.5.2

Motivation:
The client and server startup tests confirm the initial SETTINGS frame type,
but do not check that a non-default concurrent stream limit reaches the peer.

Modification:
Use different positive limits for the two endpoints in the existing nonempty
SETTINGS cases and assert the single advertised value on the decoded first
outbound frame. Leave other settings and the remaining scenarios unchanged.

Result:
The tests catch a missing, duplicated, or defaulted advertisement without
opening HTTP/2 request streams or changing production code.

Tests:
- JDK 17, Scala 2.13.18 and 3.3.9: both exact-name nonempty startup tests
  passed on each axis using unchanged main production classes.
- Scoped scalafmt and git diff --check passed. Full sbt was not run.

References:
Refs apache#1457; RFC 9113 section 6.5.2.
@He-Pin
He-Pin marked this pull request as ready for review November 27, 2026 16:37

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@He-Pin
He-Pin merged commit cbfbbf2 into apache:main Nov 28, 2026
6 checks passed
@He-Pin
He-Pin deleted the test/http2-initial-max-concurrent-streams branch November 28, 2026 11:36
@pjfanning pjfanning added this to the 2.1.0 milestone Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants