mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 06:59:54 -05:00
deltasync test tweaks
Check replication success before stopping consumer. Set retry/interval to make sure consumer reconnects after provider restart.
This commit is contained in:
parent
e1a5177bac
commit
3fb20f1e91
2 changed files with 37 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ syncrepl rid=1
|
|||
schemachecking=off
|
||||
scope=sub
|
||||
type=refreshAndPersist
|
||||
retry="3 +" interval=00:00:00:03
|
||||
updateref @URI1@
|
||||
|
||||
overlay syncprov
|
||||
|
|
|
|||
|
|
@ -245,6 +245,42 @@ fi
|
|||
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
|
||||
sleep $SLEEP1
|
||||
|
||||
echo "Using ldapsearch to read all the entries from the provider..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
|
||||
'objectclass=*' \* + > $MASTEROUT 2>&1
|
||||
RC=$?
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed at provider ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Using ldapsearch to read all the entries from the consumer..."
|
||||
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
|
||||
'objectclass=*' \* + > $SLAVEOUT 2>&1
|
||||
RC=$?
|
||||
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed at consumer ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Filtering provider results..."
|
||||
$LDIFFILTER -s bdb=a,hdb=a < $MASTEROUT | grep -iv "^auditcontext:" > $MASTERFLT
|
||||
echo "Filtering consumer results..."
|
||||
$LDIFFILTER -s bdb=a,hdb=a < $SLAVEOUT | grep -iv "^auditcontext:" > $SLAVEFLT
|
||||
|
||||
echo "Comparing retrieved entries from provider and consumer..."
|
||||
$CMP $MASTERFLT $SLAVEFLT > $CMPOUT
|
||||
|
||||
if test $? != 0 ; then
|
||||
echo "test failed - provider and consumer databases differ"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Stopping consumer to test recovery..."
|
||||
kill -HUP $SLAVEPID
|
||||
sleep 10
|
||||
|
|
|
|||
Loading…
Reference in a new issue