From 5aa206900885226ed30a384628d737e95f9b0b08 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 23 Oct 2025 09:14:20 +1100 Subject: [PATCH] test: assert that we have at least 3 flows (#10687) Fixes a flaky test where we sometimes would also find the already RST'd flows from curl's happy-eyeballs connection attempt. --- scripts/tests/download-concurrent.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/tests/download-concurrent.sh b/scripts/tests/download-concurrent.sh index 71967393b..c80cd0ef4 100755 --- a/scripts/tests/download-concurrent.sh +++ b/scripts/tests/download-concurrent.sh @@ -29,9 +29,13 @@ wait $PID3 || { sleep 3 readarray -t flows < <(get_flow_logs "tcp") -assert_eq "${#flows[@]}" 3 +assert_gteq "${#flows[@]}" 3 + +rx_bytes=0 for flow in "${flows[@]}"; do assert_eq "$(get_flow_field "$flow" "inner_dst_ip")" "172.21.0.101" - assert_gteq "$(get_flow_field "$flow" "rx_bytes")" 5000000 + rx_bytes+="$(get_flow_field "$flow" "rx_bytes")" done + +assert_gteq "$rx_bytes" $((3 * 5000000))