lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1641904 - in /lucene/dev/trunk/lucene: core/ core/src/test/org/apache/lucene/codecs/compressing/ core/src/test/org/apache/lucene/codecs/lucene50/ core/src/test/org/apache/lucene/index/ test-framework/src/java/org/apache/lucene/index/
Date Wed, 26 Nov 2014 19:48:02 GMT
Author: rmuir
Date: Wed Nov 26 19:48:01 2014
New Revision: 1641904

URL: http://svn.apache.org/r1641904
Log:
speed up slowest tests

Modified:
    lucene/dev/trunk/lucene/core/build.xml
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50DocValuesFormat.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexReaderClose.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions2.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java

Modified: lucene/dev/trunk/lucene/core/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/build.xml?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/build.xml (original)
+++ lucene/dev/trunk/lucene/core/build.xml Wed Nov 26 19:48:01 2014
@@ -214,7 +214,7 @@
       
       if (!properties["lockverify.count"]) {
         int count = Boolean.parseBoolean(properties["tests.nightly"]) ?
-          30000 : 2000;
+          30000 : 500;
         count *= Integer.parseInt(properties["tests.multiplier"]);
         properties["lockverify.count"] = count;
       }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingStoredFieldsFormat.java
Wed Nov 26 19:48:01 2014
@@ -33,10 +33,8 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.junit.Test;
 
-import com.carrotsearch.randomizedtesting.annotations.Repeat;
 import com.carrotsearch.randomizedtesting.generators.RandomInts;
 
