Skip to content

Commit

Permalink
Make ES test wait longer for the backend to be ready
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed May 10, 2022
1 parent 483cf1a commit b597799
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/es-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ wait_for_it() {
''%{http_code}''
)
local counter=0
while [[ "$(curl ${params[@]} ${url})" != "200" && ${counter} -le 60 ]]; do
local max_counter=60
while [[ "$(curl ${params[@]} ${url})" != "200" && ${counter} -le ${max_counter} ]]; do
sleep 2
counter=$((counter+1))
echo "waiting for ${url} to be up..."
if [ ${counter} -eq 30 ]; then
if [ ${counter} -eq ${max_counter} ]; then
echo "ERROR: elasticsearch/opensearch is down"
exit 1
fi
Expand Down

0 comments on commit b597799

Please sign in to comment.