lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r620669 - /lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java
Date Mon, 11 Feb 2008 23:37:48 GMT
Author: yonik
Date: Mon Feb 11 15:37:39 2008
New Revision: 620669

URL: http://svn.apache.org/viewvc?rev=620669&view=rev
Log:
change seed for each test

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=620669&r1=620668&r2=620669&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestStressIndexing2.java Mon Feb 11
15:37:39 2008
@@ -32,9 +32,10 @@
   static boolean autoCommit=false;
   static int mergeFactor=3;
   static int maxBufferedDocs=3;
-  
+  static int seed=0;
+
   static Random r = new Random(0);
- 
+
 
   public void testRandom() throws Exception {
     Directory dir1 = new RAMDirectory();
@@ -58,6 +59,7 @@
       autoCommit=r.nextBoolean();
       mergeFactor=r.nextInt(3)+2;
       maxBufferedDocs=r.nextInt(3)+2;
+      seed++;
 
       int nThreads=r.nextInt(5)+1;
       int iter=r.nextInt(10)+1;
@@ -367,7 +369,7 @@
 
     public void run() {
       try {
-        r = new Random(base+range);
+        r = new Random(base+range+seed);
         for (int i=0; i<iterations; i++) {
           indexDoc();
         }



Mime
View raw message