remove failure afterTask

This commit is contained in:
David Arthur 2024-12-05 16:47:28 -05:00 committed by GitHub
parent 967e16e304
commit 6bf8786d9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 13 deletions

View File

@ -546,7 +546,6 @@ subprojects {
task quarantinedTest(type: Test, dependsOn: compileJava) { task quarantinedTest(type: Test, dependsOn: compileJava) {
ext { ext {
isGithubActions = System.getenv('GITHUB_ACTIONS') != null isGithubActions = System.getenv('GITHUB_ACTIONS') != null
hadFailure = false // Used to track if any tests failed, see afterSuite below
} }
// Disable caching and up-to-date for this task. We always want quarantined tests // Disable caching and up-to-date for this task. We always want quarantined tests
@ -585,13 +584,6 @@ subprojects {
} }
} }
// As we process results, check if there were any test failures.
afterSuite { desc, result ->
if (result.resultType == TestResult.ResultType.FAILURE) {
ext.hadFailure = true
}
}
// This closure will copy JUnit XML files out of the sub-project's build directory and into // This closure will copy JUnit XML files out of the sub-project's build directory and into
// a top-level build/junit-xml directory. This is necessary to avoid reporting on tests which // a top-level build/junit-xml directory. This is necessary to avoid reporting on tests which
// were not run, but instead were restored via FROM-CACHE. See KAFKA-17479 for more details. // were not run, but instead were restored via FROM-CACHE. See KAFKA-17479 for more details.
@ -605,11 +597,6 @@ subprojects {
ant.include(name: "**/*.xml") ant.include(name: "**/*.xml")
} }
} }
// If there were any test failures, we want to fail the task to prevent the failures
// from being cached.
if (ext.hadFailure) {
throw new GradleException("Failing this task since '${project.name}:${name}' had test failures.")
}
} }
} }
} }