]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test036-meta-concurrency
Sync with HEAD
[openldap] / tests / scripts / test036-meta-concurrency
index 011576214d2cb7e4f3df60c8e61e220b546b827a..53fbb6d703769122dbcafade49cb38d10f230a41 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2006 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -35,6 +35,10 @@ else
        echo ""
 fi
 
+if test x$TESTLOOPS = x ; then
+       TESTLOOPS=50
+fi
+
 rm -rf $TESTDIR
 
 mkdir -p $TESTDIR $DBDIR1 $DBDIR2
@@ -184,8 +188,17 @@ for f in $TESTDIR/$DATADIR/do_read.* ; do
        echo "cn=Somewhere,ou=Meta,$METABASEDN" >> $f
 done
 
+# add a bind that resolves to a referral
+for f in $TESTDIR/$DATADIR/do_bind.* ; do
+       echo "cn=Foo,ou=Meta,$METABASEDN" >> $f
+       echo "bar" >> $f
+       echo "" >> $f
+       echo "" >> $f
+done
+
 echo "Using tester for concurrent server access..."
-$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT3 -D "cn=Manager,$METABASEDN" -w $PASSWD -l 50 # -r 20
+$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT3 \
+       -D "cn=Manager,$METABASEDN" -w $PASSWD -l $TESTLOOPS -r 20 -FF
 RC=$?
 
 if test $RC != 0 ; then
@@ -219,4 +232,7 @@ if test $? != 0 ; then
 fi
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0