Skip to content

Commit

Permalink
Merge pull request #6779 from mook-as/bats/record-timing
Browse files Browse the repository at this point in the history
BATS: Record number of tries
  • Loading branch information
jandubois authored Apr 25, 2024
2 parents 2ee7c23 + d368633 commit 20583bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bats/tests/helpers/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ try() {
while true; do
run "$@"
if ((status == 0 || ++count >= max)); then
trace "$count/$max tries: $*"
break
fi
sleep "$delay"
Expand Down
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 20583bd

Please sign in to comment.