You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2013/09/21 15:10:18 UTC

svn commit: r1525231 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java

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