X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fgils%2Ftiming2.sh;h=5862b6e54d051df46efd07ca183c04ddbe8781cb;hb=66389dd83548212275fda1dbe09a242c947afa30;hp=e34b1c2125fe2071683564beb8351706029eda6c;hpb=51f51d3de3b24507ec02ffb8d0af62b57d25f8fb;p=idzebra-moved-to-github.git diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index e34b1c2..5862b6e 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: timing2.sh,v 1.9 2004-06-15 09:43:30 adam Exp $ +# $Id: timing2.sh,v 1.12 2005-01-03 12:08:04 adam Exp $ # Demonstrated that updates depend on file timestamps pp=${srcdir:-"."} @@ -14,20 +14,17 @@ rm -f $pp/records/esdd000[12].grs # these should not be here, will be created la ../../index/zebraidx -c $pp/zebra2.cfg -l $LOG init || exit 1 touch timeref1 # make an early timestamp -echo " killing old server (if any)..." >>$LOG -test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid` - echo " starting server..." >>$LOG -../../index/zebrasrv -S -c $pp/zebra2.cfg -l $LOG tcp:@:9901 & +../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket +test -f z.pid || exit 1 sleep 1 -test -f zebrasrv.pid || exit 1 touch timeref2 # make a later timestamp echo " update 1..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1 echo " search 1..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 9$" log >/dev/null || exit 1 echo "making a test record..." >>$LOG @@ -38,7 +35,7 @@ echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1 echo " search 2..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 grep "^Result count: 10$" log >/dev/null || exit 1 echo " modifying a test record (xyz)..." >>$LOG @@ -50,7 +47,7 @@ echo " not indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1 echo " search 3..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 10$" log >/dev/null || exit 1 @@ -61,14 +58,14 @@ echo " indexing it..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1 echo " search 4..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 utah" > log || exit 1 echo " checking..." >>$LOG grep "^Result count: 9$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG -test -f zebrasrv.pid || exit 1 -kill `cat zebrasrv.pid` || exit 1 +test -f z.pid || exit 1 +kill `cat z.pid` || exit 1 rm -f log timeref[12] rm -f $pp/records/esdd000[12].grs -rm -f zebrasrv.pid +rm -f z.pid