Skip to content

test: drop the server write failure check in Http2CancellationTestCase - #1576

Merged
jlouvel merged 1 commit into
3.0from
test/http2-cancellation-write-failure
Nov 1, 2026
Merged

jlouvel merged 1 commit into
3.0from
test/http2-cancellation-write-failure

Conversation

@jlouvel

@jlouvel jlouvel commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

abortFailsTheResponseStreamAndNotifiesTheResponseCallback no longer waits for the server-side response write to fail after the client aborts the HTTP/2 response.

The test still checks the client side of the abort:

  • The response status becomes CONNECTOR_ERROR_COMMUNICATION.
  • The response callback is notified a second time with that status.
  • Reading the response body throws an IOException.

Testing

Http2CancellationTestCase passes locally.

🤖 Generated with Claude Code

@jlouvel jlouvel self-assigned this Oct 30, 2026
@jlouvel
jlouvel requested a balanced review from Copilot October 30, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the change narrowing the HTTP/2 cancellation test to client-side abort behavior.

No open issues 🎉

What changed in this PR

This PR narrows the HTTP/2 cancellation test to client-side abort behavior, removing the requirement that the server’s response write fail.

Changes:

  • Removes the server-write failure latch, exception tracking, and timed assertion.
  • Preserves checks for the communication-error status, repeated callback notification, and response-body read failure.
File Description
org.restlet/​src/​test/​java/​org/​restlet/​engine/​connector/​Http2CancellationTestCase.java Removes server-write failure verification while retaining client-side cancellation assertions.

Review effort: Balanced

abortFailsTheResponseStreamAndNotifiesTheResponseCallback no longer
waits for the server-side response write to fail after the client
aborts. The test still checks that the abort fails the client response
stream and notifies the response callback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Jerome Louvel <[email protected]>
@jlouvel
jlouvel force-pushed the test/http2-cancellation-write-failure branch from 25b10cd to 838a30a Compare November 1, 2026 14:32
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@jlouvel
jlouvel merged commit a56523f into 3.0 Nov 1, 2026
3 checks passed
@jlouvel
jlouvel deleted the test/http2-cancellation-write-failure branch November 1, 2026 17:58
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