Skip to content

Commit

Permalink
test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Oct 16, 2023
1 parent 17456d2 commit df6f73e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/waitForNitro.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# poll the nitro endpoint until we get a 0 return code
while true
do
# poll the nitro endpoint until we get a 0 return code or 30mins have passed, in that case exit 1
start_time=$(date +%s)
timeout=20

while (( $(date +%s) - start_time <= timeout )); do
curl -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":45678,"method":"eth_chainId","params":[]}' 'http://localhost:8547'
if [ "$?" -eq "0" ]; then
exit 0
else
sleep 20
fi
done
done

exit 1

0 comments on commit df6f73e

Please sign in to comment.