You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2014/04/16 03:32:45 UTC

svn commit: r1587769 - in /lucene/dev/trunk/lucene: ./ core/src/test/org/apache/lucene/index/ core/src/test/org/apache/lucene/util/ test-framework/src/java/org/apache/lucene/util/

Author: rmuir
Date: Wed Apr 16 01:32:45 2014
New Revision: 1587769

URL: http://svn.apache.org/r1587769
Log:
LUCENE-5606: un-ignore monster tests, instead annotate with a test group so they can be optionally run

Modified:
    lucene/dev/trunk/lucene/common-build.xml
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPositions.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPostingsBytes.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BTerms.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/Test2BPagedBytes.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java

Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Wed Apr 16 01:32:45 2014
@@ -111,6 +111,7 @@
   <property name="tests.loggingfile" location="${common.dir}/tools/junit4/logging.properties"/>
   <property name="tests.nightly" value="false" />
   <property name="tests.weekly" value="false" />
+  <property name="tests.monster" value="false" />
   <property name="tests.slow" value="true" />
   <property name="tests.cleanthreads.sysprop" value="perMethod"/>
   <property name="tests.asserts.gracious" value="false"/>
@@ -819,6 +820,7 @@
     <attribute name="threadNum" default="1"/>
     <attribute name="tests.nightly" default="${tests.nightly}"/>
     <attribute name="tests.weekly" default="${tests.weekly}"/>
+    <attribute name="tests.monster" default="${tests.monster}"/>
     <attribute name="tests.slow" default="${tests.slow}"/>
     <attribute name="tests.multiplier" default="${tests.multiplier}"/>
       
@@ -950,6 +952,8 @@
             <sysproperty key="tests.nightly" value="@{tests.nightly}"/>
               <!-- set whether or not weekly tests should run -->
             <sysproperty key="tests.weekly" value="@{tests.weekly}"/>
+            <!-- set whether or not monster tests should run -->
+            <sysproperty key="tests.monster" value="@{tests.monster}"/>
               <!-- set whether or not slow tests should run -->
             <sysproperty key="tests.slow" value="@{tests.slow}"/>
               

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java Wed Apr 16 01:32:45 2014
@@ -26,14 +26,15 @@ import org.apache.lucene.store.ByteArray
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
+import org.apache.lucene.util.LuceneTestCase.Monster;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.TimeUnits;
-import org.junit.Ignore;
 
 import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
 
+@SuppressCodecs({"SimpleText", "Memory", "Direct"})
 @TimeoutSuite(millis = 80 * TimeUnits.HOUR)
