Use shell "wait" instead of fixed 10 second wait-for-things-to-die

This commit is contained in:
Howard Chu 2006-01-11 05:25:09 +00:00
parent de80985c95
commit 604f7fb9db
48 changed files with 151 additions and 16 deletions

View file

@ -38,7 +38,7 @@ for CMD in $SRCDIR/scripts/test*; do
exit $RC
fi
echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
sleep $SLEEPTIME
# echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
# sleep $SLEEPTIME
echo ""
done

View file

@ -81,4 +81,6 @@ else
fi
fi
test $KILLSERVERS != no && wait
exit $RC

View file

@ -72,4 +72,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -77,4 +77,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -145,4 +145,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -228,4 +228,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -236,4 +236,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -534,4 +534,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -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

View file

@ -86,4 +86,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -163,4 +163,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -183,4 +183,7 @@ $LDAPSEARCH -h $LOCALHOST -p $PORT1 \
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -90,4 +90,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -77,4 +77,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -111,4 +111,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -457,6 +457,9 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0
## Note to developers: when SLAPD_DEBUG=-1 the command

View file

@ -235,4 +235,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -190,4 +190,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -263,4 +263,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -123,6 +123,7 @@ sleep 15
echo "Stopping the provider, sleeping 10 seconds and restarting it..."
kill -HUP "$PID"
wait $PID
sleep 10
echo "RESTART" >> $LOG1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
@ -244,7 +245,7 @@ sleep 15
echo "Stopping consumer to test recovery..."
kill -HUP $SLAVEPID
sleep 10
wait $SLAVEPID
echo "Modifying more entries on the master..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
@ -340,4 +341,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -451,4 +451,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -303,4 +303,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -316,4 +316,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -343,4 +343,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -185,4 +185,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -127,4 +127,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -1362,4 +1362,7 @@ esac
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -160,4 +160,7 @@ fi
#####
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -75,7 +75,7 @@ if test $RC != 0 ; then
exit $RC
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
kill -HUP $KILLPIDS
wait
LDIFOUT=$EMPTYDNOUT1
@ -169,4 +169,7 @@ fi
#####
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -248,5 +248,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -218,5 +218,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -103,5 +103,7 @@ for RELAY in $RELAYS ; do
done
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -324,4 +324,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -307,5 +307,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -161,4 +161,7 @@ done
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -203,7 +203,7 @@ fi
echo "Shutting down local slapd..."
kill -HUP $LOCALPID
sleep 5
wait $LOCALPID
echo "Configuring local slapd without translucent_no_glue..."
. $CONFFILTER $BACKEND $MONITORDB < $TRANSLUCENTLOCALCONF | \
@ -626,7 +626,7 @@ fi
echo "Shutting down local slapd..."
kill -HUP $LOCALPID
sleep 5
wait $LOCALPID
echo "Configuring local slapd with translucent_strict..."
echo translucent_strict >> $CONF2
@ -723,4 +723,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -720,5 +720,7 @@ esac
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -224,4 +224,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -242,4 +242,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -106,4 +106,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -201,5 +201,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0
test $KILLSERVERS != no && wait
exit 0

View file

@ -206,4 +206,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -255,4 +255,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -218,4 +218,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -344,4 +344,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -448,4 +448,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -697,4 +697,7 @@ fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0

View file

@ -526,4 +526,7 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
test $KILLSERVERS != no && wait
exit 0