You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2023/03/06 02:54:09 UTC

[kafka] branch trunk updated: MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)

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

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 3b5bb2f6a2a MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)
3b5bb2f6a2a is described below

commit 3b5bb2f6a2a6b375b8eda426d8243d9dae679efe
Author: Chia-Ping Tsai <ch...@gmail.com>
AuthorDate: Mon Mar 6 10:53:49 2023 +0800

    MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)
    
    Reviewers: Ismael Juma <is...@juma.me.uk>
---
 README.md    |  8 ++++----
 build.gradle | 15 ---------------
 2 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/README.md b/README.md
index 22b38df95b6..394da1eadca 100644
--- a/README.md
+++ b/README.md
@@ -37,15 +37,15 @@ Follow instructions in https://kafka.apache.org/quickstart
     ./gradlew integrationTest
     
 ### Force re-running tests without code change ###
-    ./gradlew -Prerun-tests test
-    ./gradlew -Prerun-tests unitTest
-    ./gradlew -Prerun-tests integrationTest
+    ./gradlew test --rerun
+    ./gradlew unitTest --rerun
+    ./gradlew integrationTest --rerun
 
 ### Running a particular unit/integration test ###
     ./gradlew clients:test --tests RequestResponseTest
 
 ### Repeatedly running a particular unit/integration test ###
-    I=0; while ./gradlew clients:test -Prerun-tests --tests RequestResponseTest --fail-fast; do (( I=$I+1 )); echo "Completed run: $I"; sleep 1; done
+    I=0; while ./gradlew clients:test --tests RequestResponseTest --rerun --fail-fast; do (( I=$I+1 )); echo "Completed run: $I"; sleep 1; done
 
 ### Running a particular test method within a unit/integration test ###
     ./gradlew core:test --tests kafka.api.ProducerFailureHandlingTest.testCannotSendToInternalTopic
diff --git a/build.gradle b/build.gradle
index d090124559a..f7a071680b8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -437,11 +437,6 @@ subprojects {
       maxRetries = userMaxTestRetries
       maxFailures = userMaxTestRetryFailures
     }
-
-    // Allows devs to run tests in a loop to debug flaky tests. See README.
-    if (project.hasProperty("rerun-tests")) {
-      outputs.upToDateWhen { false }
-    }
   }
 
   task integrationTest(type: Test, dependsOn: compileJava) {
@@ -487,11 +482,6 @@ subprojects {
       maxRetries = userMaxTestRetries
       maxFailures = userMaxTestRetryFailures
     }
-
-    // Allows devs to run tests in a loop to debug flaky tests. See README.
-    if (project.hasProperty("rerun-tests")) {
-      outputs.upToDateWhen { false }
-    }
   }
 
   task unitTest(type: Test, dependsOn: compileJava) {
@@ -535,11 +525,6 @@ subprojects {
       maxRetries = userMaxTestRetries
       maxFailures = userMaxTestRetryFailures
     }
-
-    // Allows devs to run tests in a loop to debug flaky tests. See README.
-    if (project.hasProperty("rerun-tests")) {
-      outputs.upToDateWhen { false }
-    }
   }
 
   // remove test output from all test types