MINOR: use built-in "--rerun" to replace "-Prerun-tests" (#13343)

Reviewers: Ismael Juma <ismael@juma.me.uk>
This commit is contained in:
Chia-Ping Tsai 2023-03-06 10:53:49 +08:00 committed by GitHub
parent 1ae6405c47
commit 3b5bb2f6a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 19 deletions

View File

@ -37,15 +37,15 @@ Follow instructions in https://kafka.apache.org/quickstart
./gradlew integrationTest ./gradlew integrationTest
### Force re-running tests without code change ### ### Force re-running tests without code change ###
./gradlew -Prerun-tests test ./gradlew test --rerun
./gradlew -Prerun-tests unitTest ./gradlew unitTest --rerun
./gradlew -Prerun-tests integrationTest ./gradlew integrationTest --rerun
### Running a particular unit/integration test ### ### Running a particular unit/integration test ###
./gradlew clients:test --tests RequestResponseTest ./gradlew clients:test --tests RequestResponseTest
### Repeatedly running a particular unit/integration test ### ### 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 ### ### Running a particular test method within a unit/integration test ###
./gradlew core:test --tests kafka.api.ProducerFailureHandlingTest.testCannotSendToInternalTopic ./gradlew core:test --tests kafka.api.ProducerFailureHandlingTest.testCannotSendToInternalTopic

View File

@ -437,11 +437,6 @@ subprojects {
maxRetries = userMaxTestRetries maxRetries = userMaxTestRetries
maxFailures = userMaxTestRetryFailures 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) { task integrationTest(type: Test, dependsOn: compileJava) {
@ -487,11 +482,6 @@ subprojects {
maxRetries = userMaxTestRetries maxRetries = userMaxTestRetries
maxFailures = userMaxTestRetryFailures 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) { task unitTest(type: Test, dependsOn: compileJava) {
@ -535,11 +525,6 @@ subprojects {
maxRetries = userMaxTestRetries maxRetries = userMaxTestRetries
maxFailures = userMaxTestRetryFailures 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 // remove test output from all test types