Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelArtists committed Apr 10, 2024
1 parent 49f350d commit f7ddd52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/agglayer-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,28 @@ jobs:
greater_than_zero=false
while [ $(date +'%M') -lt $end_minute ]; do
# Attempt connecting to service
# Attempt to connect to the service
if STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null); then
# Convert hexadecimal to decimal
DEC_STATUS=$(printf "%d" "$STATUS")
DEC_STATUS=$((16#$STATUS))
echo "ZKEVM_VERIFIED_BATCH_NUMBER: $DEC_STATUS"
# Check if STATUS is greater than 0
if [ $DEC_STATUS -gt 0 ]; then
greater_than_zero=true
fi
else
# If connection fails, wait and retry after some time
echo "Failed to connect, waiting and retrying..."
sleep 60
continue
fi
sleep 60
done
# Check that zkevm_verifiedBatchNumber increments, indicating e2e success
# Check if STATUS field never becomes greater than 0
if ! $greater_than_zero; then
echo "zkevm_verifiedBatchNumber failed to increment past 0. marking CI job failed accordingly"
echo "STATUS field never becomes greater than 0. CI job failed."
exit 1
fi
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/cdk-superuser-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,27 +107,28 @@ jobs:
greater_than_zero=false
while [ $(date +'%M') -lt $end_minute ]; do
# Attempt connecting to service
# Attempt to connect to the service
if STATUS=$(cast rpc zkevm_verifiedBatchNumber 2>/dev/null); then
# Convert hexadecimal to decimal
DEC_STATUS=$(printf "%d" "$STATUS")
DEC_STATUS=$((16#$STATUS))
echo "ZKEVM_VERIFIED_BATCH_NUMBER: $DEC_STATUS"
# Check if STATUS is greater than 0
if [ $DEC_STATUS -gt 0 ]; then
greater_than_zero=true
fi
else
# If connection fails, wait and retry after some time
echo "Failed to connect, waiting and retrying..."
sleep 60
continue
fi
sleep 60
done
# Check if zkevm_verifiedBatchNumber becomes greater than 0, indicating e2e success
# Check if STATUS field never becomes greater than 0
if ! $greater_than_zero; then
echo "zkevm_verifiedBatchNumber failed to increment past 0. marking CI job failed accordingly"
echo "STATUS field never becomes greater than 0. CI job failed."
exit 1
fi
Expand Down

0 comments on commit f7ddd52

Please sign in to comment.