Skip to content

Commit

Permalink
Explain OptIn/Out configuration for Retryable
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Brünings <[email protected]>
  • Loading branch information
leonard84 authored Sep 19, 2022
1 parent 9f18b85 commit bc1f850
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,30 @@ For Maven see the https://docs.gradle.com/enterprise/test-distribution/#maven_ex
=== Test Retry Plugin
See the https://github.com/gradle/test-retry-gradle-plugin#filtering[Filtering] chapter for details.
==== Opt-out mode
With this configuration every class not annotated with `@NonRetryable` will be retried if it fails.
[source,kotlin]
----
tasks.test {
retry {
filter {
includeAnnotationClasses.add("com.gradle.enterprise.testing.annotations.Retryable")
excludeAnnotationClasses.add("com.gradle.enterprise.testing.annotations.NonRetryable")
}
}
}
----
==== Opt-in mode
With this configuration only the classes annotated with `@Retryable` will be retried if they fail.
[source,kotlin]
----
tasks.test {
retry {
filter {
includeAnnotationClasses.add("com.gradle.enterprise.testing.annotations.Retryable")
}
}
}
----

0 comments on commit bc1f850

Please sign in to comment.