mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-22 12:20:00 +00:00
f673923629
With the CI occasionally slowing down, we're starting to see again some spurious failures despite the long 1-second timeouts. This reports false positives that are disturbing and doesn't provide as much value as this could. However at this delay it already becomes a pain for developers to wait for the tests to complete. This commit adds support for the new environment variable HAPROXY_TEST_TIMEOUT that will allow anyone to modify the connect, client and server timeouts. It was set to 5 seconds by default, which should be plenty for quite some time in the CI. All relevant values that were 200ms or above were replaced by this one. A few larger values were left as they are special. One test for the set-timeout action that used to rely on a fixed 1-sec value was extended to a fixed 5-sec, as the timeout is normally not reached, but it needs to be known to compare the old and new values.
63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
varnishtest "cannot add the HTX EOM block because the buffer is full"
|
|
feature ignore_unknown_macro
|
|
|
|
#REQUIRE_VERSION=2.2
|
|
#REQUIRE_VERSION_BELOW=2.4
|
|
#REGTEST_TYPE=devel
|
|
|
|
# This test checks that an HTTP message is properly processed when we failed to
|
|
# add the HTX EOM block in an HTX message during the parsing because the buffer
|
|
# is full. Some space must be released in the buffer to make it possible. This
|
|
# requires an extra pass in the H1 multiplexer. Here, we must be sure the mux is
|
|
# called while there is no more incoming data.
|
|
|
|
server s1 {
|
|
rxreq
|
|
expect req.bodylen == 15200
|
|
txresp -bodylen 15220
|
|
} -start
|
|
|
|
syslog S -level info {
|
|
recv
|
|
expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1/srv1 [0-9]*/[0-9]*/[0-9]*/[0-9]*/[0-9]* 200 .* - - ---- .* .* \"GET / HTTP/1\\.1\""
|
|
} -start
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
tune.bufsize 16384
|
|
tune.maxrewrite 1024
|
|
|
|
defaults
|
|
mode http
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
backend be1
|
|
tcp-response inspect-delay 100ms
|
|
tcp-response content accept if { res.len gt 15272 }
|
|
tcp-response content reject
|
|
|
|
http-response deny if { internal.htx.has_eom -m bool } or { internal.htx.free_data gt 1024 }
|
|
server srv1 ${s1_addr}:${s1_port}
|
|
|
|
frontend fe1
|
|
option httplog
|
|
option http-buffer-request
|
|
log ${S_addr}:${S_port} local0 debug err
|
|
bind "fd@${fe1}"
|
|
http-request deny if ! { req.body_len eq 15200 } or { internal.htx.has_eom -m bool } or { internal.htx.free_data gt 1024 }
|
|
use_backend be1
|
|
} -start
|
|
|
|
haproxy h1 -cli {
|
|
send "trace h1 sink stderr; trace h1 level developer; trace h1 verbosity complete; trace h1 start now"
|
|
}
|
|
|
|
client c1 -connect ${h1_fe1_sock} {
|
|
txreq -bodylen 15200
|
|
rxresp
|
|
expect resp.status == 200
|
|
expect resp.bodylen == 15220
|
|
} -run
|