Skip to content

Commit

Permalink
Limit time for running model tests
Browse files Browse the repository at this point in the history
Workaround for keycloak#9648
  • Loading branch information
hmlnarik committed Jan 20, 2022
1 parent 7b89d15 commit 2877482
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testsuite/model/test-all-profiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ for I in `perl -ne 'print "$1\n" if (m,<id>([^<]+)</id>,)' pom.xml`; do
echo "========"
echo "======== Profile $I"
echo "========"
mvn -B test "-P$I" "$@"
EXIT_CODE=$[$EXIT_CODE + $?]
mvn -B -Dsurefire.timeout=600 test "-P$I" "$@" 2>&1 | tee /tmp/surefire.out
EXIT_CODE=$[$EXIT_CODE + ${PIPESTATUS[0]}]
mv target/surefire-reports "target/surefire-reports-$I"
perl -ne "print '::error::| $I | Timed out.' . \"\n\" if (/There was a timeout in the fork/)" /tmp/surefire.out
done

## If the jacoco file is present, generate reports in each of the model projects
Expand Down

0 comments on commit 2877482

Please sign in to comment.