From d5b9945700bf93043f83de10d799fdbd4046a5c9 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 15 Dec 2005 10:14:39 +0000 Subject: [PATCH] fix timings and retry between syncrepl and server startup --- tests/data/slapd-glue-syncrepl1.conf | 2 +- tests/data/slapd-glue-syncrepl2.conf | 2 +- tests/scripts/test033-glue-syncrepl | 29 ++++++++++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/tests/data/slapd-glue-syncrepl1.conf b/tests/data/slapd-glue-syncrepl1.conf index dbfdbae547..77172b6f58 100644 --- a/tests/data/slapd-glue-syncrepl1.conf +++ b/tests/data/slapd-glue-syncrepl1.conf @@ -81,7 +81,7 @@ syncrepl rid=1 schemachecking=off scope=sub type=refreshAndPersist - retry="10 3 300 5" + retry="3 3 300 5" updateref @URI2@ #overlay syncprov diff --git a/tests/data/slapd-glue-syncrepl2.conf b/tests/data/slapd-glue-syncrepl2.conf index f2ef024dea..b887b61433 100644 --- a/tests/data/slapd-glue-syncrepl2.conf +++ b/tests/data/slapd-glue-syncrepl2.conf @@ -61,7 +61,7 @@ syncrepl rid=2 schemachecking=off scope=sub type=refreshAndPersist - retry="10 3 300 5" + retry="3 3 300 5" updateref @URI1@ #overlay syncprov diff --git a/tests/scripts/test033-glue-syncrepl b/tests/scripts/test033-glue-syncrepl index 57d50b8477..31f5fc669d 100755 --- a/tests/scripts/test033-glue-syncrepl +++ b/tests/scripts/test033-glue-syncrepl @@ -42,18 +42,6 @@ KILLPIDS="$PID" sleep 1 -echo "Using ldapsearch to check that slapd 1 is running..." -for i in 0 1 2 3 4 5; do - $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ - '(objectclass=*)' > /dev/null 2>&1 - RC=$? - if test $RC = 0 ; then - break - fi - echo "Waiting 5 seconds for slapd to start..." - sleep 5 -done - echo "Starting slapd 2 on TCP/IP port $PORT2..." . $CONFFILTER $BACKEND $MONITORDB < $GLUESYNCCONF2 > $CONF2 $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 & @@ -66,6 +54,18 @@ KILLPIDS="$KILLPIDS $PID" sleep 1 +echo "Using ldapsearch to check that slapd 1 is running..." +for i in 0 1 2 3 4 5; do + $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ + '(objectclass=*)' > /dev/null 2>&1 + RC=$? + if test $RC = 0 ; then + break + fi + echo "Waiting 5 seconds for slapd to start..." + sleep 5 +done + echo "Using ldapsearch to check that slapd 2 is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \ @@ -78,8 +78,9 @@ for i in 0 1 2 3 4 5; do sleep 5 done -echo "Waiting 15 seconds for shadow subtrees to sync..." -sleep 15 +SLEEP=15 +echo "Waiting $SLEEP seconds for shadow subtrees to sync..." +sleep $SLEEP for P in $PORT1 $PORT2 ; do echo "Using ldapsearch to read all the entries from port $P..." -- 2.39.5