Assume PID file has been created just after server has started
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 3 Jan 2005 09:19:26 +0000 (09:19 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 3 Jan 2005 09:19:26 +0000 (09:19 +0000)
test/gils/stop01.sh
test/gils/stop02.sh
test/gils/stop03.sh
test/gils/stop04.sh
test/gils/test1.sh
test/gils/test2.sh
test/gils/test3.sh
test/gils/timing1.sh
test/gils/timing2.sh

index edaf28e..97083b5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: stop01.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
+# $Id: stop01.sh,v 1.11 2005-01-03 09:19:26 adam Exp $
 # test start and stop of the server with -1
 
 pp=${srcdir:-"."}
@@ -17,7 +17,7 @@ test -d reg || mkdir reg
 echo "Starting server with -1 (one shot)..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -1 -c $pp/zebra1.cfg -l $LOG unix:socket
 echo "  checking that it runs... " >>$LOG
-test -f z.pid || sleep 1 || test -f z.pid || exit 1
+test -f z.pid || exit 1
 PID=`cat z.pid`
 kill -CHLD $PID >/dev/null 2>&1 || exit 1
 
index 37a20db..3fc821e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: stop02.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
+# $Id: stop02.sh,v 1.11 2005-01-03 09:19:26 adam Exp $
 # test start and stop of the server with -S
 
 pp=${srcdir:-"."}
@@ -17,7 +17,7 @@ test -d reg || mkdir reg
 echo "Starting server with -S (static)..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket
 echo "  checking that it runs... " >>$LOG
-test -f z.pid || sleep 1 || test -f z.pid || exit 1
+test -f z.pid || exit 1
 PID=`cat z.pid`
 kill -CHLD $PID >/dev/null 2>&1 || exit 1
 
index 3b8cbe7..8523036 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: stop03.sh,v 1.9 2005-01-02 23:21:31 adam Exp $
+# $Id: stop03.sh,v 1.10 2005-01-03 09:19:26 adam Exp $
 # test start and stop of the threaded server (-T)
 
 pp=${srcdir:-"."}
@@ -22,6 +22,9 @@ if grep 'not available' out >/dev/null; then
     exit 0
 fi
 
+echo "  checking that it runs..." >>$LOG
+test -f z.pid || exit 1
+
 PID=`cat z.pid`
 echo "  checking that it still runs..." >>$LOG
 kill -CHLD $PID >/dev/null 2>&1 || exit 1
index 356afec..f6e74ed 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: stop04.sh,v 1.8 2005-01-02 23:21:31 adam Exp $
+# $Id: stop04.sh,v 1.9 2005-01-03 09:19:26 adam Exp $
 # test start and stop of the forked server 
 
 pp=${srcdir:-"."}
@@ -16,10 +16,9 @@ mkdir -p reg
 
 echo "Starting server with (forked)..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -c $pp/zebra1.cfg -l $LOG tcp:@:9901 
-sleep 1
 
 echo "  checking that it runs... " >>$LOG
-test -f z.pid || sleep 5 || test -f z.pid || exit 1
+test -f z.pid || exit 1
 PID=`cat z.pid`
 kill -CHLD $PID >/dev/null 2>&1 || exit 1
 
index 666284f..a96014b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: test1.sh,v 1.11 2005-01-02 23:21:31 adam Exp $
+# $Id: test1.sh,v 1.12 2005-01-03 09:19:26 adam Exp $
 
 pp=${srcdir:-"."}
 
@@ -16,10 +16,9 @@ echo "updating..." >>$LOG
 
 echo "starting server..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG tcp:@:9901
-sleep 1
 
 echo "checking it runs..." >>$LOG
-test -f z.pid || sleep 5 || test -f z.pid || exit 1
+test -f z.pid || exit 1
 
 echo "search 1..." >>$LOG
 ../api/testclient localhost:9901 utah > log || exit 1
index 8a13039..cb568ae 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: test2.sh,v 1.11 2005-01-02 23:21:31 adam Exp $
+# $Id: test2.sh,v 1.12 2005-01-03 09:19:26 adam Exp $
 
 pp=${srcdir:-"."}
 
@@ -21,8 +21,7 @@ test -f z.pid && kill -9 `cat z.pid`
 
 echo "starting server..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
-sleep 1
-test -f z.pid || sleep 5 || test -f z.pid || exit 1
+test -f z.pid || exit 1
 
 echo "search 1..." >>$LOG
 ../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
index 04eb3d7..c315aa8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: test3.sh,v 1.5 2005-01-02 23:21:31 adam Exp $
+# $Id: test3.sh,v 1.6 2005-01-03 09:19:26 adam Exp $
 
 # Testing searches with lots of @and operators
 # in order to test the fast-forward operation of rsets
@@ -20,7 +20,6 @@ echo "updating..." >>$LOG
 
 echo "starting server..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901
-sleep 1
 
 echo "checking it runs..." >>$LOG
 test -f z.pid || exit 1
index a394281..311b5d8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: timing1.sh,v 1.10 2005-01-02 23:21:31 adam Exp $
+# $Id: timing1.sh,v 1.11 2005-01-03 09:19:26 adam Exp $
 # tests that updates are reflected immediately # in the registers.
 # Repeatedly modifies a record and counts hits.
 # Test 1: with good sleeps in every between - should pass always
@@ -16,7 +16,6 @@ rm -f $pp/records/esdd000[12].grs # these should not be here, will be created la
 
 echo "  starting server..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
-sleep 1
 test -f z.pid || exit 1
 sleep 2
 
index ddbd0fa..daa1b0a 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: timing2.sh,v 1.10 2005-01-02 23:21:31 adam Exp $ 
+# $Id: timing2.sh,v 1.11 2005-01-03 09:19:26 adam Exp $ 
 # Demonstrated that updates depend on file timestamps
 
 pp=${srcdir:-"."}
@@ -16,8 +16,8 @@ touch timeref1  # make an early timestamp
 
 echo "  starting server..." >>$LOG
 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901
-sleep 1
 test -f z.pid || exit 1
+sleep 1
 touch timeref2  # make a later timestamp
 
 echo "  update 1..." >>$LOG