mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-05 19:52:14 +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.
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
varnishtest "Health-checks: agent-check"
|
|
#REQUIRE_VERSION=1.8
|
|
#REGTEST_TYPE=slow
|
|
feature ignore_unknown_macro
|
|
|
|
barrier b1 cond 2 -cyclic
|
|
barrier b2 cond 2 -cyclic
|
|
|
|
server s1 {
|
|
barrier b1 sync
|
|
recv 5
|
|
send "75%,maxconn:30,maint,down\n"
|
|
expect_close
|
|
barrier b2 sync
|
|
} -start
|
|
|
|
|
|
haproxy h1 -conf {
|
|
defaults
|
|
mode tcp
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
backend be1
|
|
log ${S1_addr}:${S1_port} daemon
|
|
option log-health-checks
|
|
server srv ${s1_addr}:${s1_port} weight 100 agent-check agent-addr ${s1_addr} agent-port ${s1_port} agent-send "pouet" agent-inter 100ms
|
|
} -start
|
|
|
|
haproxy h1 -cli {
|
|
send "show servers state"
|
|
expect ~ "be1 1 srv 127.0.0.1 2 0 100 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -"
|
|
send "show stat"
|
|
expect ~ "be1,srv,0,0,0,0,,"
|
|
|
|
barrier b1 sync
|
|
barrier b2 sync
|
|
send "show servers state"
|
|
expect ~ "be1 1 srv 127.0.0.1 0 1 75 100 [[:digit:]]+ 1 0 [[:digit:]] 0 [[:digit:]]+ 0 0 - ${s1_port} -"
|
|
send "show stat"
|
|
expect ~ "be1,srv,0,0,0,0,30"
|
|
}
|