Skip to content

Commit

Permalink
fix: improve docker start robustness for acceptance tests
Browse files Browse the repository at this point in the history
Increase wait intervals to not spam tests with errors on initial start (1s is usually too slow).

Attempt to start service more than once in case it did not come up. Give it more time to start.

Improve error message when startup fails.
  • Loading branch information
mtekel authored and maxmoehl committed Oct 28, 2024
1 parent 75f7fa4 commit 7a2d1d0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ci/scripts/start-bosh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,23 @@ EOF
export DOCKER_CERT_PATH=$1

rc=1
for i in $(seq 1 100); do
for i in $(seq 1 10); do
echo waiting for docker to come up...
sleep 1
sleep 10
set +e
docker info
rc=$?
set -e
if [ "$rc" -eq "0" ]; then
break
break
else
service docker restart
sleep 20
fi
done

if [ "$rc" -ne "0" ]; then
echo "Failed starting docker. Exiting."
exit 1
fi

Expand Down

0 comments on commit 7a2d1d0

Please sign in to comment.