Skip to content

Commit

Permalink
Avoid creating large buffer in TestMMapDirectory.testWithRandom (#13214)
Browse files Browse the repository at this point in the history
This commit avoids creating an unnecessary large buffer in TestMMapDirectory.testWithRandom.
  • Loading branch information
ChrisHegarty committed Mar 26, 2024
1 parent a2ca63f commit a853ecf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void testMadviseAvail() throws Exception {

// 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);

Expand Down

0 comments on commit a853ecf

Please sign in to comment.