Home / Function/ testUnknownStreamWithCustomHandler() — netty Function Reference

testUnknownStreamWithCustomHandler() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  bd49b894_53c0_806b_e8b9_e186d70615c9["testUnknownStreamWithCustomHandler()"]
  25ca3b24_17b0_d7c2_ddbd_1036d0071d78["Http3UnidirectionalStreamInboundHandlerTest"]
  bd49b894_53c0_806b_e8b9_e186d70615c9 -->|defined in| 25ca3b24_17b0_d7c2_ddbd_1036d0071d78
  56d89f3f_d102_9002_53c9_94064eade84d["setup()"]
  bd49b894_53c0_806b_e8b9_e186d70615c9 -->|calls| 56d89f3f_d102_9002_53c9_94064eade84d
  style bd49b894_53c0_806b_e8b9_e186d70615c9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java lines 87–111

    @ParameterizedTest(name = "{index}: server = {0}")
    @ValueSource(booleans = {false, true})
    public void testUnknownStreamWithCustomHandler(boolean server) throws Exception {
        setup(server);
        long streamType = 0x06;
        EmbeddedChannel channel = newChannel(server, v -> {
            assertEquals(streamType, v);
            // Add an handler that will just forward the received bytes.
            return new ChannelInboundHandlerAdapter();
        });
        ByteBuf buffer = Unpooled.buffer(8);
        Http3CodecUtils.writeVariableLengthInteger(buffer, streamType);
        assertFalse(channel.writeInbound(buffer));
        assertEquals(0, buffer.refCnt());
        assertNull(channel.pipeline().context(Http3UnidirectionalStreamInboundHandler.class));
        assertTrue(channel.isActive());

        // Write some buffer to the stream. This should be just released.
        ByteBuf someBuffer = Unpooled.buffer().writeLong(9);
        assertTrue(channel.writeInbound(someBuffer.retainedDuplicate()));
        assertTrue(channel.finish());

        Http3TestUtils.assertBufferEquals(someBuffer, channel.readInbound());
        assertNull(channel.readInbound());
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testUnknownStreamWithCustomHandler() do?
testUnknownStreamWithCustomHandler() is a function in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java.
Where is testUnknownStreamWithCustomHandler() defined?
testUnknownStreamWithCustomHandler() is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3UnidirectionalStreamInboundHandlerTest.java at line 87.
What does testUnknownStreamWithCustomHandler() call?
testUnknownStreamWithCustomHandler() 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