multipleNewOutboundStreamsShouldBeBuffered() — netty Function Reference
Architecture documentation for the multipleNewOutboundStreamsShouldBeBuffered() function in Http2FrameCodecTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b0bb2aa2_d741_02ad_3857_46d62af98bfc["multipleNewOutboundStreamsShouldBeBuffered()"] 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c["Http2FrameCodecTest"] b0bb2aa2_d741_02ad_3857_46d62af98bfc -->|defined in| 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c 868f866c_1fcb_c067_1110_d326c0e4d94b["setUp()"] b0bb2aa2_d741_02ad_3857_46d62af98bfc -->|calls| 868f866c_1fcb_c067_1110_d326c0e4d94b style b0bb2aa2_d741_02ad_3857_46d62af98bfc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java lines 706–747
@Test
public void multipleNewOutboundStreamsShouldBeBuffered() throws Exception {
// We use a limit of 1 and then increase it step by step.
setUp(Http2FrameCodecBuilder.forServer().encoderEnforceMaxConcurrentStreams(true),
new Http2Settings().maxConcurrentStreams(1));
Http2FrameStream stream1 = frameCodec.newStream();
Http2FrameStream stream2 = frameCodec.newStream();
Http2FrameStream stream3 = frameCodec.newStream();
ChannelPromise promise1 = channel.newPromise();
ChannelPromise promise2 = channel.newPromise();
ChannelPromise promise3 = channel.newPromise();
channel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers()).stream(stream1), promise1);
channel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers()).stream(stream2), promise2);
channel.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers()).stream(stream3), promise3);
assertTrue(isStreamIdValid(stream1.id()));
channel.runPendingTasks();
assertTrue(isStreamIdValid(stream2.id()));
assertTrue(promise1.syncUninterruptibly().isSuccess());
assertFalse(promise2.isDone());
assertFalse(promise3.isDone());
// Increase concurrent streams limit to 2
frameInboundWriter.writeInboundSettings(new Http2Settings().maxConcurrentStreams(2));
channel.flush();
// As we increased the limit to 2 we should have also succeed the second frame.
assertTrue(promise2.syncUninterruptibly().isSuccess());
assertFalse(promise3.isDone());
frameInboundWriter.writeInboundSettings(new Http2Settings().maxConcurrentStreams(3));
channel.flush();
// With the max streams of 3 all streams should be succeed now.
assertTrue(promise3.syncUninterruptibly().isSuccess());
assertFalse(channel.finishAndReleaseAll());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does multipleNewOutboundStreamsShouldBeBuffered() do?
multipleNewOutboundStreamsShouldBeBuffered() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java.
Where is multipleNewOutboundStreamsShouldBeBuffered() defined?
multipleNewOutboundStreamsShouldBeBuffered() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java at line 706.
What does multipleNewOutboundStreamsShouldBeBuffered() call?
multipleNewOutboundStreamsShouldBeBuffered() calls 1 function(s): setUp.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free