Skip to content
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

Verify that all graceful closure use-cases also work with HTTP/2 #1180

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

GracefulConnectionClosureHandlingTest provides a comprehensive testing
for graceful closure with HTTP/1. We need to make sure, the same cases
work correctly when users switch to HTTP/2.

Modifications:

  • Add HttpProtocol parameter for GracefulConnectionClosureHandlingTest;

Result:

All use-cases of GracefulConnectionClosureHandlingTest are tested with
HTTP/1.x and HTTP/2.

Motivation:

`GracefulConnectionClosureHandlingTest` provides a comprehensive testing
for graceful closure with HTTP/1. We need to make sure, the same cases
work correctly when users switch to HTTP/2.

Modifications:

- Add `HttpProtocol` parameter for `GracefulConnectionClosureHandlingTest`;

Result:

All use-cases of `GracefulConnectionClosureHandlingTest` are tested with
HTTP/1.x and HTTP/2.
@@ -479,6 +497,10 @@ private void assertClosedChannelException(ThrowingRunnable runnable, CloseEvent
Exception e = assertThrows(ExecutionException.class, runnable);
Throwable cause = e.getCause();
assertThat(cause, instanceOf(ClosedChannelException.class));
if (protocol == HTTP_2) {
// HTTP/2 does not enhance ClosedChannelException with CloseEvent
Copy link
Member

Choose a reason for hiding this comment

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

this is an unfortunate side effect of error handling being coupled to the close handler. we should consider a followup effort to preserve the exception.

@idelpivnitskiy idelpivnitskiy merged commit 5b0e4ec into apple:main Oct 15, 2020
@idelpivnitskiy idelpivnitskiy deleted the h2-gc branch October 15, 2020 23:32
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