From d368633470cab80e4b4bb21185eb2c0d1040ee74 Mon Sep 17 00:00:00 2001 From: Mark Yen Date: Thu, 25 Apr 2024 14:46:12 -0700 Subject: [PATCH] BATS: When waiting for moby container engine, wait for the service 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 --- bats/tests/helpers/vm.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bats/tests/helpers/vm.bash b/bats/tests/helpers/vm.bash index e8bdb316114..d0a3a6f65a4 100644 --- a/bats/tests/helpers/vm.bash +++ b/bats/tests/helpers/vm.bash @@ -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