From 11dfaa4c0bbd4fd8a99232f746140ac2f00c1c64 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Thu, 23 Jan 2025 13:12:28 -0500 Subject: [PATCH] Try automatically re-running failed tests This will try to rerun failed tests up to three times. The side effect is that a very broken test run will take much longer to complete, but it is hoped for those few https://github.com/eclipse-cdt/cdt/labels/flakytests in the system this will resolve the issue. Note this is applied only to the GitHub actions run, not to Jenkins run where we build releases from. Ideally we don't want to do that there. In a future commit we can consider removing flakyTest from -DexcludedGroups too. See [surefire docs](https://maven.apache.org/surefire/maven-surefire-plugin/examples/rerun-failing-tests.html) for details. --- .github/workflows/build-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0b3e9a215af..ae26401b5be 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -57,7 +57,8 @@ jobs: -DexcludedGroups=flakyTest,slowTest \ -Ddsf.gdb.tests.timeout.multiplier=50 \ -Ddsf-gdb.skip.tests=$(test ${{ steps.filter.outputs.dsf }} == 'false' && echo 'true' || echo 'false') \ - -Dindexer.timeout=300 + -Dindexer.timeout=300 \ + -Dsurefire.rerunFailingTestsCount=3 - name: Upload Logs uses: actions/upload-artifact@v4 if: success() || failure()