You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2021/12/01 17:03:15 UTC

[lucene] branch main updated: LUCENE-10253: Remove the BadApple annotation. (#468)

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new f605b4a  LUCENE-10253: Remove the BadApple annotation. (#468)
f605b4a is described below

commit f605b4a692789e6b76a784a616d871db710823a8
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Wed Dec 1 18:03:02 2021 +0100

    LUCENE-10253: Remove the BadApple annotation. (#468)
---
 dev-tools/scripts/buildAndPushRelease.py           |  4 ++--
 dev-tools/scripts/smokeTestRelease.py              |  3 ---
 .../test-patch/lucene-solr-yetus-personality.sh    |  2 +-
 lucene/CHANGES.txt                                 |  4 +++-
 .../lucene/index/TestIndexWriterOnVMError.java     |  2 --
 .../org/apache/lucene/util/LuceneTestCase.java     | 27 ----------------------
 .../lucene/util/RunListenerPrintReproduceInfo.java |  1 -
 7 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/dev-tools/scripts/buildAndPushRelease.py b/dev-tools/scripts/buildAndPushRelease.py
index 98c141a..0a9ac64 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.py
index 7a7e809..ad35099 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 good
diff --git a/dev-tools/test-patch/lucene-solr-yetus-personality.sh b/dev-tools/test-patch/lucene-solr-yetus-personality.sh
index ee457f6..732ff2b 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.txt
index 819e70c..2f76a2d 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -27,7 +27,9 @@ Bug Fixes
 
 Other
 ---------------------
-(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.java
index 8c6fb2f..36f8c11 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-2018
   public 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.java
index a413291..0c3f798 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";
@@ -268,27 +267,6 @@ public abstract class LuceneTestCase extends Assert {
   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.java
index 0f9664b..1d3a53f 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);