From: Willy Tarreau Date: Tue, 22 Sep 2026 20:09:16 +0000 (+0000) Subject: REGTESTS: sample_fetches: test fe_tarpit_timeout X-Git-Tag: v3.5-dev8~20 X-Git-Url: https://git.kaiwu.me/$%7BGITURL%7D$%7Bcid%7D?a=commitdiff_plain;h=d88bd84d6bbd2160fbe5a867cbf56291e86c0da7;p=haproxy.git REGTESTS: sample_fetches: test fe_tarpit_timeout 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. --- diff --git a/reg-tests/sample_fetches/proxy_state.vtc b/reg-tests/sample_fetches/proxy_state.vtc index 9b3156478..023176be2 100644 --- a/reg-tests/sample_fetches/proxy_state.vtc +++ b/reg-tests/sample_fetches/proxy_state.vtc @@ -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