From f95838ca2da07766d14f11359b1a30c1ad6c7361 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 28 Oct 2018 19:19:48 +0100 Subject: [PATCH] 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. --- reg-tests/log/b00000.vtc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reg-tests/log/b00000.vtc b/reg-tests/log/b00000.vtc index f0ab7ea181..b28ac94d35 100644 --- a/reg-tests/log/b00000.vtc +++ b/reg-tests/log/b00000.vtc @@ -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