diff --git a/bin/tests/system/fetchlimit/tests.sh b/bin/tests/system/fetchlimit/tests.sh index f994406249..073f932a32 100644 --- a/bin/tests/system/fetchlimit/tests.sh +++ b/bin/tests/system/fetchlimit/tests.sh @@ -309,12 +309,16 @@ zspill=$(grep 'spilled due to clients per query' ns5/named.stats | sed 's/ *\([0 # ns5 configuration: # clients-per-query 5 # max-clients-per-query 10 -# expected spills: -# 15 (out of 20) spilled for the first burst, and 10 (out of 20) spilled for -# the next 4 bursts (because of auto-tuning): 15 + (4 * 10) == 55 +# Each burst of 20 spills (20 - clients-per-query): 15 for the first burst +# (clients-per-query starts at 5) and 10..15 for the next 4 as auto-tuning +# ramps it to 10, giving 55 (fast ramp) to 75 (no ramp). The ramp is verified +# above, so accept the range rather than an exact count. expected=55 -[ "$zspill" -eq "$expected" ] || ret=1 -echo_i "$zspill clients spilled (expected $expected)" +expected_max=75 +echo_i "$zspill clients spilled (expected ${expected}..${expected_max})" +if [ "$zspill" -lt "$expected" ] || [ "$zspill" -gt "$expected_max" ]; then + ret=1 +fi if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) @@ -352,12 +356,16 @@ zspill=$(grep 'spilled due to clients per query' ns5/named.stats | sed 's/ *\([0 # ns5 configuration: # clients-per-query 5 # max-clients-per-query 10 -# expected spills: -# 15 (out of 20) spilled for the first burst, and 10 (out of 20) spilled for -# the next 4 bursts (because of auto-tuning): 15 + (4 * 10) == 55 +# Each burst of 20 spills (20 - clients-per-query): 15 for the first burst +# (clients-per-query starts at 5) and 10..15 for the next 4 as auto-tuning +# ramps it to 10, giving 55 (fast ramp) to 75 (no ramp). The ramp is verified +# above, so accept the range rather than an exact count. expected=55 -[ "$zspill" -eq "$expected" ] || ret=1 -echo_i "$zspill clients spilled (expected $expected)" +expected_max=75 +echo_i "$zspill clients spilled (expected ${expected}..${expected_max})" +if [ "$zspill" -lt "$expected" ] || [ "$zspill" -gt "$expected_max" ]; then + ret=1 +fi if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret))