Retry tests in CI (#7106)
This commit is contained in:
parent
3d3355305b
commit
fe73fb737a
|
@ -56,6 +56,7 @@ dependencies {
|
|||
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.2")
|
||||
// Needed for japicmp but not automatically brought in for some reason.
|
||||
implementation("com.google.guava:guava:33.4.0-jre")
|
||||
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.19.1")
|
||||
implementation("com.squareup:javapoet:1.13.0")
|
||||
implementation("com.squareup.wire:wire-compiler")
|
||||
implementation("com.squareup.wire:wire-gradle-plugin")
|
||||
|
|
|
@ -113,6 +113,14 @@ tasks {
|
|||
)
|
||||
}
|
||||
|
||||
val defaultMaxRetries = if (System.getenv().containsKey("CI")) 2 else 0
|
||||
val maxTestRetries = gradle.startParameter.projectProperties["maxTestRetries"]?.toInt() ?: defaultMaxRetries
|
||||
|
||||
develocity.testRetry {
|
||||
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
|
||||
maxRetries.set(maxTestRetries);
|
||||
}
|
||||
|
||||
testLogging {
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
showExceptions = true
|
||||
|
|
Loading…
Reference in New Issue