lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject svn commit: r1525231 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
Date Sat, 21 Sep 2013 13:10:18 GMT
Author: shaie
Date: Sat Sep 21 13:10:18 2013
New Revision: 1525231

URL: http://svn.apache.org/r1525231
Log:
relax test a little bit

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java?rev=1525231&r1=1525230&r2=1525231&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
Sat Sep 21 13:10:18 2013
@@ -900,7 +900,6 @@ public class TestNumericDocValuesUpdates
   public void testStressMultiThreading() throws Exception {
     final Directory dir = newDirectory();
     IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
-    conf.setMaxBufferedDocs(2);
     final IndexWriter writer = new IndexWriter(dir, conf);
     
     // create index
@@ -930,12 +929,13 @@ public class TestNumericDocValuesUpdates
     for (int i = 0; i < threads.length; i++) {
       final String f = "f" + i;
       final String cf = "cf" + i;
+      final int numThreadUpdates = atLeast(40);
       threads[i] = new Thread("UpdateThread-" + i) {
         @Override
         public void run() {
           try {
-            int numUpdates = atLeast(40);
             Random random = random();
+            int numUpdates = numThreadUpdates;
             while (numUpdates-- > 0) {
               double group = random.nextDouble();
               Term t;
@@ -943,6 +943,7 @@ public class TestNumericDocValuesUpdates
               else if (group < 0.5) t = new Term("updKey", "g1");
               else if (group < 0.8) t = new Term("updKey", "g2");
               else t = new Term("updKey", "g3");
+//              System.out.println("[" + Thread.currentThread().getName() + "] numUpdates="
+ numUpdates + " updateTerm=" + t);
               long updValue = random.nextInt();
               writer.updateNumericDocValue(t, f, updValue);
               writer.updateNumericDocValue(t, cf, updValue * 2);



Mime
View raw message