Http2SettingsTest Class — netty Architecture
Architecture documentation for the Http2SettingsTest class in Http2SettingsTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 910ec026_5946_ddbf_7e19_bbbdae11da3a["Http2SettingsTest"] 132f2530_6827_17ee_8cbd_9bbdb7f2b91f["Http2SettingsTest.java"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|defined in| 132f2530_6827_17ee_8cbd_9bbdb7f2b91f 725337e8_8aa8_9bad_3bd8_d8f1499795bc["setup()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 725337e8_8aa8_9bad_3bd8_d8f1499795bc 304ccbe5_aa57_b22e_09db_926783c7fdb3["standardSettingsShouldBeNotSet()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 304ccbe5_aa57_b22e_09db_926783c7fdb3 4af7eef6_2ef8_1cff_cb2d_7f275af7f8e1["standardSettingsShouldBeSet()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 4af7eef6_2ef8_1cff_cb2d_7f275af7f8e1 774f4281_25fb_19e7_9380_9db1f5b87f35["settingsShouldSupportUnsignedShort()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 774f4281_25fb_19e7_9380_9db1f5b87f35 74e3061e_26ab_7505_fb2f_f20ab6b6d617["headerListSize()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 74e3061e_26ab_7505_fb2f_f20ab6b6d617 5f089d24_6199_ef21_5a8d_dadbf6cecd02["headerListSizeBoundCheck()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 5f089d24_6199_ef21_5a8d_dadbf6cecd02 1cc8a449_3de5_276b_7d6e_3d797fc7c8c1["headerTableSize()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 1cc8a449_3de5_276b_7d6e_3d797fc7c8c1 cc7ec708_e6cd_93ac_2e5f_681245a2891c["headerTableSizeBoundCheck()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| cc7ec708_e6cd_93ac_2e5f_681245a2891c 533909bb_c579_9d6d_254c_d82af77c98b8["pushEnabled()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 533909bb_c579_9d6d_254c_d82af77c98b8 20c8f2f9_ce19_831e_beea_66ef0b0d53fe["enablePush()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 20c8f2f9_ce19_831e_beea_66ef0b0d53fe 4a1d9faa_670e_aa3b_d63b_9aa39d92551d["enablePushBoundCheck()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 4a1d9faa_670e_aa3b_d63b_9aa39d92551d 76e15414_11b5_2c13_e206_e2c86766f63c["maxConcurrentStreams()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 76e15414_11b5_2c13_e206_e2c86766f63c 5a35e0bc_1edb_5298_401a_1a613f7c0feb["maxConcurrentStreamsBoundCheck()"] 910ec026_5946_ddbf_7e19_bbbdae11da3a -->|method| 5a35e0bc_1edb_5298_401a_1a613f7c0feb
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2SettingsTest.java lines 46–282
public class Http2SettingsTest {
private Http2Settings settings;
@BeforeEach
public void setup() {
settings = new Http2Settings();
}
@Test
public void standardSettingsShouldBeNotSet() {
assertEquals(0, settings.size());
assertNull(settings.headerTableSize());
assertNull(settings.initialWindowSize());
assertNull(settings.maxConcurrentStreams());
assertNull(settings.pushEnabled());
assertNull(settings.maxFrameSize());
assertNull(settings.maxHeaderListSize());
assertNull(settings.connectProtocolEnabled());
}
@Test
public void standardSettingsShouldBeSet() {
settings.initialWindowSize(1);
settings.maxConcurrentStreams(2);
settings.pushEnabled(true);
settings.headerTableSize(3);
settings.maxFrameSize(MAX_FRAME_SIZE_UPPER_BOUND);
settings.maxHeaderListSize(4);
settings.connectProtocolEnabled(true);
assertEquals(1, (int) settings.initialWindowSize());
assertEquals(2L, (long) settings.maxConcurrentStreams());
assertTrue(settings.pushEnabled());
assertEquals(3L, (long) settings.headerTableSize());
assertEquals(MAX_FRAME_SIZE_UPPER_BOUND, (int) settings.maxFrameSize());
assertEquals(4L, (long) settings.maxHeaderListSize());
assertTrue(settings.connectProtocolEnabled());
}
@Test
public void settingsShouldSupportUnsignedShort() {
char key = (char) (Short.MAX_VALUE + 1);
settings.put(key, (Long) 123L);
assertEquals(123L, (long) settings.get(key));
}
@ParameterizedTest(name = "{displayName} [{index}] value={0}")
@ValueSource(longs = {MIN_HEADER_LIST_SIZE, MIN_HEADER_LIST_SIZE + 1L,
MAX_HEADER_LIST_SIZE - 1L, MAX_HEADER_LIST_SIZE})
public void headerListSize(final long value) {
settings.maxHeaderListSize(value);
assertEquals(value, (long) settings.maxHeaderListSize());
}
@ParameterizedTest(name = "{displayName} [{index}] value={0}")
@ValueSource(longs = {MIN_VALUE, MIN_HEADER_LIST_SIZE - 1L, MAX_HEADER_LIST_SIZE + 1L, MAX_VALUE})
public void headerListSizeBoundCheck(final long value) {
assertThrows(IllegalArgumentException.class, new Executable() {
@Override
public void execute() {
settings.maxHeaderListSize(value);
}
});
}
@ParameterizedTest(name = "{displayName} [{index}] value={0}")
@ValueSource(longs = {MIN_HEADER_TABLE_SIZE, MIN_HEADER_TABLE_SIZE + 1L,
MAX_HEADER_TABLE_SIZE - 1L, MAX_HEADER_TABLE_SIZE})
public void headerTableSize(final long value) {
settings.headerTableSize(value);
assertEquals(value, (long) settings.headerTableSize());
}
@ParameterizedTest(name = "{displayName} [{index}] value={0}")
@ValueSource(longs = {MIN_VALUE, MIN_HEADER_TABLE_SIZE - 1L, MAX_HEADER_TABLE_SIZE + 1L, MAX_VALUE})
public void headerTableSizeBoundCheck(final long value) {
assertThrows(IllegalArgumentException.class, new Executable() {
@Override
public void execute() {
settings.headerTableSize(value);
}
Source
Frequently Asked Questions
What is the Http2SettingsTest class?
Http2SettingsTest is a class in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2SettingsTest.java.
Where is Http2SettingsTest defined?
Http2SettingsTest is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2SettingsTest.java at line 46.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free