KAFKA-17931 Revise the `specifying-test-retries` section in README (#17679)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Ted Yan 2024-11-05 21:09:09 -06:00 committed by GitHub
parent 3e093062d2
commit bc3e6369b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -62,15 +62,15 @@ to `log4j.logger.org.apache.kafka=INFO` and then run:
And you should see `INFO` level logs in the file under the `clients/build/test-results/test` directory.
### Specifying test retries ###
By default, each failed test is retried once up to a maximum of three total retries per test run.
Tests are retried at the end of the test task. Adjust these parameters in the following way:
Retries are disabled by default, but you can set maxTestRetryFailures and maxTestRetries to enable retries.
The following example declares -PmaxTestRetries=1 and -PmaxTestRetryFailures=3 to enable a failed test to be retried once, with a total retry limit of 3.
./gradlew test -PmaxTestRetries=1 -PmaxTestRetryFailures=3
Additionally, quarantined tests are automatically retried three times up to a total of
20 retries per run. This is controlled by similar parameters.
The quarantinedTest task also has no retries by default, but you can set maxQuarantineTestRetries and maxQuarantineTestRetryFailures to enable retries, similar to the test task.
./gradlew test -PmaxQuarantineTestRetries=3 -PmaxQuarantineTestRetryFailures=20
./gradlew quarantinedTest -PmaxQuarantineTestRetries=3 -PmaxQuarantineTestRetryFailures=20
See [Test Retry Gradle Plugin](https://github.com/gradle/test-retry-gradle-plugin) for and [build.yml](.github/workflows/build.yml) more details.