Home / Function/ testEmpty() — netty Function Reference

testEmpty() — netty Function Reference

Architecture documentation for the testEmpty() function in HttpContentCompressorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ef148a01_4707_c947_8277_0504028a17e3["testEmpty()"]
  32ab04b0_6c83_d4f7_6483_fd304f908331["HttpContentCompressorTest"]
  ef148a01_4707_c947_8277_0504028a17e3 -->|defined in| 32ab04b0_6c83_d4f7_6483_fd304f908331
  style ef148a01_4707_c947_8277_0504028a17e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java lines 974–987

    @Test
    public void testEmpty() {
        EmbeddedChannel ch = new EmbeddedChannel(new HttpContentCompressor());
        assertTrue(ch.writeInbound(newRequest()));

        DefaultHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
        response.headers().add(HttpHeaderNames.CONTENT_LENGTH, 0);
        assertTrue(ch.writeOutbound(response));
        assertTrue(ch.writeOutbound(new DefaultHttpContent(Unpooled.EMPTY_BUFFER)));
        assertTrue(ch.writeOutbound(DefaultLastHttpContent.EMPTY_LAST_CONTENT));

        ch.checkException();
        ch.finishAndReleaseAll();
    }

Domain

Subdomains

Frequently Asked Questions

What does testEmpty() do?
testEmpty() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java.
Where is testEmpty() defined?
testEmpty() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java at line 974.

Analyze Your Own Codebase

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

Try Supermodel Free