mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 18:49:34 -05:00
ITS#9497 Detect timing issues when they affect test
This commit is contained in:
parent
fbfb5454cd
commit
646d0c1ba2
1 changed files with 20 additions and 8 deletions
|
|
@ -107,9 +107,14 @@ DELAYATTR=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD -b "$USER" -E account
|
|||
echo "$DELAYATTR" >> $SEARCHOUT
|
||||
DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*seconds_before_unlock=\(\d*\)/\1/p'`
|
||||
|
||||
echo "Waiting $DELAY seconds for lockout to reset..."
|
||||
sleep $DELAY
|
||||
sleep 1
|
||||
# $DELAY is empty if we were so slow that the lockout expired already,
|
||||
# continue test but the next part might fail anyway since we rely on
|
||||
# cumulative timing
|
||||
if test -n "$DELAY" ; then
|
||||
echo "Waiting $DELAY seconds for lockout to reset..."
|
||||
sleep $DELAY
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
$LDAPSEARCH -e ppolicy -H $URI1 -D "$USER" -w $PASS \
|
||||
-b "$BASEDN" -s base >> $SEARCHOUT 2>&1
|
||||
|
|
@ -125,9 +130,12 @@ echo "$DELAYATTR" >> $SEARCHOUT
|
|||
DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\(\d*\)/\1/p'`
|
||||
|
||||
echo "Testing password expiration"
|
||||
echo "Waiting $DELAY seconds for password to expire..."
|
||||
sleep $DELAY
|
||||
sleep 1
|
||||
# $DELAY is empty if we were so slow that the password expired already
|
||||
if test -n "$DELAY" ; then
|
||||
echo "Waiting $DELAY seconds for password to expire..."
|
||||
sleep $DELAY
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
$LDAPSEARCH -e ppolicy -H $URI1 -D "$USER" -w $PASS \
|
||||
-b "$BASEDN" -s base > $SEARCHOUT 2>&1
|
||||
|
|
@ -803,8 +811,12 @@ DELAY=`echo "$DELAYATTR" | sed -n -e 's/.*expire=\(\d*\)/\1/p'`
|
|||
DELAY=`expr $DELAY - 10`
|
||||
|
||||
echo "Testing password expiration"
|
||||
echo "Waiting $DELAY seconds for password to expire..."
|
||||
sleep $DELAY
|
||||
# $DELAY is empty if we were so slow that the password expired already
|
||||
if test -n "$DELAY" ; then
|
||||
echo "Waiting $DELAY seconds for password to expire..."
|
||||
sleep $DELAY
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
$LDAPSEARCH -H $URI1 -D "$USER" -w $PASS \
|
||||
-b "$BASEDN" -s base > $SEARCHOUT 2>&1
|
||||
|
|
|
|||
Loading…
Reference in a new issue