You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ch...@apache.org on 2024/03/26 10:35:23 UTC

(lucene) branch main updated: Avoid creating large buffer in TestMMapDirectory.testWithRandom (#13214)

This is an automated email from the ASF dual-hosted git repository.

chegar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 209aa05c0c3 Avoid creating large buffer in TestMMapDirectory.testWithRandom (#13214)
209aa05c0c3 is described below

commit 209aa05c0c364cbc9c08be514848f7fb2f3c258b
Author: Chris Hegarty <62...@users.noreply.github.com>
AuthorDate: Tue Mar 26 10:35:17 2024 +0000

    Avoid creating large buffer in TestMMapDirectory.testWithRandom (#13214)
    
    This commit avoids creating an unnecessary large buffer in TestMMapDirectory.testWithRandom.
---
 lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java b/lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java
index 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);