From ab14debb0853ada1b851b2668e806ab29f5bdc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20Br=C3=BCggemann?= Date: Sun, 17 Mar 2019 20:59:29 +0100 Subject: [PATCH] Make waiting for ganache to launch more robust. (#1683) --- scripts/test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 1e18eaf83..3d896453e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -46,7 +46,13 @@ start_ganache() { ganache_pid=$! - sleep 1 + echo "Waiting for ganache to launch on port "$ganache_port"..." + + while ! ganache_running; do + sleep 0.1 # wait for 1/10 of the second before check again + done + + echo "Ganache launched!" } if ganache_running; then