fail if we never get the desired node count

This commit is contained in:
Alex Cheema
2024-12-16 21:59:02 +00:00
parent 1b14be6013
commit e2474c3f15

View File

@@ -150,7 +150,7 @@ jobs:
trap 'kill $PID1' EXIT
echo "Waiting for all nodes to connect..."
for i in {1..100}; do
for i in {1..20}; do
echo "Attempt $i: Checking node count..."
nodes=$(curl -s http://localhost:52415/topology | jq ".nodes | length")
echo "Current node count: $nodes"
@@ -158,6 +158,10 @@ jobs:
echo "All nodes connected successfully!"
break
fi
if [ $i -eq 20 ]; then
echo "ERROR: Failed to connect all nodes after 20 attempts. Expected ${{ strategy.job-total }} nodes, but got $nodes"
exit 1
fi
sleep 5
done