--- a/test/jdk/java/net/httpclient/http2/jdk.incubator.httpclient/jdk/incubator/http/internal/hpack/HeaderTableTest.java Wed Nov 29 11:15:19 2017 +0000
+++ b/test/jdk/java/net/httpclient/http2/jdk.incubator.httpclient/jdk/incubator/http/internal/hpack/HeaderTableTest.java Wed Nov 29 14:27:12 2017 +0300
@@ -267,9 +267,11 @@
@Test
public void fifo() {
- HeaderTable t = new HeaderTable(Integer.MAX_VALUE, HPACK.getLogger());
// Let's add a series of header fields
int NUM_HEADERS = 32;
+ HeaderTable t = new HeaderTable((32 + 4) * NUM_HEADERS, HPACK.getLogger());
+ // ^ ^
+ // entry overhead symbols per entry (max 2x2 digits)
for (int i = 1; i <= NUM_HEADERS; i++) {
String s = String.valueOf(i);
t.put(s, s);
@@ -293,9 +295,11 @@
@Test
public void indexOf() {
- HeaderTable t = new HeaderTable(Integer.MAX_VALUE, HPACK.getLogger());
// Let's put a series of header fields
int NUM_HEADERS = 32;
+ HeaderTable t = new HeaderTable((32 + 4) * NUM_HEADERS, HPACK.getLogger());
+ // ^ ^
+ // entry overhead symbols per entry (max 2x2 digits)
for (int i = 1; i <= NUM_HEADERS; i++) {
String s = String.valueOf(i);
t.put(s, s);