]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: ssl: Fix the script about automatic SNI selection
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Sep 2025 13:12:56 +0000 (15:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 8 Sep 2025 13:55:56 +0000 (15:55 +0200)
First, the barrier to delay the client execution was moved before the client
definition. Otherwise, the connection is established too early and with
short timeouts it could be closed before the requests are sent.

The main purpose of the barrier was to workaround slow health-checks. This
is also the reason why the script was flagged as slow. But it can be
significantly speed-up by setting a slow "inter" value. It is now set to
100ms and the script is no longer slow.

reg-tests/ssl/ssl_sni_auto.vtc

index 99d073789b6d756a550a8ff06791e165a6b68c2b..709b9599e2262eff694c839cea7e1edb34553913 100644 (file)
@@ -1,5 +1,3 @@
-#REGTEST_TYPE=slow
-
 # This teg-test verifies that automatic SNI selection for server conncetions and
 # health checks.
 
@@ -70,6 +68,7 @@ haproxy h1 -conf {
         timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
         timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
         timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
+        default-server inter 100ms
 
     frontend fe_ssl
         bind "fd@${fe_ssl}" ssl crt ${testdir}/common.pem
@@ -137,9 +136,9 @@ haproxy h1 -conf {
 
 } -start
 
-client c1 -connect ${h1_li_sock} {
-    barrier b1 sync
+barrier b1 sync
 
+client c1 -connect ${h1_li_sock} {
     txreq -url "/test1" -hdr "host: www.test1.org:443"
     rxresp
     expect resp.status == 200