Apache Lucene open-source search software
LUCENE-10253: Remove the BadApple annotation. (#468)
Adrien Grandf605b4a69278
diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.pyindex 98c141a7db4..0a9ac64c3bc 100755--- a/dev-tools/scripts/buildAndPushRelease.py+++ b/dev-tools/scripts/buildAndPushRelease.py@@ -112,8 +112,8 @@ def prepare(root, version, gpg_key_id, gpg_password, gpg_home=None, sign_gradle=checkDOAPfiles(version)if not dev_mode:- print(' ./gradlew --no-daemon -Dtests.badapples=false clean check')- run('./gradlew --no-daemon -Dtests.badapples=false clean check')+ print(' ./gradlew --no-daemon clean check')+ run('./gradlew --no-daemon clean check')else:print(' skipping precommit check due to dev-mode')diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.pyindex 7a7e80965f7..ad350990de7 100755--- a/dev-tools/scripts/smokeTestRelease.py+++ b/dev-tools/scripts/smokeTestRelease.py@@ -1126,9 +1126,6 @@ def main():def smokeTest(java, baseURL, gitRevision, version, tmpDir, isSigned, local_keys, testArgs, downloadOnly=False):startTime = datetime.datetime.now()- # disable flakey tests for smoke-tester runs:- testArgs = '-Dtests.badapples=false %s' % testArgs-# Tests annotated @Nightly are more resource-intensive but often cover# important code paths. They're disabled by default to preserve a good# developer experience, but we enable them for smoke tests where we want gooddiff --git a/dev-tools/test-patch/lucene-solr-yetus-personality.sh b/dev-tools/test-patch/lucene-solr-yetus-personality.shindex ee457f6a976..732ff2b7590 100644--- a/dev-tools/test-patch/lucene-solr-yetus-personality.sh+++ b/dev-tools/test-patch/lucene-solr-yetus-personality.sh@@ -104,7 +104,7 @@ function personality_modules;;junit|unit)moduleType="submodules"- extra="-Dtests.badapples=false test"+ extra="test";;*);;diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 819e70c8c08..2f76a2df68c 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -27,7 +27,9 @@ Bug FixesOther----------------------(No changes)++* LUCENE-10253: The @BadApple annotation has been removed from the test+ framework. (Adrien Grand)======================= Lucene 9.1.0 =======================diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnVMError.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnVMError.javaindex 8c6fb2f3a06..36f8c11233f 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnVMError.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnVMError.java@@ -280,8 +280,6 @@ public class TestIndexWriterOnVMError extends LuceneTestCase {}@Nightly- // commented out on: 01-Apr-2019- // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 14-Oct-2018public void testCheckpoint() throws Exception {final Random r = new Random(random().nextLong());doTest(diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.javaindex a4132917947..0c3f798bc8d 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java@@ -216,7 +216,6 @@ public abstract class LuceneTestCase extends Assert {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";/** @see #ignoreAfterMaxFailures */public static final String SYSPROP_MAXFAILURES = "tests.maxfailures";@@ -267,27 +266,6 @@ public abstract class LuceneTestCase extends Assert {@TestGroup(enabled = true, sysProperty = SYSPROP_SLOW)public @interface Slow {}- /**- * Annotation for tests that fail frequently and are not executed in Jenkins builds to not spam- * mailing lists with false reports.- *- * <p>Tests are turned on for developers by default. If you want to disable them, set:- *- * <pre>- * -Dtests.badapples=false- * </pre>- *- * (or do this through {@code ~./lucene.build.properties}).- */- @Documented- @Inherited- @Retention(RetentionPolicy.RUNTIME)- @TestGroup(enabled = true, sysProperty = SYSPROP_BADAPPLES)- public @interface BadApple {- /** Point to JIRA entry. */- public String bugUrl();- }-/*** Annotation for test classes that should avoid certain codec types (because they are expensive,* for example).@@ -441,11 +419,6 @@ public abstract class LuceneTestCase extends Assert {systemPropertyAsBoolean(SYSPROP_AWAITSFIX, AwaitsFix.class.getAnnotation(TestGroup.class).enabled());- /** Whether or not {@link BadApple} tests should run. */- public static final boolean TEST_BADAPPLES =- systemPropertyAsBoolean(- SYSPROP_BADAPPLES, BadApple.class.getAnnotation(TestGroup.class).enabled());-/** Whether or not {@link Slow} tests should run. */public static final boolean TEST_SLOW =systemPropertyAsBoolean(SYSPROP_SLOW, Slow.class.getAnnotation(TestGroup.class).enabled());diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java b/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.javaindex 0f9664b9538..1d3a53f2e9b 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java@@ -178,7 +178,6 @@ public final class RunListenerPrintReproduceInfo extends RunListener {if (TEST_SLOW) addVmOpt(b, SYSPROP_SLOW, TEST_SLOW);if (TEST_MONSTER) addVmOpt(b, SYSPROP_MONSTER, TEST_MONSTER);if (TEST_AWAITSFIX) addVmOpt(b, SYSPROP_AWAITSFIX, TEST_AWAITSFIX);- if (TEST_BADAPPLES) addVmOpt(b, SYSPROP_BADAPPLES, TEST_BADAPPLES);// Codec, postings, directories.if (!TEST_CODEC.equals("random")) addVmOpt(b, "tests.codec", TEST_CODEC);