diff --git a/codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionTest.java b/codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionTest.java index e64544591b..d2f22469f1 100644 --- a/codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionTest.java +++ b/codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionTest.java @@ -210,6 +210,16 @@ public class DefaultHttp2ConnectionTest { assertTrue(server.activeStreams().isEmpty()); } + @Test(expected = Http2Exception.class) + public void localStreamInvalidStreamIdShouldThrow() throws Http2Exception { + client.createLocalStream(Integer.MAX_VALUE + 2, false); + } + + @Test(expected = Http2Exception.class) + public void remoteStreamInvalidStreamIdShouldThrow() throws Http2Exception { + client.createRemoteStream(Integer.MAX_VALUE + 1, false); + } + @Test public void prioritizeShouldUseDefaults() throws Exception { Http2Stream stream = client.local().createStream(1, false);