diff --git a/.github/workflows/nightly-artifacts.yml b/.github/workflows/nightly-artifacts.yml index a22b4773..c3a94d7e 100644 --- a/.github/workflows/nightly-artifacts.yml +++ b/.github/workflows/nightly-artifacts.yml @@ -111,8 +111,10 @@ jobs: exit 1 fi + # Also on cancelled(): the job timeout cancels a hanging run, and the reports of the + # classes that did finish carry the timed-out tests' full stacks. - name: Keep the test reports on a failure - if: failure() + if: failure() || cancelled() uses: actions/upload-artifact@v7 with: name: test-results diff --git a/.github/workflows/pr-compile-check.yml b/.github/workflows/pr-compile-check.yml index e0e1239b..982720f8 100644 --- a/.github/workflows/pr-compile-check.yml +++ b/.github/workflows/pr-compile-check.yml @@ -286,8 +286,10 @@ jobs: if-no-files-found: ignore retention-days: 14 + # Also on cancelled(): the job timeout cancels a hanging run, and the reports of the + # classes that did finish carry the timed-out tests' full stacks. - name: Keep the test reports on a failure - if: failure() + if: failure() || cancelled() uses: actions/upload-artifact@v7 with: name: test-results diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 1818a350..191a7aef 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -130,8 +130,10 @@ jobs: exit 1 fi + # Also on cancelled(): the job timeout cancels a hanging run, and the reports of the + # classes that did finish carry the timed-out tests' full stacks. - name: Keep the test reports on a failure - if: failure() + if: failure() || cancelled() uses: actions/upload-artifact@v7 with: name: test-results diff --git a/build.gradle.kts b/build.gradle.kts index bf9eba28..d8629c56 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -151,6 +151,11 @@ subprojects { */ systemProperty("junit.jupiter.execution.timeout.default", "2m") systemProperty("junit.jupiter.execution.timeout.thread.mode.default", "SEPARATE_THREAD") + // The default short format prints only the first frame of each cause, which for a + // timed-out test is the line it hung in but not the call that blocked there. + testLogging { + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + } finalizedBy(checkTestUserHome) }