From 6633d22132a5cbfdd1298781241a94a11e5888df Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 1 Apr 2026 11:39:40 +0000 Subject: [PATCH] Improve ping test convergence by checking all nodes Wait for all nodes to reach their expected peer counts instead of only checking a single node. This prevents false failures on slower CI runners where remote nodes (especially node E in mesh/chain topologies) take longer to establish all links. --- testing/static/scripts/ping-test.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/testing/static/scripts/ping-test.sh b/testing/static/scripts/ping-test.sh index 2140a6e..fb23036 100755 --- a/testing/static/scripts/ping-test.sh +++ b/testing/static/scripts/ping-test.sh @@ -52,12 +52,22 @@ ping_test() { echo "=== FIPS Ping Test ($PROFILE topology) ===" echo "" -# Wait for nodes to converge — peers + discovery propagation +# Wait for nodes to converge — all nodes must reach expected peer counts. echo "Waiting for mesh convergence..." if [ "$PROFILE" = "chain" ]; then - wait_for_peers fips-node-b 2 15 || true -else - wait_for_peers fips-node-a 2 15 || true + # Chain: A-B-C-D-E, each interior node has 2 peers, endpoints have 1 + wait_for_peers fips-node-a 1 20 || true + wait_for_peers fips-node-b 2 20 || true + wait_for_peers fips-node-c 2 20 || true + wait_for_peers fips-node-d 2 20 || true + wait_for_peers fips-node-e 1 20 || true +elif [ "$PROFILE" = "mesh" ] || [ "$PROFILE" = "mesh-public" ]; then + # Mesh: check all nodes reach their configured peer counts + wait_for_peers fips-node-a 2 20 || true + wait_for_peers fips-node-b 1 20 || true + wait_for_peers fips-node-c 3 20 || true + wait_for_peers fips-node-d 3 20 || true + wait_for_peers fips-node-e 3 20 || true fi # Allow extra time for discovery to propagate across the mesh sleep 3