Sfoglia il codice sorgente

Make waiting for ganache to launch more robust. (#1683)

Jochen Brüggemann 6 anni fa
parent
commit
ab14debb08
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      scripts/test.sh

+ 7 - 1
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