]> git.kaiwu.me - haproxy.git/commitdiff
REGTESTS: sample_fetches: test fe_tarpit_timeout
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 20:09:16 +0000 (20:09 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
The proxy state test reported fe_client_timeout but not its tarpit
counterpart. The frontend gets an explicit "timeout tarpit" so that the
value read back is not the "timeout connect" it silently defaults to.

reg-tests/sample_fetches/proxy_state.vtc

index 9b315647813368d9ebf0013ca1d74ecbec567c5a..023176be2cfcc467d1fcd2f47a769fbbe95c6bff 100644 (file)
@@ -34,6 +34,9 @@ haproxy h1 -conf {
     frontend fe
        bind "fd@${fe}"
        id 11
+       # an explicit value so that fe_tarpit_timeout has something to
+       # report other than the "timeout connect" it defaults to
+       timeout tarpit 1234ms
 
        # proxy identifiers and names
        http-response set-header x-feid       "%[fe_id]"
@@ -81,6 +84,7 @@ haproxy h1 -conf {
        http-response set-header x-stopping   "%[stopping]"
        http-response set-header x-uptime     "%[uptime]"
        http-response set-header x-cltimeout  "%[fe_client_timeout]"
+       http-response set-header x-tptimeout  "%[fe_tarpit_timeout]"
 
        default_backend be
 
@@ -147,4 +151,5 @@ client c1 -connect ${h1_fe_sock} {
        expect resp.http.x-stopping   == "0"
        expect resp.http.x-uptime     ~  "^[0-9]+$"
        expect resp.http.x-cltimeout  ~  "^[0-9]+$"
+       expect resp.http.x-tptimeout  == "1234"
 } -run