-@Repeat(iterations=5) // give it a chance to test various compression modes with different
chunk sizes
 public class TestCompressingStoredFieldsFormat extends BaseStoredFieldsFormatTestCase {
 
   @Override

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestCompressingTermVectorsFormat.java
Wed Nov 26 19:48:01 2014
@@ -14,8 +14,6 @@ import org.apache.lucene.index.TermsEnum
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BytesRef;
 
-import com.carrotsearch.randomizedtesting.annotations.Repeat;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -33,7 +31,6 @@ import com.carrotsearch.randomizedtestin
  * limitations under the License.
  */
 
-@Repeat(iterations=5) // give it a chance to test various compression modes with different
chunk sizes
 public class TestCompressingTermVectorsFormat extends BaseTermVectorsFormatTestCase {
 
   @Override

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50DocValuesFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50DocValuesFormat.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50DocValuesFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50DocValuesFormat.java
Wed Nov 26 19:48:01 2014
@@ -59,6 +59,7 @@ public class TestLucene50DocValuesFormat
   // TODO: these big methods can easily blow up some of the other ram-hungry codecs...
   // for now just keep them here, as we want to test this for this format.
   
+  @Slow
   public void testSortedSetVariableLengthBigVsStoredFields() throws Exception {
     int numIterations = atLeast(1);
     for (int i = 0; i < numIterations; i++) {
@@ -74,6 +75,7 @@ public class TestLucene50DocValuesFormat
     }
   }
   
+  @Slow
   public void testSortedVariableLengthBigVsStoredFields() throws Exception {
     int numIterations = atLeast(1);
     for (int i = 0; i < numIterations; i++) {
@@ -89,6 +91,7 @@ public class TestLucene50DocValuesFormat
     }
   }
   
+  @Slow
   public void testTermsEnumFixedWidth() throws Exception {
     int numIterations = atLeast(1);
     for (int i = 0; i < numIterations; i++) {
@@ -96,6 +99,7 @@ public class TestLucene50DocValuesFormat
     }
   }
   
+  @Slow
   public void testTermsEnumVariableWidth() throws Exception {
     int numIterations = atLeast(1);
     for (int i = 0; i < numIterations; i++) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestBinaryDocValuesUpdates.java
Wed Nov 26 19:48:01 2014
@@ -26,6 +26,7 @@ import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.lucene.util.TestUtil;
 import org.junit.Test;
 
@@ -1157,6 +1158,7 @@ public class TestBinaryDocValuesUpdates 
     dir.close();
   }
 
+  @Nightly
   public void testTonsOfUpdates() throws Exception {
     // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM
     Directory dir = newDirectory();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexReaderClose.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexReaderClose.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexReaderClose.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexReaderClose.java
Wed Nov 26 19:48:01 2014
@@ -35,12 +35,12 @@ import org.apache.lucene.util.TestUtil;
 public class TestIndexReaderClose extends LuceneTestCase {
 
   public void testCloseUnderException() throws IOException {
+    Directory dir = newDirectory();
+    IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(random(), new MockAnalyzer(random())));
+    writer.commit();
+    writer.close();
     final int iters = 1000 +  1 + random().nextInt(20);
     for (int j = 0; j < iters; j++) {
-      Directory dir = newDirectory();
-      IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(random(), new MockAnalyzer(random())));
-      writer.commit();
-      writer.close();
       DirectoryReader open = DirectoryReader.open(dir);
       final boolean throwOnClose = !rarely();
       LeafReader wrap = SlowCompositeReaderWrapper.wrap(open);
@@ -90,8 +90,8 @@ public class TestIndexReaderClose extend
       }
       assertEquals(0, count.get());
       wrap.close();
-      dir.close();
     }
+    dir.close();
   }
 
   public void testCoreListenerOnWrapper() throws IOException {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions2.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions2.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions2.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions2.java
Wed Nov 26 19:48:01 2014
@@ -47,11 +47,13 @@ import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.Rethrow;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 
 /** 
  * Causes a bunch of non-aborting and aborting exceptions and checks that
  * no index corruption is ever created
  */
+@SuppressCodecs("SimpleText")
 public class TestIndexWriterExceptions2 extends LuceneTestCase {
   
   // just one thread, serial merge policy, hopefully debuggable
@@ -95,7 +97,7 @@ public class TestIndexWriterExceptions2 
     conf.setMergeScheduler(new SerialMergeScheduler());
     conf.setCodec(codec);
     
-    int numDocs = atLeast(2000);
+    int numDocs = atLeast(500);
     
     IndexWriter iw = new IndexWriter(dir, conf);
     try {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
Wed Nov 26 19:48:01 2014
@@ -43,14 +43,16 @@ import org.apache.lucene.store.MockDirec
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.Rethrow;
 import org.apache.lucene.util.TestUtil;
-import org.junit.Ignore;
 
 /** 
  * Causes a bunch of fake OOM and checks that no other exceptions are delivered instead,
  * no index corruption is ever created.
  */
+@SuppressCodecs("SimpleText")
 public class TestIndexWriterOutOfMemory extends LuceneTestCase {
   
   // just one thread, serial merge policy, hopefully debuggable
@@ -77,7 +79,7 @@ public class TestIndexWriterOutOfMemory 
     
     MockDirectoryWrapper dir = null;
     
-    final int numIterations = TEST_NIGHTLY ? atLeast(100) : atLeast(20);
+    final int numIterations = TEST_NIGHTLY ? atLeast(100) : atLeast(5);
     
     STARTOVER:
     for (int iter = 0; iter < numIterations; iter++) {
@@ -227,27 +229,29 @@ public class TestIndexWriterOutOfMemory 
       return null; // dead
     }
   }
-  
+
   public void testBasics() throws Exception {
     final Random r = new Random(random().nextLong());
     doTest(new Failure() {
       @Override
       public void eval(MockDirectoryWrapper dir) throws IOException {
-        Exception e = new Exception();
-        StackTraceElement stack[] = e.getStackTrace();
-        boolean ok = false;
-        for (int i = 0; i < stack.length; i++) {
-          if (stack[i].getClassName().equals(IndexWriter.class.getName())) {
-            ok = true;
+        if (r.nextInt(3000) == 0) {
+          StackTraceElement stack[] = Thread.currentThread().getStackTrace();
+          boolean ok = false;
+          for (int i = 0; i < stack.length; i++) {
+            if (stack[i].getClassName().equals(IndexWriter.class.getName())) {
+              ok = true;
+            }
+          }
+          if (ok) {
+            throw new OutOfMemoryError("Fake OutOfMemoryError");
           }
-        }
-        if (ok && r.nextInt(3000) == 0) {
-          throw new OutOfMemoryError("Fake OutOfMemoryError");
         }
       }
     });
   }
   
+  @Nightly
   public void testCheckpoint() throws Exception {
     final Random r = new Random(random().nextLong());
     doTest(new Failure() {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
Wed Nov 26 19:48:01 2014
@@ -18,6 +18,7 @@ import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.lucene.util.TestUtil;
 
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
@@ -324,6 +325,7 @@ public class TestMixedDocValuesUpdates e
     dir.close();
   }
 
+  @Nightly
   public void testTonsOfUpdates() throws Exception {
     // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM
     Directory dir = newDirectory();

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=1641904&r1=1641903&r2=1641904&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
Wed Nov 26 19:48:01 2014
@@ -33,6 +33,7 @@ import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.LuceneTestCase.Nightly;
 import org.apache.lucene.util.TestUtil;
 import org.junit.Test;
 
@@ -1248,7 +1249,7 @@ public class TestNumericDocValuesUpdates
     dir.close();
   }
 
-  @Test
+  @Test @Nightly
   public void testTonsOfUpdates() throws Exception {
     // LUCENE-5248: make sure that when there are many updates, we don't use too much RAM
     Directory dir = newDirectory();

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java?rev=1641904&r1=1641903&r2=1641904&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/index/BaseDocValuesFormatTestCase.java
Wed Nov 26 19:48:01 2014
@@ -2451,6 +2451,7 @@ public abstract class BaseDocValuesForma
   }
   
   /** Tests dv against stored fields with threads (all types + missing) */
+  @Slow
   public void testThreads2() throws Exception {
     assumeTrue("Codec does not support getDocsWithField", codecSupportsDocsWithField());
     assumeTrue("Codec does not support SORTED_SET", codecSupportsSortedSet());
@@ -2623,6 +2624,7 @@ public abstract class BaseDocValuesForma
     dir.close();
   }
   
+  @Slow
   public void testThreads3() throws Exception {
     assumeTrue("Codec does not support getDocsWithField", codecSupportsDocsWithField());
     assumeTrue("Codec does not support SORTED_SET", codecSupportsSortedSet());



Mime
View raw message