]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: make the IP+port logging test more reliable
authorWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2018 18:19:48 +0000 (19:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2018 18:19:48 +0000 (19:19 +0100)
On my machine, test log/b00000.vtc fails ~9/10 times. Apparently, the
connection is often marked as reset before the timeout strikes, so the
log shows "CD" flags instead of "cD". This fix does two things :
  1) shorten the client timeout to 1 millisecond instead of 5
  2) accept both "cD" and "CD" as valid termination states since the
     purpose is to validate the source address and port, and not the
     status itself.

reg-tests/log/b00000.vtc

index f0ab7ea181c55eb17883e1cc6640da63abee938e..b28ac94d35e28a0feb5a39c3c738374e9d8cdefe 100644 (file)
@@ -30,7 +30,7 @@ syslog Slg_1 -level notice {
     recv
     recv
     recv info
-    expect ~ \"dip\":\"${h1_fe_1_addr}\",\"dport\":\"${h1_fe_1_port}.*\"ts\":\"cD\",\"
+    expect ~ \"dip\":\"${h1_fe_1_addr}\",\"dport\":\"${h1_fe_1_port}.*\"ts\":\"[cC]D\",\"
 } -start
 
 haproxy h1 -conf {
@@ -40,7 +40,7 @@ haproxy h1 -conf {
 defaults
     log global
     timeout connect 3000
-    timeout client 5
+    timeout client 1
     timeout server  10000
 
 frontend fe1