diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:11 +0000 |
commit | da76459dc21b5af2449af2d36eb95226cb186ce2 (patch) | |
tree | 542ebb3c1e796fac2742495b8437331727bbbfa0 /reg-tests/http-set-timeout/set_timeout.vtc | |
parent | Initial commit. (diff) | |
download | haproxy-da76459dc21b5af2449af2d36eb95226cb186ce2.tar.xz haproxy-da76459dc21b5af2449af2d36eb95226cb186ce2.zip |
Adding upstream version 2.6.12.upstream/2.6.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'reg-tests/http-set-timeout/set_timeout.vtc')
-rw-r--r-- | reg-tests/http-set-timeout/set_timeout.vtc | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/reg-tests/http-set-timeout/set_timeout.vtc b/reg-tests/http-set-timeout/set_timeout.vtc new file mode 100644 index 0000000..ebaa6a3 --- /dev/null +++ b/reg-tests/http-set-timeout/set_timeout.vtc @@ -0,0 +1,82 @@ +varnishtest "http-request set-timeout test" + +feature ignore_unknown_macro + +#REQUIRE_VERSION=2.4 + +server srv_h1 -repeat 3 { + rxreq + txresp +} -start + +syslog Slog1 -level info { + recv + expect ~ "^.*timeout: 5000 5000.*$" +} -start + +syslog Slog2 -level info { + recv + expect ~ "^.*timeout: 5000 5000.*$" +} -start + +syslog Slog3 -level info { + recv + expect ~ "^.*timeout: 5000 3000.*$" +} -start + +haproxy hap -conf { + defaults + timeout connect 5s + timeout client 5s + timeout server 5s + log global + + listen li1 + mode http + bind "fd@${li1}" + log-format "timeout: %[be_server_timeout] %[cur_server_timeout]" + log ${Slog1_addr}:${Slog1_port} len 2048 local0 debug err + server srv_h1 ${srv_h1_addr}:${srv_h1_port} + + listen li2 + mode http + bind "fd@${li2}" + log-format "timeout: %[be_server_timeout] %[cur_server_timeout]" + log ${Slog2_addr}:${Slog2_port} len 2048 local0 debug err + http-request set-timeout server 5s + server srv_h1 ${srv_h1_addr}:${srv_h1_port} + + frontend fe1 + mode http + bind "fd@${fe1}" + log-format "timeout: %[be_server_timeout] %[cur_server_timeout]" + log ${Slog3_addr}:${Slog3_port} len 2048 local0 debug err + default_backend be1 + + backend be1 + mode http + http-request set-timeout server int(3),mul(1000) + server srv_h1 ${srv_h1_addr}:${srv_h1_port} +} -start + +client c1 -connect ${hap_li1_sock} { + txreq + rxresp + expect resp.status == 200 +} -run + +client c2 -connect ${hap_li2_sock} { + txreq + rxresp + expect resp.status == 200 +} -run + +client c3 -connect ${hap_fe1_sock} { + txreq + rxresp + expect resp.status == 200 +} -run + +syslog Slog1 -wait +syslog Slog2 -wait +syslog Slog3 -wait |