diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-04-05 11:04:04 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-04-05 14:07:58 +0200 |
commit | b1084cec06681d05a6f822d32acf0390691cdc50 (patch) | |
tree | aa2aea069d91ca3e73b2b23030aba3cef7fab723 /vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java | |
parent | 49e7a8c8cee5e93317593bbd1253f555327e7482 (diff) |
Make max application package size configurable
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java b/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java index 847ab4124d3..a288b9f0c55 100644 --- a/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java +++ b/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java @@ -39,7 +39,7 @@ class ArchiveStreamReaderTest { @Test void entry_size_limit() { Map<String, String> entries = Map.of("foo.xml", "foobar"); - Options options = Options.standard().pathPredicate("foo.xml"::equals).entrySizeLimit(1); + Options options = Options.standard().pathPredicate("foo.xml"::equals).maxEntrySize(1); try { readAll(zip(entries), options); fail("Expected exception"); @@ -48,7 +48,7 @@ class ArchiveStreamReaderTest { entries = Map.of("foo.xml", "foobar", "foo.jar", "0".repeat(100) // File not extracted and thus not subject to size limit ); - Map<String, String> extracted = readAll(zip(entries), options.entrySizeLimit(10)); + Map<String, String> extracted = readAll(zip(entries), options.maxEntrySize(10)); assertEquals(Map.of("foo.xml", "foobar"), extracted); } @@ -56,7 +56,7 @@ class ArchiveStreamReaderTest { void size_limit() { Map<String, String> entries = Map.of("foo.xml", "foo", "bar.xml", "bar"); try { - readAll(zip(entries), Options.standard().sizeLimit(4)); + readAll(zip(entries), Options.standard().maxSize(4)); fail("Expected exception"); } catch (IllegalArgumentException ignored) {} } @@ -75,7 +75,7 @@ class ArchiveStreamReaderTest { "services.xml", false ); - Options options = Options.standard().entrySizeLimit(1024); + Options options = Options.standard().maxEntrySize(1024); tests.forEach((name, expectException) -> { try { readAll(zip(Map.of(name, "foo")), options.pathPredicate(name::equals)); |