Gradle check retry (#2638)
* Add retry plugin support for Test implementations Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Update test retry parameters Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Remove CI environment check for test retries Signed-off-by: Kunal Kotwani <kkotwani@amazon.com> * Update retry count for tests Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
This commit is contained in:
parent
8ea246e70e
commit
65cc56e754
21
build.gradle
21
build.gradle
|
@ -49,6 +49,7 @@ plugins {
|
||||||
id 'opensearch.docker-support'
|
id 'opensearch.docker-support'
|
||||||
id 'opensearch.global-build-info'
|
id 'opensearch.global-build-info'
|
||||||
id "com.diffplug.spotless" version "6.3.0" apply false
|
id "com.diffplug.spotless" version "6.3.0" apply false
|
||||||
|
id "org.gradle.test-retry" version "1.3.1" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: 'gradle/build-complete.gradle'
|
apply from: 'gradle/build-complete.gradle'
|
||||||
|
@ -232,7 +233,7 @@ allprojects {
|
||||||
tasks.withType(JavaCompile).configureEach { JavaCompile compile ->
|
tasks.withType(JavaCompile).configureEach { JavaCompile compile ->
|
||||||
// See please https://bugs.openjdk.java.net/browse/JDK-8209058
|
// See please https://bugs.openjdk.java.net/browse/JDK-8209058
|
||||||
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_11) {
|
if (BuildParams.runtimeJavaVersion > JavaVersion.VERSION_11) {
|
||||||
compile.options.compilerArgs << '-Werror'
|
compile.options.compilerArgs << '-Werror'
|
||||||
}
|
}
|
||||||
compile.options.compilerArgs << '-Xlint:auxiliaryclass'
|
compile.options.compilerArgs << '-Xlint:auxiliaryclass'
|
||||||
compile.options.compilerArgs << '-Xlint:cast'
|
compile.options.compilerArgs << '-Xlint:cast'
|
||||||
|
@ -386,6 +387,18 @@ gradle.projectsEvaluated {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test retry configuration
|
||||||
|
subprojects {
|
||||||
|
apply plugin: "org.gradle.test-retry"
|
||||||
|
tasks.withType(Test).configureEach {
|
||||||
|
retry {
|
||||||
|
failOnPassedAfterRetry = false
|
||||||
|
maxRetries = 3
|
||||||
|
maxFailures = 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// eclipse configuration
|
// eclipse configuration
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
@ -445,9 +458,9 @@ allprojects {
|
||||||
tasks.named('eclipse') { dependsOn 'cleanEclipse', 'copyEclipseSettings' }
|
tasks.named('eclipse') { dependsOn 'cleanEclipse', 'copyEclipseSettings' }
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
tasks.findByName("eclipseJdt")?.configure {
|
tasks.findByName("eclipseJdt")?.configure {
|
||||||
dependsOn 'copyEclipseSettings'
|
dependsOn 'copyEclipseSettings'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue