Home / Function/ testDecodeResponseTrailersAsClient() — netty Function Reference

testDecodeResponseTrailersAsClient() — netty Function Reference

Architecture documentation for the testDecodeResponseTrailersAsClient() function in Http2StreamFrameToHttpObjectCodecTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bd70ffc2_f1bc_4228_4651_d79969a0590b["testDecodeResponseTrailersAsClient()"]
  f77629dd_309f_f368_8220_46ddc65ad871["Http2StreamFrameToHttpObjectCodecTest"]
  bd70ffc2_f1bc_4228_4651_d79969a0590b -->|defined in| f77629dd_309f_f368_8220_46ddc65ad871
  style bd70ffc2_f1bc_4228_4651_d79969a0590b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java lines 854–872

    @Test
    public void testDecodeResponseTrailersAsClient() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new Http2StreamFrameToHttpObjectCodec(false));
        Http2Headers headers = new DefaultHttp2Headers();
        headers.set("key", "value");
        assertTrue(ch.writeInbound(new DefaultHttp2HeadersFrame(headers, true)));

        LastHttpContent trailers = ch.readInbound();
        try {
            assertEquals(0, trailers.content().readableBytes());
            assertEquals("value", trailers.trailingHeaders().get("key"));
            assertThat(trailers).isNotInstanceOf(FullHttpRequest.class);
        } finally {
            trailers.release();
        }

        assertNull(ch.readInbound());
        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodeResponseTrailersAsClient() do?
testDecodeResponseTrailersAsClient() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java.
Where is testDecodeResponseTrailersAsClient() defined?
testDecodeResponseTrailersAsClient() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2StreamFrameToHttpObjectCodecTest.java at line 854.

Analyze Your Own Codebase

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

Try Supermodel Free