Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Sneh1999 committed Aug 15, 2024
1 parent 9a4a418 commit ec4b0da
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/smoke-test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/testnode.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec4b0da

Please sign in to comment.