mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-22 20:32:12 +00:00
REGTESTS: http_request_buffer: Add a barrier to not mix up log messages
Depending on the timing, time to time, the log messages can be mixed. A client can start and be fully handled by HAProxy (including its log message) before the log message of the previous client was emitted or received. To fix the issue, a barrier was added to be sure to eval the "expect" rule on logs before starting the next client. This patch should fix the issue #1847. It may be backported to all branches containing this reg-tests.
This commit is contained in:
parent
f348ecd67a
commit
05ed05b84a
@ -8,6 +8,8 @@ feature ignore_unknown_macro
|
||||
# thanks to "http-buffer-request". If this was the case, c2 client
|
||||
# could not connect to s1 server and this would lead to make this test fail.
|
||||
|
||||
barrier b1 cond 2 -cyclic
|
||||
|
||||
server s1 {
|
||||
rxreq
|
||||
expect req.bodylen == 257
|
||||
@ -23,10 +25,16 @@ server s1 {
|
||||
syslog S -level info {
|
||||
recv
|
||||
expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 fe1/<NOSRV> .* 408 .* - - cD-- .* .* \"GET /this-is-a-long-url-this-is-a-long-url-this-is-a-long-url-this-is-a-long-url-this-is-a-long-url-this-is-a-long-url-this-is-a-long-url HTTP/1\\.1\""
|
||||
barrier b1 sync
|
||||
|
||||
recv
|
||||
expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe1 be1/srv1 [0-9]*/[0-9]*/[0-9]*/[0-9]*/[0-9]* 200 .* - - ---- .* .* \"GET / HTTP/1\\.1\""
|
||||
barrier b1 sync
|
||||
|
||||
recv
|
||||
expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe2 be1/srv1 [0-9]*/[0-9]*/[0-9]*/[0-9]*/[0-9]* 200 .* - - ---- .* .* \"POST /1 HTTP/1\\.1\""
|
||||
barrier b1 sync
|
||||
|
||||
recv
|
||||
expect ~ "[^:\\[ ]*\\[[0-9]*\\]: .* .* fe2 be1/<NOSRV> [0-9]*/-1/-1/-1/[0-9]* -1 .* - - CR-- .* .* \"POST /2 HTTP/1\\.1\""
|
||||
} -start
|
||||
@ -86,6 +94,9 @@ client c1 -connect ${h1_fe1_sock} {
|
||||
expect resp.status == 408
|
||||
} -run
|
||||
|
||||
# Wait matching on log message
|
||||
barrier b1 sync
|
||||
|
||||
# Payload is fully sent
|
||||
# ==> Request must be sent to the server. A 200 must be received
|
||||
client c2 -connect ${h1_fe1_sock} {
|
||||
@ -94,6 +105,9 @@ client c2 -connect ${h1_fe1_sock} {
|
||||
expect resp.status == 200
|
||||
} -run
|
||||
|
||||
# Wait matching on log message
|
||||
barrier b1 sync
|
||||
|
||||
# Payload is fully sent in 2 steps (with a small delay, smaller than the client
|
||||
# timeout) and split on a chunk size.
|
||||
# ==> Request must be sent to the server. A 200 must be received
|
||||
@ -105,6 +119,9 @@ client c3 -connect ${h1_fe2_sock} {
|
||||
expect resp.status == 200
|
||||
} -run
|
||||
|
||||
# Wait matching on log message
|
||||
barrier b1 sync
|
||||
|
||||
# Last CRLF of the request payload is missing but payload is sent in 2 steps
|
||||
# (with a small delay, smaller than the client timeout) and split on a chunk
|
||||
# size. The client aborts before sending the last CRLF.
|
||||
|
Loading…
Reference in New Issue
Block a user