]> git.kaiwu.me - haproxy.git/commitdiff
REGTESTS: http-messaging: Fix http_fail_cnt_body to succeed with small timeouts
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 Oct 2026 06:40:28 +0000 (08:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 13 Oct 2026 06:53:29 +0000 (08:53 +0200)
http_fail_cnt_body.vtc script was failing when small timeouts were used. The
script tries to detect client or server aborts during payload forwarding on
the other side. Because "http-no-delay" option was not set, a 200ms delay
could be observed to forward the server response. So with small timeouts,
the server timeout was hit before the client abort. It is now fixed.

In addition the delay before emitting CLI commands was removed.

This patch should be backported as far as 2.8.

reg-tests/http-messaging/http_fail_cnt_body.vtc

index aa2501247972b81d6884fc0419f010c1c74d323b..cb68476710bcb718c51d13deca2991fab746f925 100644 (file)
@@ -36,6 +36,7 @@ haproxy h1 -conf {
         timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
         timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
         timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
+       option http-no-delay
 
     backend st
         stick-table type string size 10 store http_fail_cnt
@@ -70,9 +71,6 @@ client c2 -connect ${h1_fe_sock} {
     barrier b1 sync
 } -run
 
-# let the second stream see the client close
-delay 0.5
-
 haproxy h1 -cli {
     send "show table st"
     expect ~ "key=/srv .*http_fail_cnt=1\n"