]> git.sur5r.net Git - openldap/commitdiff
allow per-target retry in searches (ITS#4150)
authorPierangelo Masarati <ando@openldap.org>
Sat, 5 Nov 2005 14:45:38 +0000 (14:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 5 Nov 2005 14:45:38 +0000 (14:45 +0000)
tests/data/meta.out
tests/data/slapd-meta2.conf
tests/scripts/test035-meta

index 817440d020b0e9936669c41577499cdad914bed3..97b9ed4f067a68677e8619efb1ea05bd94166254 100644 (file)
@@ -1411,3 +1411,13 @@ member: cn=Another Added Group,ou=Groups,o=Example,c=US
 
 # refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
 
+# searching filter="(member=cn=Another Added Group,ou=Groups,o=Example,c=US)"
+#      attrs="member"
+#      base="o=Example,c=US"
+#      with a timed out connection...
+dn: cn=Another Added Group,ou=Groups,o=Example,c=US
+member: cn=Added Group,ou=Groups,o=Example,c=US
+member: cn=Another Added Group,ou=Groups,o=Example,c=US
+
+# refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
+
index 2af52772316b3080d93792eb91c52f73fa29fe26..5c018073aa3a7610b5ec18b35a86c82ed480f5e2 100644 (file)
@@ -35,6 +35,8 @@ argsfile      @TESTDIR@/slapd.2.args
 #rwmmod#modulepath ../servers/slapd/overlays/
 #rwmmod#moduleload rwm.la
 
+idletimeout    5
+
 #######################################################################
 # database definitions
 #######################################################################
index 895644f8737847138abb339bb974f32134bf6d46..6a2c2d2b2a533ab092ef12c9acddd5d21f5f50a3 100755 (executable)
@@ -412,6 +412,38 @@ case $RC in
        ;;
 esac
 
+echo "Waiting 10 seconds for cached connections to timeout..."
+sleep 10
+
+echo "Searching with a timed out connection..."
+echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT
+echo "#        attrs=\"member\"" >> $SEARCHOUT
+echo "#        base=\"$BASEDN\"" >> $SEARCHOUT
+echo "#        with a timed out connection..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 -D "cn=Manager,$BASEDN" -w $PASSWD \
+       -b "$BASEDN" "$FILTER" member \
+       >> $SEARCHOUT 2>&1
+RC=$?
+#if test $RC != 0 ; then
+#      echo "Search failed ($RC)!"
+#      test $KILLSERVERS != no && kill -HUP $KILLPIDS
+#      exit $RC
+#fi
+case $RC in 
+       0)
+       ;;
+       51)
+               echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit 0
+       ;;
+       *)
+               echo "Search failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       ;;
+esac
+
 echo "Filtering ldapsearch results..."
 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
@@ -576,7 +608,7 @@ RC=$?
 #if test $RC != 6 ; then
 #      echo "Compare failed ($RC)!"
 #      test $KILLSERVERS != no && kill -HUP $KILLPIDS
-#      exit $RC
+#      exit -1
 #fi
 case $RC in 
        6)