Home / Function/ testEviction() — netty Function Reference

testEviction() — netty Function Reference

Architecture documentation for the testEviction() function in HpackEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0a28c169_0429_5002_7cc5_b71bc0367658["testEviction()"]
  a8203e54_7e3c_740d_20fe_825ed86c66af["HpackEncoderTest"]
  0a28c169_0429_5002_7cc5_b71bc0367658 -->|defined in| a8203e54_7e3c_740d_20fe_825ed86c66af
  5563ab2a_0de3_cdda_efa2_2d872b636b0a["setMaxTableSize()"]
  0a28c169_0429_5002_7cc5_b71bc0367658 -->|calls| 5563ab2a_0de3_cdda_efa2_2d872b636b0a
  9eb8fd89_0897_09d7_fe02_33bab5eb7d17["verifyEncoding()"]
  0a28c169_0429_5002_7cc5_b71bc0367658 -->|calls| 9eb8fd89_0897_09d7_fe02_33bab5eb7d17
  style 0a28c169_0429_5002_7cc5_b71bc0367658 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java lines 151–166

    @Test
    public void testEviction() throws Http2Exception {
        setMaxTableSize(2 * HpackHeaderField.HEADER_ENTRY_OVERHEAD + 3);

        // k -> x encoded literally
        verifyEncoding(new DefaultHttp2Headers().add("k", "x"), 63, 36, 64, 1, 107, 1, 120);

        // k -> x encoded by referencing the previously encoded k -> x.
        verifyEncoding(new DefaultHttp2Headers().add("k", "x"), -66);

        // k -> x gets evicted
        verifyEncoding(new DefaultHttp2Headers().add("k", "y"), 64, 1, 107, 1, 121);

        // k -> x was evicted, so we are back to literal encoding.
        verifyEncoding(new DefaultHttp2Headers().add("k", "x"), 64, 1, 107, 1, 120);
    }

Domain

Subdomains

Frequently Asked Questions

What does testEviction() do?
testEviction() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java.
Where is testEviction() defined?
testEviction() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackEncoderTest.java at line 151.
What does testEviction() call?
testEviction() calls 2 function(s): setMaxTableSize, verifyEncoding.

Analyze Your Own Codebase

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

Try Supermodel Free