Home / Class/ Http3SettingsTest Class — netty Architecture

Http3SettingsTest Class — netty Architecture

Architecture documentation for the Http3SettingsTest class in Http3SettingsTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3["Http3SettingsTest"]
  d11e9e89_310d_1554_c4d7_afab805404c9["Http3SettingsTest.java"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|defined in| d11e9e89_310d_1554_c4d7_afab805404c9
  2e4c1768_c62e_290a_fd62_356f2de35f1b["testDefaultSettingsValues()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 2e4c1768_c62e_290a_fd62_356f2de35f1b
  112edd64_7f19_5a80_b2ed_25bea03869bb["testPutAndGetSettings()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 112edd64_7f19_5a80_b2ed_25bea03869bb
  64ddf656_3acd_30e7_9a0a_38f1bc4b95cf["testEqualsAndHashCode()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 64ddf656_3acd_30e7_9a0a_38f1bc4b95cf
  3d9a17bc_c05d_eef0_c3b7_afd618766ac1["testIteratorProvidesEntries()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 3d9a17bc_c05d_eef0_c3b7_afd618766ac1
  19d836a1_96d4_0b52_824f_4f8410e026ed["testForEachConsumer()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 19d836a1_96d4_0b52_824f_4f8410e026ed
  e8f4ac3d_48d7_a873_6ff8_8a4a454dc063["testSpliterator()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| e8f4ac3d_48d7_a873_6ff8_8a4a454dc063
  08687835_6900_6ef4_006c_d7e1642ca932["testCopyFrom()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 08687835_6900_6ef4_006c_d7e1642ca932
  1779ac14_f0b3_8a65_97dc_73cba7b44a52["testValidationRejectsInvalidValues()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 1779ac14_f0b3_8a65_97dc_73cba7b44a52
  a85d89af_6341_7f76_021a_8cd32f4c4bd8["testVerifyStandardSettingValidCases()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| a85d89af_6341_7f76_021a_8cd32f4c4bd8
  30a8b52c_e8dc_90bd_5317_c2676b27f826["testCustomSettingsIgnored()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 30a8b52c_e8dc_90bd_5317_c2676b27f826
  54dc42b0_5602_acd3_e345_b8fc32ede6cd["testCustomSettingsNotIgnoredWithValidator()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 54dc42b0_5602_acd3_e345_b8fc32ede6cd
  2fc2f363_848e_e4a0_48fd_10b367c60bd6["testCustomSettingsValidatorAllowsAndRejectsMultipleKeys()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 2fc2f363_848e_e4a0_48fd_10b367c60bd6
  3a083752_042b_ab75_92c5_341906c0f0de["testDefaultSettingsBuilderPattern()"]
  ee6f69e5_fb9f_2be4_c226_579273bf8ce3 -->|method| 3a083752_042b_ab75_92c5_341906c0f0de

Relationship Graph

Source Code

codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SettingsTest.java lines 42–343

public class Http3SettingsTest {

    @Test
    void testDefaultSettingsValues() {
        Http3Settings settings = Http3Settings.defaultSettings();

        assertEquals(0L, settings.qpackMaxTableCapacity());
        assertEquals(0L, settings.qpackBlockedStreams());
        assertEquals(Boolean.FALSE, settings.connectProtocolEnabled());
        assertEquals(16 * 1024 * 1024, settings.maxFieldSectionSize());
        assertEquals(Boolean.FALSE, settings.h3DatagramEnabled());
    }

    @Test
    void testPutAndGetSettings() {
        Http3Settings settings = new Http3Settings();

        settings.qpackMaxTableCapacity(128)
                .qpackBlockedStreams(4)
                .enableConnectProtocol(true)
                .maxFieldSectionSize(4096);

        assertEquals(128L, settings.qpackMaxTableCapacity());
        assertEquals(4L, settings.qpackBlockedStreams());
        assertEquals(Boolean.TRUE, settings.connectProtocolEnabled());
        assertEquals(4096L, settings.maxFieldSectionSize());
        assertNull(settings.h3DatagramEnabled());
    }

    @Test
    void testEqualsAndHashCode() {
        Http3Settings s1 = new Http3Settings()
                .enableH3Datagram(true)
                .qpackMaxTableCapacity(256)
                .qpackBlockedStreams(8)
                .enableConnectProtocol(true);

        Http3Settings s2 = new Http3Settings()
                .qpackMaxTableCapacity(256)
                .qpackBlockedStreams(8)
                .enableConnectProtocol(true)
                .enableH3Datagram(true);

        Http3Settings s3 = new Http3Settings().qpackMaxTableCapacity(999);

        assertEquals(s1, s2);
        assertEquals(s1.hashCode(), s2.hashCode());
        assertNotEquals(s1, s3);
        assertNotEquals(null, s1);
        assertNotEquals("not-a-settings", s1);
    }

    @Test
    void testIteratorProvidesEntries() {
        Http3Settings settings = new Http3Settings()
                .qpackMaxTableCapacity(100)
                .qpackBlockedStreams(2);

        AtomicInteger count = new AtomicInteger();
        for (Map.Entry<Long, Long> e : settings) {
            assertNotNull(e.getKey());
            assertNotNull(e.getValue());
            count.incrementAndGet();
        }
        assertTrue(count.get() == 2);
    }

    @Test
    void testForEachConsumer() {
        Http3Settings settings = new Http3Settings()
                .qpackMaxTableCapacity(5)
                .qpackBlockedStreams(7)
                .enableH3Datagram(true)
                .maxFieldSectionSize(1);

        List<Long> keys = new ArrayList<>();
        settings.forEach(entry -> keys.add(entry.getKey()));
        assertTrue(keys.contains(Http3SettingIdentifier.HTTP3_SETTINGS_QPACK_MAX_TABLE_CAPACITY.id()));
        assertTrue(keys.contains(Http3SettingIdentifier.HTTP3_SETTINGS_QPACK_BLOCKED_STREAMS.id()));
        assertTrue(keys.contains(Http3SettingIdentifier.HTTP3_SETTINGS_H3_DATAGRAM.id()));
        assertTrue(keys.contains(Http3SettingIdentifier.HTTP3_SETTINGS_MAX_FIELD_SECTION_SIZE.id()));

Frequently Asked Questions

What is the Http3SettingsTest class?
Http3SettingsTest is a class in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SettingsTest.java.
Where is Http3SettingsTest defined?
Http3SettingsTest is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SettingsTest.java at line 42.

Analyze Your Own Codebase

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

Try Supermodel Free