From cab06858d0404c4cd9dff44a38db53c81b8bd646 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 9 Nov 2002 22:26:04 +0000 Subject: [PATCH] Fix zebraidx init's. Use SIGTERM instead of SIGKILL for scripts --- test/gils/.cvsignore | 3 +-- test/gils/test1.sh | 8 ++++++-- test/gils/test2.sh | 5 +++-- test/gils/timing1.sh | 2 +- test/gils/timing2.sh | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/test/gils/.cvsignore b/test/gils/.cvsignore index a193425..b639ce5 100644 --- a/test/gils/.cvsignore +++ b/test/gils/.cvsignore @@ -1,7 +1,6 @@ Makefile Makefile.in *.mf -idx.log -srv.log +*.log log *.LCK diff --git a/test/gils/test1.sh b/test/gils/test1.sh index a5230b3..e33ccff 100755 --- a/test/gils/test1.sh +++ b/test/gils/test1.sh @@ -1,5 +1,9 @@ echo "testing without stored keys (zebra1.cfg)" +echo "See if servers are running...." +ps ax|grep zebrasrv +sleep 1 + echo "initializing..." mkdir -p reg rm -f records/esdd000[12].grs # these should not be here, will be created later @@ -10,7 +14,7 @@ echo "updating..." ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1 echo "killing old server (if any)..." -test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` +test -f zebrasrv.pid && kill `cat zebrasrv.pid` rm -f zebrasrv.pid rm -f srv.log @@ -46,7 +50,7 @@ grep "^Result count: 18$" log || exit 1 echo "stopping server..." test -f zebrasrv.pid || exit 1 -kill -9 `cat zebrasrv.pid` || exit 1 +kill `cat zebrasrv.pid` || exit 1 rm -f zebrasrv.pid echo "ok" diff --git a/test/gils/test2.sh b/test/gils/test2.sh index 7284db0..16d22d6 100755 --- a/test/gils/test2.sh +++ b/test/gils/test2.sh @@ -2,7 +2,7 @@ echo "Testing with storekeys (zebra2.cfg)" echo "init..." rm -f idx.log log rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -l idx.log init || exit 1 +../../index/zebraidx -l idx.log -c zebra2.cfg init || exit 1 echo "update 1..." ../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1 @@ -59,6 +59,7 @@ echo "search 5..." ../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log || exit 1 +sleep 1 echo "modifying a test record..." sed 's/UTAH/XYZ/g' records/esdd0002x.grs mv records/esdd0002x.grs records/esdd0002.grs @@ -77,7 +78,7 @@ grep "^Result count: 1$" log || exit 1 echo "stopping server..." test -f zebrasrv.pid || exit 1 -kill -9 `cat zebrasrv.pid` || exit 1 +kill `cat zebrasrv.pid` || exit 1 rm -f idx.log log rm -f records/esdd000[12].grs rm -f zebrasrv.pid diff --git a/test/gils/timing1.sh b/test/gils/timing1.sh index 3905e3c..1f373f7 100755 --- a/test/gils/timing1.sh +++ b/test/gils/timing1.sh @@ -6,7 +6,7 @@ echo "Testing timings of updates" echo " init..." rm -f idx.log log rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -l idx.log init || exit 1 +../../index/zebraidx -c zebra2.cfg -l idx.log init || exit 1 echo " killing old server (if any)..." test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index 325a121..fa90ca5 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -5,7 +5,7 @@ echo "Testing timings of updates" echo " init..." rm -f idx.log log timeref[12] rm -f records/esdd000[12].grs # these should not be here, will be created later -../../index/zebraidx -l idx.log init || exit 1 +../../index/zebraidx -c zebra2.cfg -l idx.log init || exit 1 touch timeref1 # make an early timestamp echo " killing old server (if any)..." -- 1.7.10.4