Retry mosquitto tests as they appear to be flaky

pull/7819/head
Juliusz Sosinowicz 2024-08-01 14:17:19 +02:00
parent 1b8254d668
commit 4c86219afa
1 changed files with 11 additions and 1 deletions

View File

@ -80,4 +80,14 @@ jobs:
- name: Run mosquitto tests
working-directory: ./mosquitto
run: |
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest
# Retry up to five times
for i in {1..5}; do
TEST_RES=0
make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
if [ "$TEST_RES" -eq "0" ]; then
break
fi
done
if [ "$TEST_RES" -ne "0" ]; then
exit $TEST_RES
fi