Home / Function/ testCompressThresholdAllCompress() — netty Function Reference

testCompressThresholdAllCompress() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorTest.java lines 895–916

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

        FullHttpResponse res1023 = new DefaultFullHttpResponse(
                HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
                Unpooled.wrappedBuffer(new byte[1023]));
        assertTrue(ch.writeOutbound(res1023));
        DefaultHttpResponse response1023 = ch.readOutbound();
        assertEquals("gzip", response1023.headers().get(HttpHeaderNames.CONTENT_ENCODING));
        ch.releaseOutbound();

        assertTrue(ch.writeInbound(newRequest()));
        FullHttpResponse res1024 = new DefaultFullHttpResponse(
                HttpVersion.HTTP_1_1, HttpResponseStatus.OK,
                Unpooled.wrappedBuffer(new byte[1024]));
        assertTrue(ch.writeOutbound(res1024));
        DefaultHttpResponse response1024 = ch.readOutbound();
        assertEquals("gzip", response1024.headers().get(HttpHeaderNames.CONTENT_ENCODING));
        assertTrue(ch.finishAndReleaseAll());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free