REGTEST: make the IP+port logging test more reliable
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.
diff --git a/reg-tests/log/b00000.vtc b/reg-tests/log/b00000.vtc
index f0ab7ea..b28ac94 100644
--- a/reg-tests/log/b00000.vtc
+++ b/reg-tests/log/b00000.vtc
@@ -30,7 +30,7 @@
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 @@
defaults
log global
timeout connect 3000
- timeout client 5
+ timeout client 1
timeout server 10000
frontend fe1