Merge pull request #14338 from vrothberg/flakes

system tests: fix flake waiting for container to run
This commit is contained in:
OpenShift Merge Robot 2022-05-24 08:57:46 -04:00 committed by GitHub
commit d069ad1082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -397,25 +397,25 @@ function _ensure_pod_state() {
for i in {0..5}; do
run_podman pod inspect $1 --format "{{.State}}"
if [[ $output == "$2" ]]; then
break
return
fi
sleep 0.5
done
is "$output" "$2" "unexpected pod state"
die "Timed out waiting for pod $1 to enter state $2"
}
# Wait for the container's (1st arg) running state (2nd arg)
function _ensure_container_running() {
for i in {0..5}; do
for i in {0..20}; do
run_podman container inspect $1 --format "{{.State.Running}}"
if [[ $output == "$2" ]]; then
break
return
fi
sleep 0.5
done
is "$output" "$2" "unexpected pod state"
die "Timed out waiting for container $1 to enter state running=$2"
}
###########################