From 65a527eb9ec7e2eed6778fb21778b3e91a3f6f2e Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 12 Dec 2004 07:09:04 +0000 Subject: [PATCH] Detect regression of ITS#3425: Stop consumer, then restart after more mods are done to master. --- tests/scripts/test018-syncreplication-persist | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/scripts/test018-syncreplication-persist b/tests/scripts/test018-syncreplication-persist index aefc65530b..94b3d6fe51 100755 --- a/tests/scripts/test018-syncreplication-persist +++ b/tests/scripts/test018-syncreplication-persist @@ -139,7 +139,6 @@ dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,d changetype: modify replace: drink drink: Iced Tea -drink: Mad Dog 20/20 dn: cn=ITD Staff,ou=Groups,dc=example,dc=com changetype: modify @@ -205,6 +204,43 @@ fi echo "Waiting 15 seconds for syncrepl to receive changes..." sleep 15 +echo "Stopping consumer to test recovery..." +kill -HUP $SLAVEPID +sleep 10 + +echo "Modifying more entries on the master..." +$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \ + $TESTOUT 2>&1 << EOMODS +dn: cn=Rosco P. Coltrane, ou=Retired, ou=People, dc=example,dc=com +changetype: delete + +dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com +changetype: modify +add: drink +drink: Mad Dog 20/20 + +dn: cn=Rosco P. Coltrane, ou=Retired, ou=People, dc=example,dc=com +changetype: add +objectclass: OpenLDAPperson +sn: Coltrane +uid: rosco +cn: Rosco P. Coltrane + +EOMODS + +echo "Restarting consumer..." +echo "RESTART" >> $LOG4 +$SLAPD -f $CONF4 -h $URI4 -d $LVL $TIMING >> $LOG4 2>&1 & +SLAVEPID=$! +if test $WAIT != 0 ; then + echo SLAVEPID $SLAVEPID + read foo +fi +KILLPIDS="$PID $SLAVEPID" + +echo "Waiting 25 seconds for syncrepl to receive changes..." +sleep 25 + echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ 'objectclass=*' > $MASTEROUT 2>&1 -- 2.39.5