Skip to content

Commit

Permalink
testdrive: exit with non-zero code on timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
RTXUX committed Apr 7, 2024
1 parent 4dcb611 commit e16f4bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testdrive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SUFFIX="$RANDOM"

cleanup() {
docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -p)" || true
docker stop "gitlab-${SUFFIX}" || kill -TERM "$(jobs -pr)" || true
docker stop "gitlab-redis-${SUFFIX}" || true
docker stop "gitlab-postgresql-${SUFFIX}" || true
}
Expand Down Expand Up @@ -55,6 +55,6 @@ RETRIES="48"
RETRIED=0
WAIT_TIME="5s"

until check || [[ "$((RETRIED++))" == "${RETRIES}" ]]; do
until check || { [[ "$((RETRIED++))" == "${RETRIES}" ]] && exit 1; } ; do
sleep "${WAIT_TIME}"
done

0 comments on commit e16f4bf

Please sign in to comment.