diff --git a/reg-tests/http-messaging/http_abortonclose.vtc b/reg-tests/http-messaging/http_abortonclose.vtc index 42f87f19f..4dc4bbe88 100644 --- a/reg-tests/http-messaging/http_abortonclose.vtc +++ b/reg-tests/http-messaging/http_abortonclose.vtc @@ -7,10 +7,12 @@ feature ignore_unknown_macro feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev0)'" #REGTEST_TYPE=slow +# b0 : Wait s1 was detected as DOWN to be sure it is stopped # b1 : Don't send /c4 before /c3 was received by s2 server # b2 : Don't finish c2 before c1 and c3 before c4 (from syslog POV) # b3 : finish c3 before s2 +barrier b0 cond 2 -cyclic barrier b1 cond 2 -cyclic barrier b2 cond 2 -cyclic barrier b3 cond 2 -cyclic @@ -32,11 +34,15 @@ server s2 { } -start syslog S -level info { + recv alert + expect ~ "[^:\\[ ]*\\[[0-9]*\\]: Server check/srv1 is DOWN.*" + barrier b0 sync + recv - expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1/srv1 [0-9]*/[0-9]*/-1/-1/[0-9]* 503 .* - - SC-- .* .* \"GET /c1 HTTP/1\\.1\"" + expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1_1/srv1 [0-9]*/[0-9]*/-1/-1/[0-9]* 503 .* - - SC-- .* .* \"GET /c1 HTTP/1\\.1\"" barrier b2 sync recv - expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1/srv1 [0-9]*/[0-9]*/-1/-1/[0-9]* -1 .* - - CC-- .* .* \"GET /c2 HTTP/1\\.1\"" + expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1_2/srv1 [0-9]*/[0-9]*/-1/-1/[0-9]* -1 .* - - CC-- .* .* \"GET /c2 HTTP/1\\.1\"" recv expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe2 be2/ [0-9]*/[0-9]*/-1/-1/[0-9]* -1 .* - - CQ-- .* .* \"GET /c4 HTTP/1\\.1\"" @@ -65,7 +71,8 @@ haproxy h1 -conf { option httplog log ${S_addr}:${S_port} local0 debug err bind "fd@${fe1}" - use_backend be1 + use_backend be1_1 if { path /c1 } + use_backend be1_2 if { path /c2 } frontend fe2 option httplog @@ -73,13 +80,25 @@ haproxy h1 -conf { bind "fd@${fe2}" use_backend be2 - backend be1 + backend be1_1 + server srv1 ${s1_addr}:${s1_port} + + backend be1_2 + timeout connect 1s + retries 10 server srv1 ${s1_addr}:${s1_port} backend be2 server srv1 ${s2_addr}:${s2_port} maxconn 1 + + backend check + server srv1 ${s1_addr}:${s1_port} check + log ${S_addr}:${S_port} local0 debug alert } -start +# Wait s1 was detected as DOWN +barrier b0 sync + # No server, wait all connection retries : SC-- client c1 -connect ${h1_fe1_sock} { txreq -url /c1