Skip to content

Commit

Permalink
BATS: When waiting for moby container engine, wait for the service
Browse files Browse the repository at this point in the history
On macOS in CI, we can sometimes fail because the docker context isn't
created fast enough.  Add a wait for the service (in the VM) to ensure
we're making forward progress while allowing for a longer wait.  Also
increase the wait delay when trying to get the docker context, for the same
reason.

Signed-off-by: Mark Yen <[email protected]>
  • Loading branch information
mook-as committed Apr 25, 2024
1 parent 03f28b0 commit d368633
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bats/tests/helpers/vm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,9 @@ wait_for_container_engine() {
try --max 30 --delay 5 rdctl api /settings

if using_docker; then
wait_for_service_status docker started
trace "waiting for docker context to exist"
try --max 30 --delay 5 docker_context_exists
try --max 30 --delay 10 docker_context_exists
else
wait_for_service_status buildkitd started
fi
Expand Down

0 comments on commit d368633

Please sign in to comment.