Repository navigation
Conversation
Motivation: Exercise each limit increase with multiple ordinary requests queued, without depending on how long the network probe waits. Modification: Observe requests before and after the fused bounded queue. At each limit check the next GET and use a separate no-change SETTINGS acknowledgement and the request count to check immediate application admission. Finish all streams in reverse order. Result: The test detects an extra admitted request in the ordinary fused client stack without wall-clock silence assertions. Production code is unchanged.
He-Pin
force-pushed
the
test/http2-successive-stream-limit
branch
from
November 26, 2026 08:41
8480fce to
64e8acf
Compare
pjfanning
reviewed
Nov 26, 2026
pjfanning
left a comment
Member
There was a problem hiding this comment.
Looks good — the counter after the buffer does catch over-admission, which the existing 2→4 test can't. Nits:
Await.result(allOffered.future, remainingOrDefault)plus anAtomicIntegeris heavier than the neighbouringinAssertAllStagesStopped(new TestSetup ...)style tests.network.toNet.cancel()in thefinallyafterexpectGracefulCompletion()looks redundant.
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.
Motivation
With three ordinary requests queued and only one HTTP/2 stream allowed, each increase in the peer's stream limit should let exactly one more request through. The existing test covered one settings increase with just one request queued.
Modification
Add a client-stack test using the existing frame probes and a fused buffer. Observe all three GETs before the buffer, then count admissions after it. Start at
SETTINGS_MAX_CONCURRENT_STREAMS = 1and raise the peer's limit to 2 and 3. Check the method and exact path on streams 1, 3 and 5. At each limit, acknowledge a separate empty SETTINGS frame that leaves the limit unchanged, then assert that the admitted count matches that limit. Keep the three streams open until the last increase, then complete them with200responses in reverse stream order and check graceful completion.Result
The test covers successive admissions without closing an existing stream to free capacity. No production code or API changes.
Tests
Http2ClientSpectest passed 1/1 on both Scala 2.13.18 and 3.3.9. No full CI run was performed locally.http2-tests/Test/scalafmt,http2-tests/Test/scalafmtCheckandgit diff --checkpassed.References