# $Header$
## 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
fi
KILLPIDS="$PID"
+sleep 1
+
echo "Testing slapd searching..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
exit $RC
fi
-echo "Testing searching for timelimitExceeded..."
+echo "Testing search for timelimitExceeded..."
$LDAPSEARCH -b "cn=timelimitExceeded,ou=RetCodes,$BASEDN" \
-h $LOCALHOST -p $PORT1 '(objectClass=*)' >> $TESTOUT 2>&1
RC=$?
exit $RC
fi
-echo "Testing modifying for unwillingToPerform..."
+echo "Testing modify for unwillingToPerform..."
$LDAPMODIFY -D "$MANAGERDN" -w $PASSWD \
-h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS
dn: cn=unwillingToPerform,ou=RetCodes,$BASEDN
exit $RC
fi
+echo "Testing compare for success after sleep (2 s)..."
+$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
+ "cn=Success w/ Delay,ou=RetCodes,$BASEDN" "cn:foo" >> $TESTOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+ echo "ldapcompare failed ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+fi
+
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
exit 0