Skip to content

test: cover concurrent HTTP/2 request isolation after a route failure - #1670

Open
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:test/http2-isolate-concurrent-route-failure
Open

He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:test/http2-isolate-concurrent-route-failure

Conversation

@He-Pin

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

Copy link
Copy Markdown
Member

Motivation

The current HTTP/2 route tests exercise a new request after a failed handler has completed. They do not cover another request that was already in flight at the time of the failure.

Modification

Send two ordinary typed requests over a single HTTP/2 connection and wait for both to reach the application's route. Fail the first application's future and verify that its correlated response is 500. Complete the second future and verify that its correlated response is 200 with the full entity.

Result

Adds coverage for per-request application failure isolation while two HTTP/2 requests are in flight. Production code and public APIs are unchanged.

Tests

  • JDK 17 with Scala 2.13.18 and Scala 3.3.9: four focused cases passed on each version, including the new case, using the exact test source recompiled against existing compiled support classes.
  • Scoped Scalafmt and git diff --check passed. No full CI run was verified before opening this PR.

References

Motivation:
The existing HTTP/2 failure test checks a subsequent request, not a request already in flight when an application route fails.

Modification:
Wait for two ordinary requests to reach the same route over one HTTP/2 connection. Verify that a failed application future produces a correlated 500, then complete the healthy request and verify its correlated 200 and full body.

Result:
The test guards per-request failure isolation without changing production behavior.

References:
RFC 9113 Section 5; RFC 9110 Section 15.6.1.
@He-Pin
He-Pin requested a review from pjfanning November 26, 2026 23:55
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.

1 participant