Apache Lucene open-source search software
LUCENE-5475: upgraded randomized testing to 2.1.1. This will print full annotations on assumption-ignored tests. It also includes more fancy test filtering.:
Dawid Weiss0630aad05e5a
diff --git a/lucene/common-build.xml b/lucene/common-build.xmlindex 7728731fd32..a8f499d294e 100644--- a/lucene/common-build.xml+++ b/lucene/common-build.xml@@ -989,6 +989,7 @@<propertyref prefix="tests.timeoutSuite" /><propertyref prefix="tests.jettyConnector" /><propertyref prefix="tests.disableHdfs" />+ <propertyref prefix="tests.filter" /></syspropertyset><!-- Pass randomized settings to the forked JVM. -->diff --git a/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestGroupFiltering.java b/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestGroupFiltering.javanew file mode 100644index 00000000000..4aa9880f867--- /dev/null+++ b/lucene/core/src/test/org/apache/lucene/util/junitcompat/TestGroupFiltering.java@@ -0,0 +1,61 @@+package org.apache.lucene.util.junitcompat;++import java.lang.annotation.Documented;+import java.lang.annotation.Inherited;+import java.lang.annotation.Retention;+import java.lang.annotation.RetentionPolicy;++import org.apache.lucene.util.LuceneTestCase;++import com.carrotsearch.randomizedtesting.annotations.TestGroup;++/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++public class TestGroupFiltering extends LuceneTestCase {+ @Documented+ @Inherited+ @Retention(RetentionPolicy.RUNTIME)+ @TestGroup(enabled = false)+ public @interface Foo {}++ @Documented+ @Inherited+ @Retention(RetentionPolicy.RUNTIME)+ @TestGroup(enabled = false)+ public @interface Bar {}++ @Documented+ @Inherited+ @Retention(RetentionPolicy.RUNTIME)+ @TestGroup(enabled = false)+ public @interface Jira {+ String bug();+ }++ @Foo+ public void testFoo() {}++ @Foo @Bar+ public void testFooBar() {}++ @Bar+ public void testBar() {}++ @Jira(bug = "JIRA bug reference")+ public void testJira() {}+}diff --git a/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java b/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.javaindex beca55210a3..48792f175e6 100644--- a/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java+++ b/lucene/core/src/test/org/apache/lucene/util/junitcompat/WithNestedTests.java@@ -28,6 +28,7 @@ import org.apache.lucene.util.TestRuleIgnoreTestSuites;import org.apache.lucene.util.TestRuleMarkFailure;import org.junit.After;import org.junit.Assert;+import org.junit.Assume;import org.junit.Before;import org.junit.ClassRule;import org.junit.Rule;@@ -73,6 +74,13 @@ public abstract class WithNestedTests {private TestRuleIgnoreAfterMaxFailures prevRule;protected void before() throws Throwable {+ String filter = System.getProperty("tests.filter");+ if (filter != null && !filter.trim().isEmpty()) {+ // We're running with a complex test filter. This will affect nested tests anyway+ // so ignore them.+ Assume.assumeTrue(false);+ }+TestRuleIgnoreAfterMaxFailures newRule = new TestRuleIgnoreAfterMaxFailures(Integer.MAX_VALUE);prevRule = LuceneTestCase.replaceMaxFailureRule(newRule);}diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.propertiesindex 04de549c2f9..f2730afb2dd 100644--- a/lucene/ivy-versions.properties+++ b/lucene/ivy-versions.properties@@ -8,7 +8,7 @@/cglib/cglib-nodep = 2.2/com.adobe.xmp/xmpcore = 5.1.2-com.carrotsearch.randomizedtesting.version = 2.0.13+com.carrotsearch.randomizedtesting.version = 2.1.1/com.carrotsearch.randomizedtesting/junit4-ant = ${com.carrotsearch.randomizedtesting.version}/com.carrotsearch.randomizedtesting/randomizedtesting-runner = ${com.carrotsearch.randomizedtesting.version}diff --git a/lucene/licenses/junit4-ant-2.0.13.jar.sha1 b/lucene/licenses/junit4-ant-2.0.13.jar.sha1deleted file mode 100644index 4c41a16e0fe..00000000000--- a/lucene/licenses/junit4-ant-2.0.13.jar.sha1+++ /dev/null@@ -1 +0,0 @@-33904a47c5f920d270437ea1075cc9fa5ecb8099diff --git a/lucene/licenses/junit4-ant-2.1.1.jar.sha1 b/lucene/licenses/junit4-ant-2.1.1.jar.sha1new file mode 100644index 00000000000..4340e4c8609--- /dev/null+++ b/lucene/licenses/junit4-ant-2.1.1.jar.sha1@@ -0,0 +1 @@+a8a7371e11a8b3a4a3eeea81ad3cedafe3e3550ediff --git a/lucene/licenses/randomizedtesting-runner-2.0.13.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.0.13.jar.sha1deleted file mode 100644index 3ad2bb603f7..00000000000--- a/lucene/licenses/randomizedtesting-runner-2.0.13.jar.sha1+++ /dev/null@@ -1 +0,0 @@-bdacac985583621c50de414b1d45b1e6e43f6d1fdiff --git a/lucene/licenses/randomizedtesting-runner-2.1.1.jar.sha1 b/lucene/licenses/randomizedtesting-runner-2.1.1.jar.sha1new file mode 100644index 00000000000..2923eedf9fe--- /dev/null+++ b/lucene/licenses/randomizedtesting-runner-2.1.1.jar.sha1@@ -0,0 +1 @@+5908c4e714dab40ccc892993a21537c7c0d6210c