QpackDecoderTest Class — netty Architecture
Architecture documentation for the QpackDecoderTest class in QpackDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 306cb9ff_c699_c029_57de_27fe788cc819["QpackDecoderTest"] 3239d962_d46f_ffa6_acfe_cee6e93306b6["QpackDecoderTest.java"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|defined in| 3239d962_d46f_ffa6_acfe_cee6e93306b6 a4da3241_dff9_6e1b_8b55_2b12d36f338c["data()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| a4da3241_dff9_6e1b_8b55_2b12d36f338c 0d41f851_2b4a_4925_0218_9800a45c4576["requiredInsertCountAsInserted()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 0d41f851_2b4a_4925_0218_9800a45c4576 edfb543f_9971_0ce8_9bd6_9ed83e4b5a07["requiredInsertCountLessThanInserted()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| edfb543f_9971_0ce8_9bd6_9ed83e4b5a07 fbd33333_5aa0_c1b7_010b_80b802018ee1["requiredInsertCountBehindMax()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| fbd33333_5aa0_c1b7_010b_80b802018ee1 6973559d_619b_85fb_3e6a_3ea043f41865["getWithRelativeIndex()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 6973559d_619b_85fb_3e6a_3ea043f41865 7e5aa6e0_4594_4d29_9af7_d13e12bbdd5c["getWithPostBaseRelativeIndex()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 7e5aa6e0_4594_4d29_9af7_d13e12bbdd5c 26498b22_5caf_40c2_1f0f_1adf07905522["setup()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 26498b22_5caf_40c2_1f0f_1adf07905522 5f4bad20_3700_e8bf_8781_1537837047a7["encodeDecodeVerifyRequiredInsertCount()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 5f4bad20_3700_e8bf_8781_1537837047a7 3e74e630_7c00_e616_c374_92c6cc644da9["encodeDecodeDeltaBase()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 3e74e630_7c00_e616_c374_92c6cc644da9 bb203c61_52d2_6d5b_5e2a_0658e75b10ae["encodeDecodeRequiredInsertCount()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| bb203c61_52d2_6d5b_5e2a_0658e75b10ae cc508620_cb23_3737_9a3d_66fd1ac40163["insertLiterals()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| cc508620_cb23_3737_9a3d_66fd1ac40163 5a65d2e9_49c2_2394_b3ec_068bc4009406["verifyField()"] 306cb9ff_c699_c029_57de_27fe788cc819 -->|method| 5a65d2e9_49c2_2394_b3ec_068bc4009406
Relationship Graph
Source Code
codec-http3/src/test/java/io/netty/handler/codec/http3/QpackDecoderTest.java lines 35–169
public class QpackDecoderTest {
private static final String FOO = "foo";
private static final String BAR = "bar";
private QpackDecoderDynamicTable table;
private EmbeddedQuicStreamChannel decoderStream;
private QpackDecoder decoder;
private int inserted;
private int maxEntries;
private QpackAttributes attributes;
public static Collection<Object[]> data() {
int capacity = 128; // maxEntries = 128/32 = 4, maxIndex = 2*4 = 8
return asList(
new Object[]{capacity, 0},
new Object[]{capacity, 1},
new Object[]{capacity, 5},
new Object[]{capacity, 8},
new Object[]{capacity, 16},
new Object[]{capacity, 25},
new Object[]{capacity, 64},
new Object[]{capacity, 89}
);
}
@ParameterizedTest(name = "capacity: {0}, inserts: {1}")
@MethodSource("data")
public void requiredInsertCountAsInserted(int capacity, int insertionCount) throws Exception {
setup(capacity);
insertLiterals(insertionCount);
encodeDecodeVerifyRequiredInsertCount(inserted);
}
@ParameterizedTest(name = "capacity: {0}, inserts: {1}")
@MethodSource("data")
public void requiredInsertCountLessThanInserted(int capacity, int insertionCount) throws Exception {
setup(capacity);
assumeTrue(insertionCount > 0);
insertLiterals(insertionCount);
encodeDecodeVerifyRequiredInsertCount(insertionCount - 1);
}
@ParameterizedTest(name = "capacity: {0}, inserts: {1}")
@MethodSource("data")
public void requiredInsertCountBehindMax(int capacity, int insertionCount) throws Exception {
setup(capacity);
assumeTrue(insertionCount > maxEntries);
insertLiterals(insertionCount);
encodeDecodeVerifyRequiredInsertCount(insertionCount - maxEntries + 1);
}
@ParameterizedTest(name = "capacity: {0}, inserts: {1}")
@MethodSource("data")
public void getWithRelativeIndex(int capacity, int insertionCount) throws Exception {
setup(capacity);
assumeTrue(insertionCount > 3);
insertLiterals(insertionCount);
int requiredInsertCount = encodeDecodeRequiredInsertCount(insertionCount);
int base = encodeDecodeDeltaBase(requiredInsertCount, false, 1);
int relativeIndex = 1;
final QpackHeaderField entry = table.getEntryRelativeEncodedField(base - relativeIndex);
verifyField(entry, insertionCount - 2);
}
@ParameterizedTest(name = "capacity: {0}, inserts: {1}")
@MethodSource("data")
public void getWithPostBaseRelativeIndex(int capacity, int insertionCount) throws Exception {
setup(capacity);
assumeTrue(insertionCount > 2);
insertLiterals(insertionCount);
int requiredInsertCount = encodeDecodeRequiredInsertCount(insertionCount - 1);
int base = encodeDecodeDeltaBase(requiredInsertCount, true, 0);
int relativeIndex = 1;
final QpackHeaderField entry = table.getEntryRelativeEncodedField(base - relativeIndex);
verifyField(entry, insertionCount - 1);
}
Source
Frequently Asked Questions
What is the QpackDecoderTest class?
QpackDecoderTest is a class in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/QpackDecoderTest.java.
Where is QpackDecoderTest defined?
QpackDecoderTest is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/QpackDecoderTest.java at line 35.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free