Home / Function/ testUpgradeNonEmptyFullResponseWithTrailers() — netty Function Reference

testUpgradeNonEmptyFullResponseWithTrailers() — netty Function Reference

Architecture documentation for the testUpgradeNonEmptyFullResponseWithTrailers() function in Http3FrameToHttpObjectCodecTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fd35c4e2_54de_ce0f_5be3_4d9c8cf3c5a0["testUpgradeNonEmptyFullResponseWithTrailers()"]
  0358625f_2420_3fbe_f6d7_5ee2577ca675["Http3FrameToHttpObjectCodecTest"]
  fd35c4e2_54de_ce0f_5be3_4d9c8cf3c5a0 -->|defined in| 0358625f_2420_3fbe_f6d7_5ee2577ca675
  style fd35c4e2_54de_ce0f_5be3_4d9c8cf3c5a0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java lines 167–191

    @Test
    public void testUpgradeNonEmptyFullResponseWithTrailers() {
        EmbeddedQuicStreamChannel ch = new EmbeddedQuicStreamChannel(new Http3FrameToHttpObjectCodec(true));
        ByteBuf hello = Unpooled.copiedBuffer("hello world", CharsetUtil.UTF_8);
        FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK, hello);
        HttpHeaders trailers = response.trailingHeaders();
        trailers.set("key", "value");
        assertTrue(ch.writeOutbound(response));

        Http3HeadersFrame headersFrame = ch.readOutbound();
        assertThat(headersFrame.headers().status().toString(), is("200"));

        Http3DataFrame dataFrame = ch.readOutbound();
        try {
            assertThat(dataFrame.content().toString(CharsetUtil.UTF_8), is("hello world"));
        } finally {
            dataFrame.release();
        }

        Http3HeadersFrame trailersFrame = ch.readOutbound();
        assertThat(trailersFrame.headers().get("key").toString(), is("value"));
        assertTrue(ch.isOutputShutdown());

        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testUpgradeNonEmptyFullResponseWithTrailers() do?
testUpgradeNonEmptyFullResponseWithTrailers() is a function in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java.
Where is testUpgradeNonEmptyFullResponseWithTrailers() defined?
testUpgradeNonEmptyFullResponseWithTrailers() is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java at line 167.

Analyze Your Own Codebase

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

Try Supermodel Free