]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9197 Fix test script
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 26 Feb 2021 09:13:54 +0000 (09:13 +0000)
committerOndřej Kuzník <ondra@mistotebe.net>
Fri, 26 Feb 2021 09:16:20 +0000 (09:16 +0000)
tests/scripts/test079-proxy-timeout

index 39a6d36cee067d3cb870e192b795509dd0472686..514bcfacce2ef97117fbf8f0c2a3c4b84431aa19 100755 (executable)
@@ -48,6 +48,24 @@ if test $WAIT != 0 ; then
     read foo
 fi
 
+echo "Testing slapd modify operations..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -H $URI1 \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting $SLEEP1 seconds for slapd to start..."
+       sleep $SLEEP1
+done
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 #
 # Start ldapd that will proxy for the remote server
 #
@@ -66,7 +84,23 @@ fi
 
 KILLPIDS="$SERVERPID $PROXYPID"
 
-sleep $SLEEP0
+echo "Testing slapd modify operations..."
+for i in 0 1 2 3 4 5; do
+       $LDAPSEARCH -s base -b "$MONITOR" -H $URI2 \
+               'objectclass=*' > /dev/null 2>&1
+       RC=$?
+       if test $RC = 0 ; then
+               break
+       fi
+       echo "Waiting $SLEEP1 seconds for slapd to start..."
+       sleep $SLEEP1
+done
+
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
 
 ##############################################################################
 #