diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 7fa7a202..03d366a9 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -85,4 +85,24 @@ jobs: - name: Test on JDK 10 if: matrix.java-version == '10' - run: ./mvnw -B -ntp -Djvm="$JAVA_HOME_10_X64/bin/java" verify + # Zulu 10.0.2's forked test JVM intermittently crashes while starting + # on ubuntu-22.04 runners ("The forked VM terminated without properly + # saying goodbye", Tests run: 0). The failure is non-deterministic and + # happens before any test class loads, so retry the suite once before + # reporting the step as failed. + run: | + set +e + status=0 + for attempt in 1 2; do + echo "::group::JDK 10 verify attempt ${attempt}" + ./mvnw -B -ntp -Djvm="$JAVA_HOME_10_X64/bin/java" verify + status=$? + echo "::endgroup::" + if [ "${status}" -eq 0 ]; then + exit 0 + fi + if [ "${attempt}" -eq 1 ]; then + echo "::warning::JDK 10 verify attempt 1 failed (exit ${status}); retrying." + fi + done + exit "${status}"