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 a3cfa82 commit c2267d3
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 c2267d3

Please sign in to comment.