From 8e501b6a7e4f9213936ed85338015db2fc2ef4d8 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Mon, 12 Feb 2018 11:35:46 +0100 Subject: [PATCH] [Tests] Add more time to start with X-Pack This commit adds a bit more time to the packaging tests to start when x-pack is installed. Original commit: elastic/x-pack-elasticsearch@228a3d7c33188bc01470629d28c790f0497e4b18 --- qa/vagrant/src/test/resources/packaging/utils/xpack.bash | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qa/vagrant/src/test/resources/packaging/utils/xpack.bash b/qa/vagrant/src/test/resources/packaging/utils/xpack.bash index e6bfc40da41..33a8acfd2b7 100644 --- a/qa/vagrant/src/test/resources/packaging/utils/xpack.bash +++ b/qa/vagrant/src/test/resources/packaging/utils/xpack.bash @@ -96,7 +96,12 @@ assert_number_of_files() { wait_for_xpack() { local host=${1:-localhost} local port=${2:-9200} - for i in {1..30}; do - echo "GET / HTTP/1.0" > /dev/tcp/$host/$port && break || sleep 1; + + local waitFor + for i in {1..60}; do + waitFor=$(echo "GET / HTTP/1.0" > /dev/tcp/$host/$port; echo $?) + [ "$waitFor" -eq "0" ] && break || sleep 1; done + + [ "$waitFor" -eq "0" ] }