Skip to content

Commit

Permalink
H2PriorKnowledgeFeatureParityTest remove exception verification worka…
Browse files Browse the repository at this point in the history
…round (#1477)

Motivaiton:
H2PriorKnowledgeFeatureParityTest allows for ClosedChannelException in
some scenarios which should be a Http2Exception. This issue has since
been fixed in netty and the workaround can be reverted.

Modifications:
- Remove .or(instanceOf(ClosedChannelException.class)) clause in
H2PriorKnowledgeFeatureParityTest

Result:
H2PriorKnowledgeFeatureParityTest test verifies expected exception for
h2.
  • Loading branch information
Scottmitch authored Apr 10, 2021
1 parent cf51335 commit c3ece23
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.InetSocketAddress;
import java.nio.channels.ClosedChannelException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
Expand Down Expand Up @@ -152,7 +151,6 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.function.UnaryOperator.identity;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.either;
import static org.hamcrest.Matchers.emptyIterable;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItems;
Expand Down Expand Up @@ -686,7 +684,7 @@ public Single<StreamingHttpResponse> handle(final HttpServiceContext ctx,
}
if (h2PriorKnowledge) {
assertThat(assertThrows(Throwable.class, () -> client.request(request)),
either(instanceOf(Http2Exception.class)).or(instanceOf(ClosedChannelException.class)));
instanceOf(Http2Exception.class));
} else {
try (ReservedBlockingHttpConnection reservedConn = client.reserveConnection(request)) {
assertThrows(DecoderException.class, () -> {
Expand Down

0 comments on commit c3ece23

Please sign in to comment.