lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject lucene-solr:master: don't do random() per byte in this test
Date Fri, 12 Aug 2016 20:01:28 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master 48cc59993 -> f485d29ca


don't do random() per byte in this test


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f485d29c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f485d29c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f485d29c

Branch: refs/heads/master
Commit: f485d29cadef1cbaafd9b69d205ffe73484d9dc9
Parents: 48cc599
Author: Mike McCandless <mikemccand@apache.org>
Authored: Fri Aug 12 16:01:13 2016 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Fri Aug 12 16:01:13 2016 -0400

----------------------------------------------------------------------
 .../core/src/test/org/apache/lucene/store/TestMmapDirectory.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f485d29c/lucene/core/src/test/org/apache/lucene/store/TestMmapDirectory.java
----------------------------------------------------------------------
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 b87a21b..5790e05 100644
--- a/lucene/core/src/test/org/apache/lucene/store/TestMmapDirectory.java
+++ b/lucene/core/src/test/org/apache/lucene/store/TestMmapDirectory.java
@@ -19,6 +19,7 @@ package org.apache.lucene.store;
 
 import java.io.IOException;
 import java.nio.file.Path;
+import java.util.Random;
 import java.util.concurrent.CountDownLatch;
 
 // import org.junit.Ignore;
@@ -47,8 +48,9 @@ public class TestMmapDirectory extends BaseDirectoryTestCase {
     for (int iter = 0; iter < 10; iter++) {
       Directory dir = getDirectory(createTempDir("testAceWithThreads"));
       IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+      Random random = random();
       for (int i = 0; i < 8 * 1024 * 1024; i++) {
-        out.writeInt(random().nextInt());
+        out.writeInt(random.nextInt());
       }
       out.close();
       IndexInput in = dir.openInput("test", IOContext.DEFAULT);


Mime
View raw message