-@Ignore("takes ~ 45 minutes")
+@Monster("takes ~ 45 minutes")
 public class Test2BBinaryDocValues extends LuceneTestCase {
   
   // indexes Integer.MAX_VALUE docs with a fixed binary field

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java Wed Apr 16 01:32:45 2014
@@ -23,14 +23,15 @@ import org.apache.lucene.document.Numeri
 import org.apache.lucene.store.BaseDirectoryWrapper;
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.TimeUnits;
-import org.junit.Ignore;
+import org.apache.lucene.util.LuceneTestCase.Monster;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 
 import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
 
+@SuppressCodecs({"SimpleText", "Memory", "Direct"})
 @TimeoutSuite(millis = 80 * TimeUnits.HOUR)
-@Ignore("takes ~ 30 minutes")
+@Monster("takes ~ 30 minutes")
 public class Test2BNumericDocValues extends LuceneTestCase {
   
   // indexes Integer.MAX_VALUE docs with an increasing dv field

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPositions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPositions.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPositions.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPositions.java Wed Apr 16 01:32:45 2014
@@ -31,6 +31,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.TimeUnits;
 import org.apache.lucene.util.TestUtil;
+import org.apache.lucene.util.LuceneTestCase.Monster;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.junit.Ignore;
 
@@ -42,10 +43,9 @@ import com.carrotsearch.randomizedtestin
  */
 @SuppressCodecs({ "SimpleText", "Memory", "Direct" })
 @TimeoutSuite(millis = 4 * TimeUnits.HOUR)
+@Monster("uses lots of space and takes a few minutes")
 public class Test2BPositions extends LuceneTestCase {
 
-  // uses lots of space and takes a few minutes
-  @Ignore("Very slow. Enable manually by removing @Ignore.")
   public void test() throws Exception {
     BaseDirectoryWrapper dir = newFSDirectory(createTempDir("2BPositions"));
     if (dir instanceof MockDirectoryWrapper) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPostingsBytes.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPostingsBytes.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPostingsBytes.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BPostingsBytes.java Wed Apr 16 01:32:45 2014
@@ -32,8 +32,8 @@ import org.apache.lucene.store.MockDirec
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.TimeUnits;
+import org.apache.lucene.util.LuceneTestCase.Monster;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
-import org.junit.Ignore;
 
 import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
 
@@ -44,11 +44,9 @@ import com.carrotsearch.randomizedtestin
  */
 @SuppressCodecs({ "SimpleText", "Memory", "Direct" })
 @TimeoutSuite(millis = 4 * TimeUnits.HOUR)
+@Monster("takes ~20GB-30GB of space and 10 minutes, and more heap space sometimes")
 public class Test2BPostingsBytes extends LuceneTestCase {
 
-  // @Absurd @Ignore takes ~20GB-30GB of space and 10 minutes.
-  // with some codecs needs more heap space as well.
-  @Ignore("Very slow. Enable manually by removing @Ignore.")
   public void test() throws Exception {
     BaseDirectoryWrapper dir = newFSDirectory(createTempDir("2BPostingsBytes1"));
     if (dir instanceof MockDirectoryWrapper) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BSortedDocValues.java Wed Apr 16 01:32:45 2014
@@ -25,14 +25,16 @@ import org.apache.lucene.document.Sorted
 import org.apache.lucene.store.BaseDirectoryWrapper;
 import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TimeUnits;
-import org.junit.Ignore;
+import org.apache.lucene.util.LuceneTestCase.Monster;
+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
+
 import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
 
+@SuppressCodecs({"SimpleText", "Memory", "Direct"})
 @TimeoutSuite(millis = 80 * TimeUnits.HOUR)
-@Ignore("very slow")
+@Monster("very slow")
 public class Test2BSortedDocValues extends LuceneTestCase {
   
   // indexes Integer.MAX_VALUE docs with a fixed binary field

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BTerms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BTerms.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BTerms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/Test2BTerms.java Wed Apr 16 01:32:45 2014
@@ -18,6 +18,7 @@ package org.apache.lucene.index;
  */
 
 import org.apache.lucene.util.*;
+import org.apache.lucene.util.LuceneTestCase.Monster;
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.store.*;
 import org.apache.lucene.search.*;
@@ -37,11 +38,12 @@ import java.util.Random;
 // disk (but, should run successfully).  Best to run w/
 // -Dtests.codec=<current codec>, and w/ plenty of RAM, eg:
 //
-//   ant test -Dtest.slow=true -Dtests.heapsize=8g
+//   ant test -Dtests.monster=true -Dtests.heapsize=8g
 //
 //   java -server -Xmx8g -d64 -cp .:lib/junit-4.10.jar:./build/classes/test:./build/classes/test-framework:./build/classes/java -Dlucene.version=4.0-dev -Dtests.directory=MMapDirectory -DtempDir=build -ea org.junit.runner.JUnitCore org.apache.lucene.index.Test2BTerms
 //
 @SuppressCodecs({ "SimpleText", "Memory", "Direct" })
+@Monster("very slow, use 8g heap")
 public class Test2BTerms extends LuceneTestCase {
 
   private final static int TOKEN_LEN = 5;
@@ -145,7 +147,6 @@ public class Test2BTerms extends LuceneT
     }
   }
 
-  @Ignore("Very slow. Enable manually by removing @Ignore.")
   public void test2BTerms() throws IOException {
 
     System.out.println("Starting Test2B");

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/Test2BPagedBytes.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/Test2BPagedBytes.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/Test2BPagedBytes.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/Test2BPagedBytes.java Wed Apr 16 01:32:45 2014
@@ -24,9 +24,10 @@ import org.apache.lucene.store.IOContext
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.store.MockDirectoryWrapper;
+import org.apache.lucene.util.LuceneTestCase.Monster;
 import org.junit.Ignore;
 
-@Ignore("You must increase heap to > 2 G to run this")
+@Monster("You must increase heap to > 2 G to run this")
 public class Test2BPagedBytes extends LuceneTestCase {
 
   public void test() throws Exception {

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java?rev=1587769&r1=1587768&r2=1587769&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java Wed Apr 16 01:32:45 2014
@@ -236,6 +236,7 @@ public abstract class LuceneTestCase ext
 
   public static final String SYSPROP_NIGHTLY = "tests.nightly";
   public static final String SYSPROP_WEEKLY = "tests.weekly";
+  public static final String SYSPROP_MONSTER = "tests.monster";
   public static final String SYSPROP_AWAITSFIX = "tests.awaitsfix";
   public static final String SYSPROP_SLOW = "tests.slow";
   public static final String SYSPROP_BADAPPLES = "tests.badapples";
@@ -263,6 +264,17 @@ public abstract class LuceneTestCase ext
   @Retention(RetentionPolicy.RUNTIME)
   @TestGroup(enabled = false, sysProperty = SYSPROP_WEEKLY)
   public @interface Weekly {}
+  
+  /**
+   * Annotation for monster tests that require special setup (e.g. use tons of disk and RAM)
+   */
+  @Documented
+  @Inherited
+  @Retention(RetentionPolicy.RUNTIME)
+  @TestGroup(enabled = false, sysProperty = SYSPROP_MONSTER)
+  public @interface Monster {
+    String value();
+  }
 
   /**
    * Annotation for tests which exhibit a known issue and are temporarily disabled.