From ac6422c96686996df31e3e943cee538428b6a094 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Thu, 5 Mar 2009 23:19:39 +0000 Subject: [PATCH] Set sync intervals to 3 seconds use SLEEP1 and SLEEP2 for sync delays --- tests/data/slapd-syncrepl-multiproxy.conf | 6 +- .../slapd-syncrepl-slave-persist-ldap.conf | 2 +- tests/data/slapd-syncrepl-slave-persist1.conf | 2 +- tests/data/slapd-syncrepl-slave-refresh1.conf | 2 +- tests/scripts/defines.sh | 2 + tests/scripts/test017-syncreplication-refresh | 8 +-- tests/scripts/test018-syncreplication-persist | 18 ++--- tests/scripts/test019-syncreplication-cascade | 8 +-- tests/scripts/test033-glue-syncrepl | 5 +- tests/scripts/test043-delta-syncrepl | 16 ++--- tests/scripts/test045-syncreplication-proxied | 45 +++++------- tests/scripts/test048-syncrepl-multiproxy | 25 +++---- tests/scripts/test049-sync-config | 26 ++++--- tests/scripts/test050-syncrepl-multimaster | 69 +++++++++---------- .../test054-syncreplication-parallel-load | 16 ++--- 15 files changed, 114 insertions(+), 136 deletions(-) diff --git a/tests/data/slapd-syncrepl-multiproxy.conf b/tests/data/slapd-syncrepl-multiproxy.conf index 876df55e10..84e6ef30c8 100644 --- a/tests/data/slapd-syncrepl-multiproxy.conf +++ b/tests/data/slapd-syncrepl-multiproxy.conf @@ -78,7 +78,7 @@ syncrepl rid=1 schemachecking=off scope=sub type=refreshAndPersist - retry="5 5 300 5" + retry="3 5 300 5" database ldap hidden on @@ -102,7 +102,7 @@ syncrepl rid=2 schemachecking=off scope=sub type=refreshOnly - interval=00:00:00:10 - retry="5 5 300 5" + interval=00:00:00:03 + retry="3 5 300 5" #monitor#database monitor diff --git a/tests/data/slapd-syncrepl-slave-persist-ldap.conf b/tests/data/slapd-syncrepl-slave-persist-ldap.conf index 30699381c1..fd1c350526 100644 --- a/tests/data/slapd-syncrepl-slave-persist-ldap.conf +++ b/tests/data/slapd-syncrepl-slave-persist-ldap.conf @@ -69,7 +69,7 @@ syncrepl rid=1 schemachecking=off scope=sub type=refreshAndPersist - retry="5 5 300 5" + retry="3 5 300 5" overlay syncprov diff --git a/tests/data/slapd-syncrepl-slave-persist1.conf b/tests/data/slapd-syncrepl-slave-persist1.conf index 7fd672e65e..4a41e55a25 100644 --- a/tests/data/slapd-syncrepl-slave-persist1.conf +++ b/tests/data/slapd-syncrepl-slave-persist1.conf @@ -68,7 +68,7 @@ syncrepl rid=1 schemachecking=off scope=sub type=refreshAndPersist - retry="5 5 300 5" + retry="3 5 300 5" updateref @URI1@ overlay syncprov diff --git a/tests/data/slapd-syncrepl-slave-refresh1.conf b/tests/data/slapd-syncrepl-slave-refresh1.conf index 8b6f9c3e0f..6accc9596d 100644 --- a/tests/data/slapd-syncrepl-slave-refresh1.conf +++ b/tests/data/slapd-syncrepl-slave-refresh1.conf @@ -58,7 +58,7 @@ syncrepl rid=1 schemachecking=off scope=sub type=refreshOnly - interval=00:00:00:10 + interval=00:00:00:03 updateref @URI1@ overlay syncprov diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index e47c2fab9a..622de86c03 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -46,6 +46,8 @@ WITH_SASL=${AC_WITH_SASL-no} USE_SASL=${SLAPD_USE_SASL-no} ACI=${AC_ACI_ENABLED-acino} THREADS=${AC_THREADS-threadsno} +SLEEP1=${SLEEP1-7} +SLEEP2=${SLEEP2-10} # dirs PROGDIR=./progs diff --git a/tests/scripts/test017-syncreplication-refresh b/tests/scripts/test017-syncreplication-refresh index 0ffd548717..572edf77b4 100755 --- a/tests/scripts/test017-syncreplication-refresh +++ b/tests/scripts/test017-syncreplication-refresh @@ -113,8 +113,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapmodify to modify producer directory..." @@ -252,8 +252,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Try updating the consumer slapd..." $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \ diff --git a/tests/scripts/test018-syncreplication-persist b/tests/scripts/test018-syncreplication-persist index 606ac615de..47579a72f2 100755 --- a/tests/scripts/test018-syncreplication-persist +++ b/tests/scripts/test018-syncreplication-persist @@ -13,7 +13,7 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then +if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" && test "$BACKEND" != "ldif"; then echo "Test does not support $BACKEND" exit 0 fi @@ -118,8 +118,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping the provider, sleeping 10 seconds and restarting it..." kill -HUP "$PID" @@ -269,8 +269,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping consumer to test recovery..." kill -HUP $SLAVEPID @@ -318,8 +318,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID $SLAVEPID" -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 if test ! $BACKLDAP = "ldapno" ; then echo "Try updating the consumer slapd..." @@ -352,8 +352,8 @@ EOMODS exit $RC fi - echo "Waiting 15 seconds for syncrepl to receive changes..." - sleep 15 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 fi OPATTRS="entryUUID creatorsName createTimestamp modifiersName modifyTimestamp" diff --git a/tests/scripts/test019-syncreplication-cascade b/tests/scripts/test019-syncreplication-cascade index 72b1842d2c..1d4bde9d3f 100755 --- a/tests/scripts/test019-syncreplication-cascade +++ b/tests/scripts/test019-syncreplication-cascade @@ -237,8 +237,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..." +sleep $SLEEP2 echo "Using ldapmodify to modify master directory..." @@ -341,8 +341,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..." +sleep $SLEEP2 echo "Performing modify alone on provider..." $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \ diff --git a/tests/scripts/test033-glue-syncrepl b/tests/scripts/test033-glue-syncrepl index c27768dd32..f58a36f2ca 100755 --- a/tests/scripts/test033-glue-syncrepl +++ b/tests/scripts/test033-glue-syncrepl @@ -133,9 +133,8 @@ case $RC in ;; esac -SLEEP=15 -echo "Waiting $SLEEP seconds for shadow subtrees to sync..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for shadow subtrees to sync..." +sleep $SLEEP1 echo "Filtering original ldif used to create database..." . $LDIFFILTER < $GLUESYNCOUT > $LDIFFLT diff --git a/tests/scripts/test043-delta-syncrepl b/tests/scripts/test043-delta-syncrepl index 428f7136d4..294ab09f80 100755 --- a/tests/scripts/test043-delta-syncrepl +++ b/tests/scripts/test043-delta-syncrepl @@ -122,8 +122,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping the provider, sleeping 10 seconds and restarting it..." kill -HUP "$PID" @@ -242,8 +242,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping consumer to test recovery..." kill -HUP $SLAVEPID @@ -288,8 +288,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID $SLAVEPID" -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 if test ! $BACKLDAP = "ldapno" ; then echo "Try updating the consumer slapd..." @@ -310,8 +310,8 @@ EOMODS exit $RC fi - echo "Waiting 15 seconds for syncrepl to receive changes..." - sleep 15 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 fi echo "Using ldapsearch to read all the entries from the producer..." diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index d6eea8f42b..b0f2b23223 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -203,9 +203,8 @@ for i in 1 2 3; do break fi - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done #echo "Using ldapsearch to read all the entries from the master..." @@ -245,11 +244,10 @@ if test $? != 0 ; then fi CHECK=`expr $CHECK + 1` -SLEEP=10 -echo "$CHECK > Stopping the provider, sleeping $SLEEP seconds and restarting it..." +echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..." kill -HUP "$MASTERPID" wait $MASTERPID -sleep $SLEEP +sleep $SLEEP2 echo "======================= RESTART =======================" >> $LOG1 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 & @@ -379,9 +377,8 @@ fi # check slave contextCSN for i in 1 2 3; do - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ '(objectClass=*)' -s base contextCSN > "${SLAVEOUT}.$CHECK" 2>&1 @@ -487,9 +484,8 @@ fi # check slave contextCSN for i in 1 2 3 4 5; do - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ '(objectClass=*)' -s base contextCSN > "${SLAVEOUT}.$CHECK" 2>&1 @@ -593,9 +589,8 @@ for i in 1 2 3; do break fi - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done #echo "Using ldapsearch to read all the entries from the master..." @@ -649,9 +644,8 @@ drink: Mad Dog 20/20 EOMODS -SLEEP=10 -echo "Waiting $SLEEP seconds for syncrepl to retry..." -sleep $SLEEP +echo "Waiting $SLEEP2 seconds for syncrepl to retry..." +sleep $SLEEP2 echo "Restarting consumer..." echo "======================= RESTART =======================" >> $LOG2 @@ -676,9 +670,8 @@ fi # check slave contextCSN for i in 1 2 3 4 5; do - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ '(objectClass=*)' -s base contextCSN > "${SLAVEOUT}.$CHECK" 2>&1 @@ -750,9 +743,8 @@ if test $? != 0 ; then fi KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID" - SLEEP=15 - echo " Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo " Waiting $SLEEP2 seconds for syncrepl to receive changes..." + sleep $SLEEP2 #echo "Using ldapsearch to read all the entries from the slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ @@ -834,9 +826,8 @@ for i in 1 2 3; do break fi - SLEEP=5 - echo "Waiting $SLEEP seconds for syncrepl to receive changes..." - sleep $SLEEP + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done #echo "Using ldapsearch to read all the entries from the master..." diff --git a/tests/scripts/test048-syncrepl-multiproxy b/tests/scripts/test048-syncrepl-multiproxy index eb9a444dad..2bb5629939 100755 --- a/tests/scripts/test048-syncrepl-multiproxy +++ b/tests/scripts/test048-syncrepl-multiproxy @@ -159,9 +159,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=15 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 #echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ @@ -223,11 +222,10 @@ if test $? != 0 ; then fi CHECK=`expr $CHECK + 1` -SLEEP=10 -echo "$CHECK > Stopping the provider, sleeping $SLEEP seconds and restarting it..." +echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..." kill -HUP "$MASTERPID" wait $MASTERPID -sleep $SLEEP +sleep $SLEEP2 echo "======================= RESTART =======================" >> $LOG1 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 & @@ -345,9 +343,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=15 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 #echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ @@ -457,9 +454,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID" -SLEEP=25 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 #echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ @@ -539,9 +535,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=15 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 #echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ diff --git a/tests/scripts/test049-sync-config b/tests/scripts/test049-sync-config index f48c7918cf..4ef7272891 100755 --- a/tests/scripts/test049-sync-config +++ b/tests/scripts/test049-sync-config @@ -37,7 +37,7 @@ if test x"$SYNCMODE" = x ; then fi case "$SYNCMODE" in ro) - SYNCTYPE="type=refreshOnly interval=00:00:00:10" + SYNCTYPE="type=refreshOnly interval=00:00:00:03" ;; rp) SYNCTYPE="type=refreshAndPersist" @@ -114,7 +114,7 @@ changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 - add: olcUpdateRef olcUpdateRef: $URI1 @@ -171,15 +171,14 @@ changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 - add: olcUpdateRef olcUpdateRef: $URI1 EOF -SLEEP=10 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapsearch to check that syncrepl received config changes..." RC=32 @@ -191,8 +190,8 @@ for i in 0 1 2 3 4 5; do RC=0 break fi - echo "Waiting 5 seconds for syncrepl to receive changes..." - sleep 5 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done if test $RC != 0 ; then @@ -247,7 +246,7 @@ olcRootDN: $MANAGERDN olcRootPW: $PASSWD olcSyncRepl: rid=002 provider=$URI1 binddn="$MANAGERDN" bindmethod=simple credentials=$PASSWD searchbase="$BASEDN" $SYNCTYPE - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcUpdateRef: $URI1 dn: olcOverlay=syncprov,olcDatabase={1}${BACKEND},cn=config @@ -291,9 +290,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapsearch to check that syncrepl received database changes..." RC=32 @@ -305,8 +303,8 @@ for i in 0 1 2 3 4 5; do RC=0 break fi - echo "Waiting 5 seconds for syncrepl to receive changes..." - sleep 5 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done if test $RC != 0 ; then diff --git a/tests/scripts/test050-syncrepl-multimaster b/tests/scripts/test050-syncrepl-multimaster index 5c050794a1..4e85c4f0c3 100755 --- a/tests/scripts/test050-syncrepl-multimaster +++ b/tests/scripts/test050-syncrepl-multimaster @@ -40,7 +40,7 @@ if test x"$SYNCMODE" = x ; then fi case "$SYNCMODE" in ro) - SYNCTYPE="type=refreshOnly interval=00:00:00:10" + SYNCTYPE="type=refreshOnly interval=00:00:00:03" ;; rp) SYNCTYPE="type=refreshAndPersist" @@ -173,13 +173,13 @@ changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 - add: olcMirrorMode olcMirrorMode: TRUE @@ -229,13 +229,13 @@ changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 - add: olcMirrorMode olcMirrorMode: TRUE @@ -279,13 +279,13 @@ changetype: modify add: olcSyncRepl olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 - add: olcMirrorMode olcMirrorMode: TRUE @@ -337,13 +337,13 @@ olcRootDN: $MANAGERDN olcRootPW: $PASSWD olcSyncRepl: rid=004 provider=$URI1 binddn="$MANAGERDN" bindmethod=simple credentials=$PASSWD searchbase="$BASEDN" $SYNCTYPE - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=005 provider=$URI2 binddn="$MANAGERDN" bindmethod=simple credentials=$PASSWD searchbase="$BASEDN" $SYNCTYPE - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcSyncRepl: rid=006 provider=$URI3 binddn="$MANAGERDN" bindmethod=simple credentials=$PASSWD searchbase="$BASEDN" $SYNCTYPE - retry="5 5 300 5" timeout=3 + retry="3 5 300 5" timeout=3 olcMirrorMode: TRUE dn: olcOverlay=syncprov,olcDatabase={1}${BACKEND},cn=config @@ -387,9 +387,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapadd to populate consumer1..." $LDAPADD -D "$MANAGERDN" -H $URI2 -w $PASSWD -f $LDIFADD1 \ @@ -401,9 +400,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapadd to populate consumer2..." $LDAPADD -D "$MANAGERDN" -H $URI3 -w $PASSWD \ @@ -420,9 +418,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapmodify to add to the producer entries that will be deleted..." $LDAPMODIFY -D "$MANAGERDN" -H $URI1 -w $PASSWD \ @@ -452,9 +449,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapmodify to delete entries from consumer1..." $LDAPMODIFY -D "$MANAGERDN" -H $URI2 -w $PASSWD \ @@ -469,9 +465,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapmodify to delete entries from consumer2..." $LDAPMODIFY -D "$MANAGERDN" -H $URI3 -w $PASSWD \ @@ -486,9 +481,8 @@ if test $RC != 0 ; then exit $RC fi -SLEEP=20 -echo "Waiting $SLEEP seconds for syncrepl to receive changes..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Using ldapsearch to check that syncrepl received database changes..." RC=32 @@ -500,8 +494,8 @@ for i in 0 1 2 3 4 5; do RC=0 break fi - echo "Waiting 5 seconds for syncrepl to receive changes..." - sleep 5 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done if test $RC != 0 ; then @@ -520,8 +514,8 @@ for i in 0 1 2 3 4 5; do RC=0 break fi - echo "Waiting 5 seconds for syncrepl to receive changes..." - sleep 5 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 done if test $RC != 0 ; then @@ -747,9 +741,8 @@ if test $RC != 0 ; then fi # Insert modifications and more tests here. -SLEEP=10 -echo "Waiting $SLEEP seconds for servers to resync..." -sleep $SLEEP +echo "Waiting $SLEEP1 seconds for servers to resync..." +sleep $SLEEP1 test $KILLSERVERS != no && kill -HUP $KILLPIDS diff --git a/tests/scripts/test054-syncreplication-parallel-load b/tests/scripts/test054-syncreplication-parallel-load index 7589364a43..585da2189a 100755 --- a/tests/scripts/test054-syncreplication-parallel-load +++ b/tests/scripts/test054-syncreplication-parallel-load @@ -125,8 +125,8 @@ $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \ C2PID=$! wait $C1PID $C2PID -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping the provider, sleeping 10 seconds and restarting it..." kill -HUP "$PID" @@ -261,8 +261,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 15 seconds for syncrepl to receive changes..." -sleep 15 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 echo "Stopping consumer to test recovery..." kill -HUP $SLAVEPID @@ -298,8 +298,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID $SLAVEPID" -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." +sleep $SLEEP1 if test ! $BACKLDAP = "ldapno" ; then echo "Try updating the consumer slapd..." @@ -332,8 +332,8 @@ EOMODS exit $RC fi - echo "Waiting 15 seconds for syncrepl to receive changes..." - sleep 15 + echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..." + sleep $SLEEP1 fi OPATTRS="entryUUID creatorsName createTimestamp modifiersName modifyTimestamp" -- 2.39.5