From b969ddd4ffff0cc083080b4108e32579835aa3d3 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Fri, 21 Aug 2020 18:38:57 +0200 Subject: [PATCH] add: dynamic waiting with wait-for-it --- tests/run_tests.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/run_tests.sh b/tests/run_tests.sh index fb43731..cbfbdb1 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -53,9 +53,13 @@ core_id=$! # wait for start -sleep 5; -curl -s -o /dev/null --retry 5 --retry-all-errors --retry-connrefused http://localhost:5000/api/v1/tags - +if [ -x "$(command -v wait-for-it)" ] +then + wait-for-it localhost:5000 -t 15 +else + echo "waiting 5 seconds for server" + sleep 5; +fi export PYTHONPATH=$PYTHONPATH:$source_dir/tavern_utils tavern-ci --disable-warnings $source_dir/tavern_tests