testAdd() — netty Function Reference
Architecture documentation for the testAdd() function in HpackDynamicTableTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 57f6ecda_729d_7006_d29a_99b7b1f126ec["testAdd()"] 66c73598_e36b_e60b_26d1_60dc29c9b823["HpackDynamicTableTest"] 57f6ecda_729d_7006_d29a_99b7b1f126ec -->|defined in| 66c73598_e36b_e60b_26d1_60dc29c9b823 style 57f6ecda_729d_7006_d29a_99b7b1f126ec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDynamicTableTest.java lines 119–141
@Test
public void testAdd() {
HpackDynamicTable table = new HpackDynamicTable(100);
assertEquals(0, table.size());
HpackHeaderField entry1 = new HpackHeaderField(FOO, BAR); //size:3+3+32=38
HpackHeaderField entry2 = new HpackHeaderField(HELLO, WORLD);
table.add(entry1); //success
assertEquals(entry1.size(), table.size());
table.setCapacity(32); //entry1 is removed from table
assertEquals(0, table.size());
assertEquals(0, table.length());
table.add(entry1); //fail quietly
assertEquals(0, table.size());
assertEquals(0, table.length());
table.setCapacity(64);
table.add(entry1); //success
assertEquals(entry1.size(), table.size());
assertEquals(1, table.length());
table.add(entry2); //entry2 is added, but entry1 is removed from table
assertEquals(entry2.size(), table.size());
assertEquals(1, table.length());
assertEquals(entry2, table.getEntry(1));
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testAdd() do?
testAdd() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDynamicTableTest.java.
Where is testAdd() defined?
testAdd() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDynamicTableTest.java at line 119.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free