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.
This commit is contained in:
Thomas Eizinger
2025-10-23 09:14:20 +11:00
committed by GitHub
parent 9b85034b0c
commit 5aa2069008

View File

@@ -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))