Skip to content

Commit

Permalink
Fix checking service health in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nineinchnick authored and hashhar committed Sep 12, 2023
1 parent f8dd106 commit e935e88
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ function run_spark_tests() {
}

function check_health() {
local service=$1
if ! list=$(environment_compose ps --format json); then
echo >&2 "Error getting Docker containers status: $list"
return 1
fi
if ! status=$(jq -er --arg name "$service" '.[] | select(.Service == $name) | .Health' <<<"$list"); then
if ! status=$(jq -er '.Health' <<<"$list"); then
echo >&2 "Error getting health for $service: $status"
return 1
fi
Expand Down Expand Up @@ -191,7 +190,7 @@ for ARCH in "${platforms[@]}"; do
LOGS_PID=$!

if [[ ${ENVIRONMENT} == *"accumulo"* ]]; then
retry check_health accumulo
retry check_health
elif [[ ${ENVIRONMENT} == "kerberos" ]]; then
run_kerberos_tests
elif [[ ${ENVIRONMENT} == *"gpdb"* ]]; then
Expand Down

0 comments on commit e935e88

Please sign in to comment.