INNER CODE UNIT · Java
attempt
spring-cloud/spring-cloud-kubernetes · .github/workflows/composites/scripts/run-tests-with-retry.sh:160
attempt=$(( attempt + 1 ))
failed=$(failed_test_classes)
never_ran=$(never_ran_test_classes "${outstanding}")
retry_set=$(join_non_empty "${failed}" "${never_ran}")
# Nothing to retry: every test this shard was asked for ran and passed, yet Maven
# still failed. The failure is therefore somewhere other than the tests, typically a
# later phase of a module whose tests were already green (packaging, the image build,
# installing into the local repository).
#
# This must return rather than fall through. Retrying with an empty test set would
# expand '<include>${testsToRun}</include>' to nothing, match zero classes and exit 0,
# silently reporting a green shard for a build that failed.
if [[ -z "${retry_set}" ]]; then
echo "maven failed but every test of this shard produced a passing report, so the"
echo "failure is outside the tests (packaging, image build, install, ...)."
echo "not retrying."