Home / Function/ testStreamSetup() — netty Function Reference

testStreamSetup() — netty Function Reference

Architecture documentation for the testStreamSetup() function in Http3UnidirectionalStreamInboundHandlerTest.java from the netty codebase.

Function java Buffer Allocators calls 2 called by 3

Entity Profile

Dependency Diagram

graph TD
  9bb3a719_0678_c8b6_ba9d_662698a1170f["testStreamSetup()"]
  25ca3b24_17b0_d7c2_ddbd_1036d0071d78["Http3UnidirectionalStreamInboundHandlerTest"]
  9bb3a719_0678_c8b6_ba9d_662698a1170f -->|defined in| 25ca3b24_17b0_d7c2_ddbd_1036d0071d78
  91996be4_48d6_837c_e776_be28e2388c80["testControlStream()"]
  91996be4_48d6_837c_e776_be28e2388c80 -->|calls| 9bb3a719_0678_c8b6_ba9d_662698a1170f
  37882d9f_249f_3be4_894d_de1361a472a1["testQpackEncoderStream()"]
  37882d9f_249f_3be4_894d_de1361a472a1 -->|calls| 9bb3a719_0678_c8b6_ba9d_662698a1170f
  09bd5794_4144_fe2f_2745_0023378c05ba["testQpackDecoderStream()"]
  09bd5794_4144_fe2f_2745_0023378c05ba -->|calls| 9bb3a719_0678_c8b6_ba9d_662698a1170f
  56d89f3f_d102_9002_53c9_94064eade84d["setup()"]
  9bb3a719_0678_c8b6_ba9d_662698a1170f -->|calls| 56d89f3f_d102_9002_53c9_94064eade84d
  025a8430_c4df_b9ca_7c08_4c2566f638fb["EmbeddedChannel()"]
  9bb3a719_0678_c8b6_ba9d_662698a1170f -->|calls| 025a8430_c4df_b9ca_7c08_4c2566f638fb
  style 9bb3a719_0678_c8b6_ba9d_662698a1170f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java lines 223–250

    private void testStreamSetup(boolean server, long type,
                                 Class<? extends ChannelHandler> clazz, boolean hasCodec) throws Exception {
        setup(server);
        EmbeddedChannel channel = newChannel(server);
        ByteBuf buffer = Unpooled.buffer(8);
        Http3CodecUtils.writeVariableLengthInteger(buffer, type);
        assertFalse(channel.writeInbound(buffer));
        assertEquals(0, buffer.refCnt());
        assertNull(channel.pipeline().context(Http3UnidirectionalStreamInboundHandler.class));
        assertNotNull(channel.pipeline().context(clazz));
        if (hasCodec) {
            assertNotNull(channel.pipeline().context(CodecHandler.class));
        } else {
            assertNull(channel.pipeline().context(CodecHandler.class));
        }
        assertFalse(channel.finish());

        channel = new EmbeddedChannel(channel.parent(), DefaultChannelId.newInstance(),
                true, false, newUniStreamInboundHandler(server, null));

        // Try to create the stream a second time, this should fail
        buffer = Unpooled.buffer(8);
        Http3CodecUtils.writeVariableLengthInteger(buffer, type);
        assertFalse(channel.writeInbound(buffer));
        assertEquals(0, buffer.refCnt());
        Http3TestUtils.verifyClose(Http3ErrorCode.H3_STREAM_CREATION_ERROR, (EmbeddedQuicChannel) channel.parent());
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testStreamSetup() do?
testStreamSetup() is a function in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java.
Where is testStreamSetup() defined?
testStreamSetup() is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java at line 223.
What does testStreamSetup() call?
testStreamSetup() calls 2 function(s): EmbeddedChannel, setup.
What calls testStreamSetup()?
testStreamSetup() is called by 3 function(s): testControlStream, testQpackDecoderStream, testQpackEncoderStream.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free