mirror of https://github.com/apache/lucene.git
don't do random() per byte in this test
This commit is contained in:
parent
48cc599936
commit
f485d29cad
|
@ -19,6 +19,7 @@ package org.apache.lucene.store;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.Random;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
// import org.junit.Ignore;
|
// import org.junit.Ignore;
|
||||||
|
@ -47,8 +48,9 @@ public class TestMmapDirectory extends BaseDirectoryTestCase {
|
||||||
for (int iter = 0; iter < 10; iter++) {
|
for (int iter = 0; iter < 10; iter++) {
|
||||||
Directory dir = getDirectory(createTempDir("testAceWithThreads"));
|
Directory dir = getDirectory(createTempDir("testAceWithThreads"));
|
||||||
IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
|
IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
|
||||||
|
Random random = random();
|
||||||
for (int i = 0; i < 8 * 1024 * 1024; i++) {
|
for (int i = 0; i < 8 * 1024 * 1024; i++) {
|
||||||
out.writeInt(random().nextInt());
|
out.writeInt(random.nextInt());
|
||||||
}
|
}
|
||||||
out.close();
|
out.close();
|
||||||
IndexInput in = dir.openInput("test", IOContext.DEFAULT);
|
IndexInput in = dir.openInput("test", IOContext.DEFAULT);
|
||||||
|
|
Loading…
Reference in New Issue