From ec4b0da744862d6bd044387a84d21f791e6bd885 Mon Sep 17 00:00:00 2001 From: Sneh Koul Date: Thu, 15 Aug 2024 12:11:58 -0400 Subject: [PATCH] increase timeout --- .github/workflows/smoke-test-node.bash | 66 +++++++++++++------------- .github/workflows/testnode.bash | 4 +- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/smoke-test-node.bash b/.github/workflows/smoke-test-node.bash index b9d242cd..70c26857 100755 --- a/.github/workflows/smoke-test-node.bash +++ b/.github/workflows/smoke-test-node.bash @@ -11,44 +11,44 @@ LATEST_CONFIRMATION_FETCHED=false SUCCEEDED=false while true; do -if [ "$L2_TRANSACTION_SUCCEEDED" = false ]; then -if ${GITHUB_WORKSPACE}/smoke-test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then -echo "Sending l2 transaction succeeded" -L2_TRANSACTION_SUCCEEDED=true -fi -fi - -if [ "$LATEST_CONFIRMATION_FETCHED" = false ]; then - rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` - error=` cast call --rpc-url http://localhost:8545 $rollupAddress 'latestConfirmed()(uint256)' | grep "error"` - if [ "$error" == "" ]; then - echo "Lastest confirmation fetched" - LATEST_CONFIRMATION_FETCHED=true - fi -fi - - -if [ "$L2_TRANSACTION_SUCCEEDED" = true ] && [ "$LASTEST_CONFIRMATION_FETCHED" = true ]; then -SUCCEEDED=true -break -fi - -# Check if the timeout (10 min) has been reached. -NOW=$(date +%s) -DIFF=$((NOW - START)) -if [ "$DIFF" -ge 600 ]; then -echo "Timed out" -break -fi - -sleep 10 + if [ "$L2_TRANSACTION_SUCCEEDED" = false ]; then + if ${GITHUB_WORKSPACE}/smoke-test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait; then + echo "Sending l2 transaction succeeded" + L2_TRANSACTION_SUCCEEDED=true + fi + fi + + if [ "$LATEST_CONFIRMATION_FETCHED" = false ]; then + rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` + error=` cast call --rpc-url http://localhost:8545 $rollupAddress 'latestConfirmed()(uint256)' | grep "error"` + if [ "$error" == "" ]; then + echo "Lastest confirmation fetched" + LATEST_CONFIRMATION_FETCHED=true + fi + fi + + + if [ "$L2_TRANSACTION_SUCCEEDED" = true ] && [ "$LASTEST_CONFIRMATION_FETCHED" = true ]; then + SUCCEEDED=true + break + fi + + # Check if the timeout (20 min) has been reached. + NOW=$(date +%s) + DIFF=$((NOW - START)) + if [ "$DIFF" -ge 1200 ]; then + echo "Timed out" + break + fi + + sleep 10 done docker compose stop if [ "$SUCCEEDED" = false ]; then -docker compose logs -exit 1 + docker compose logs + exit 1 fi exit 0 diff --git a/.github/workflows/testnode.bash b/.github/workflows/testnode.bash index 41a87ce4..5d23ec93 100755 --- a/.github/workflows/testnode.bash +++ b/.github/workflows/testnode.bash @@ -33,10 +33,10 @@ while true; do break fi - # Check if the timeout (10 min) has been reached. + # Check if the timeout (20 min) has been reached. NOW=$(date +%s) DIFF=$((NOW - START)) - if [ "$DIFF" -ge 600 ]; then + if [ "$DIFF" -ge 1200 ]; then echo "Timed out" break fi