Apache Lucene open-source search software
Avoid creating large buffer in TestMMapDirectory.testWithRandom (#13214)
Chris Hegarty209aa05c0c36
diff --git a/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.javaindex 7bec6d5315c..d068dde28f7 100644--- a/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java+++ b/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java@@ -100,7 +100,7 @@ public class TestMMapDirectory extends BaseDirectoryTestCase {// Opens the input with IOContext.RANDOM to ensure basic code path coverage for POSIX_MADV_RANDOM.public void testWithRandom() throws Exception {- final int size = 8 * 1024 * 1024; // large enough to trigger madvise+ final int size = 8 * 1024;byte[] bytes = new byte[size];random().nextBytes(bytes);