]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test007-replication
Delete unused idl_cache_entry rwlock field
[openldap] / tests / scripts / test007-replication
index ea006738b8617d916cf8b8bb082e0ddff1498c76..4ae4e89bd30cadee6c70ae885037f65a3df7197c 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-2007 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -197,8 +197,8 @@ echo "Stopping the slave..."
 kill -HUP $SLAVEPID
 KILLPIDS="$PID $SLURPPID"
 
-echo "Waiting 5 seconds for slave slapd to die..."
-sleep 5
+echo "Waiting for slave slapd to die..."
+wait $SLAVEPID
 
 echo "Applying more changes to the master slapd..."
 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
@@ -223,8 +223,8 @@ echo "Stopping slurpd..."
 kill -HUP $SLURPPID
 KILLPIDS="$PID"
 
-echo "Waiting 5 seconds for slurpd to die..."
-sleep 5
+echo "Waiting for slurpd to die..."
+wait $SLURPPID
 
 echo "Applying more changes to the master slapd..."
 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
@@ -342,4 +342,7 @@ if test $? != 0 ; then
 fi
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0