From: Adam Dickmeiss Date: Mon, 3 Jan 2005 12:08:04 +0000 (+0000) Subject: Use unix:socket instead of localhost:9901 X-Git-Tag: snippet.version.1~195 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=a692aad104901f14ecb713bf85940117c68108e7 Use unix:socket instead of localhost:9901 --- diff --git a/test/gils/stop03.sh b/test/gils/stop03.sh index 8523036..112471d 100755 --- a/test/gils/stop03.sh +++ b/test/gils/stop03.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop03.sh,v 1.10 2005-01-03 09:19:26 adam Exp $ +# $Id: stop03.sh,v 1.11 2005-01-03 12:08:04 adam Exp $ # test start and stop of the threaded server (-T) pp=${srcdir:-"."} @@ -15,7 +15,7 @@ mkdir -p reg ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 echo "Starting server with -T (threaded)..." >>$LOG -../../index/zebrasrv -D -p z.pid -T -c $pp/zebra1.cfg -l $LOG tcp:@:9901 2>out +../../index/zebrasrv -D -p z.pid -T -c $pp/zebra1.cfg -l $LOG unix:socket 2>out if grep 'not available' out >/dev/null; then test -f z.pid && rm -f z.pid @@ -30,16 +30,19 @@ echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG -../api/testclient localhost:9901 utah >>$LOG || exit 1 +../api/testclient unix:socket utah >>$LOG || exit 1 sleep 1 echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting again, with a delay..." >>$LOG -../api/testclient localhost:9901 utah 5 >>$LOG & +../api/testclient unix:socket utah 5 >>$LOG & sleep 1 # let the client connect +echo " checking that it still runs..." >>$LOG +kill -CHLD $PID >/dev/null 2>&1 || exit 1 + echo " killing it..." >>$LOG kill $PID sleep 1 diff --git a/test/gils/stop04.sh b/test/gils/stop04.sh index f6e74ed..43f2bd6 100755 --- a/test/gils/stop04.sh +++ b/test/gils/stop04.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: stop04.sh,v 1.9 2005-01-03 09:19:26 adam Exp $ +# $Id: stop04.sh,v 1.10 2005-01-03 12:08:04 adam Exp $ # test start and stop of the forked server pp=${srcdir:-"."} @@ -15,7 +15,7 @@ mkdir -p reg ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update records || exit 1 echo "Starting server with (forked)..." >>$LOG -../../index/zebrasrv -D -p z.pid -c $pp/zebra1.cfg -l $LOG tcp:@:9901 +../../index/zebrasrv -D -p z.pid -c $pp/zebra1.cfg -l $LOG unix:socket echo " checking that it runs... " >>$LOG test -f z.pid || exit 1 @@ -23,14 +23,14 @@ PID=`cat z.pid` kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting to it..." >>$LOG -../api/testclient localhost:9901 utah >>$LOG || exit 1 +../api/testclient unix:socket utah >>$LOG || exit 1 sleep 1 echo " checking that it still runs..." >>$LOG kill -CHLD $PID >/dev/null 2>&1 || exit 1 echo " connecting again, with a delay..." >>$LOG -../api/testclient localhost:9901 utah 5 >>$LOG +../api/testclient unix:socket utah 5 >>$LOG sleep 1 # let the client connect echo " killing it..." >>$LOG diff --git a/test/gils/test1.sh b/test/gils/test1.sh index a96014b..91572cb 100755 --- a/test/gils/test1.sh +++ b/test/gils/test1.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: test1.sh,v 1.12 2005-01-03 09:19:26 adam Exp $ +# $Id: test1.sh,v 1.13 2005-01-03 12:08:04 adam Exp $ pp=${srcdir:-"."} @@ -15,32 +15,32 @@ echo "updating..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1 echo "starting server..." >>$LOG -../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG tcp:@:9901 +../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg -l $LOG unix:socket echo "checking it runs..." >>$LOG test -f z.pid || exit 1 echo "search 1..." >>$LOG -../api/testclient localhost:9901 utah > log || exit 1 +../api/testclient unix:socket utah > log || exit 1 grep "^Result count: 17$" log >/dev/null || exit 1 echo "search 2..." >>$LOG -../api/testclient localhost:9901 "@or utah the" > log || exit 1 +../api/testclient unix:socket "@or utah the" > log || exit 1 grep "^Result count: 40$" log >/dev/null || exit 1 echo "search 3..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 the" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 the" > log || exit 1 grep "^Result count: 1$" log >/dev/null || 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 grep "^Result count: 9$" log >/dev/null || exit 1 echo "reindexing..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1 echo "search 5..." >>$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: 18$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG diff --git a/test/gils/test2.sh b/test/gils/test2.sh index cb568ae..db2714b 100755 --- a/test/gils/test2.sh +++ b/test/gils/test2.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: test2.sh,v 1.12 2005-01-03 09:19:26 adam Exp $ +# $Id: test2.sh,v 1.13 2005-01-03 12:08:04 adam Exp $ pp=${srcdir:-"."} @@ -20,18 +20,18 @@ echo "killing old server (if any)..." >>$LOG 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 +../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket test -f z.pid || 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 "update 3..." >>$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: 9$" log >/dev/null || exit 1 echo "making test records..." >>$LOG @@ -41,7 +41,7 @@ echo "indexing them..." >>$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 grep "^Result count: 10$" log >/dev/null || exit 1 touch $pp/records/esdd0001.grs @@ -49,7 +49,7 @@ echo "indexing again..." >>$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 grep "^Result count: 10$" log >/dev/null || exit 1 echo "making another test record..." >>$LOG @@ -59,7 +59,7 @@ echo "indexing it too..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra2.cfg update $pp/records || exit 1 echo "search 5..." >>$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 sleep 1 @@ -72,11 +72,11 @@ echo "indexing it..." >>$LOG sleep 1 echo "search 6..." >>$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 "search 7..." >>$LOG -../api/testclient localhost:9901 "@attr 1=4 xyz" > log || exit 1 +../api/testclient unix:socket "@attr 1=4 xyz" > log || exit 1 grep "^Result count: 1$" log >/dev/null || exit 1 echo "stopping server..." >>$LOG diff --git a/test/gils/test3.sh b/test/gils/test3.sh index c315aa8..269aab7 100755 --- a/test/gils/test3.sh +++ b/test/gils/test3.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: test3.sh,v 1.6 2005-01-03 09:19:26 adam Exp $ +# $Id: test3.sh,v 1.7 2005-01-03 12:08:04 adam Exp $ # Testing searches with lots of @and operators # in order to test the fast-forward operation of rsets @@ -19,97 +19,97 @@ echo "updating..." >>$LOG ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1 echo "starting server..." >>$LOG -../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG tcp:@:9901 +../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG unix:socket echo "checking it runs..." >>$LOG test -f z.pid || exit 1 echo "search A1..." >>$LOG -../api/testclient -c 17 localhost:9901 utah > log || exit 1 +../api/testclient -c 17 unix:socket utah > log || exit 1 echo "search A2..." >>$LOG -../api/testclient -c 30 localhost:9901 the > log || exit 1 +../api/testclient -c 30 unix:socket the > log || exit 1 echo "search A3..." >>$LOG -../api/testclient -c 4 localhost:9901 deposits > log || exit 1 +../api/testclient -c 4 unix:socket deposits > log || exit 1 echo "search B1..." >>$LOG -../api/testclient -c 7 localhost:9901 "@and utah the" > log || exit 1 +../api/testclient -c 7 unix:socket "@and utah the" > log || exit 1 echo "search B2..." >>$LOG -../api/testclient -c 7 localhost:9901 "@and the utah" > log || exit 1 +../api/testclient -c 7 unix:socket "@and the utah" > log || exit 1 echo "search C1..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and the utah epicenter" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and the utah epicenter" > log || exit 1 echo "search C2..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and the epicenter utah" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and the epicenter utah" > log || exit 1 echo "search C3..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and utah the epicenter" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and utah the epicenter" > log || exit 1 echo "search C4..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and utah epicenter the" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and utah epicenter the" > log || exit 1 echo "search C5..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and epicenter the utah" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and epicenter the utah" > log || exit 1 echo "search C6..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @and epicenter utah the" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @and epicenter utah the" > log || exit 1 echo "search D1..." >>$LOG -../api/testclient -c 29 localhost:9901 "@and the of " > log || exit 1 +../api/testclient -c 29 unix:socket "@and the of " > log || exit 1 echo "search D2..." >>$LOG -../api/testclient -c 29 localhost:9901 "@and of the" > log || exit 1 +../api/testclient -c 29 unix:socket "@and of the" > log || exit 1 echo "search D3..." >>$LOG -../api/testclient -c 29 localhost:9901 "@and @and the of of" > log || exit 1 +../api/testclient -c 29 unix:socket "@and @and the of of" > log || exit 1 echo "search D4..." >>$LOG -../api/testclient -c 29 localhost:9901 "@and @and of the the" > log || exit 1 +../api/testclient -c 29 unix:socket "@and @and of the the" > log || exit 1 echo "search D5..." >>$LOG -../api/testclient -c 29 localhost:9901 "@and @and @and the of of the" > log || exit 1 +../api/testclient -c 29 unix:socket "@and @and @and the of of the" > log || exit 1 echo "search D6..." >>$LOG -../api/testclient -c 15 localhost:9901 '@and @and in the data' > log || exit 1 +../api/testclient -c 15 unix:socket '@and @and in the data' > log || exit 1 echo "search D7..." >>$LOG -../api/testclient -c 15 localhost:9901 '@and @and in data the' > log || exit 1 +../api/testclient -c 15 unix:socket '@and @and in data the' > log || exit 1 echo "search D8..." >>$LOG -../api/testclient -c 2 localhost:9901 "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1 +../api/testclient -c 2 unix:socket "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1 # This one failed at early fast-forwards echo "search E1..." >>$LOG -../api/testclient -c 40 localhost:9901 "@or the utah" > log || exit 1 +../api/testclient -c 40 unix:socket "@or the utah" > log || exit 1 echo "search E2..." >>$LOG -../api/testclient -c 40 localhost:9901 "@or utah the" > log || exit 1 +../api/testclient -c 40 unix:socket "@or utah the" > log || exit 1 echo "search E3..." >>$LOG -../api/testclient -c 42 localhost:9901 "@or deposits @or the utah" > log || exit 1 +../api/testclient -c 42 unix:socket "@or deposits @or the utah" > log || exit 1 echo "search E4..." >>$LOG -../api/testclient -c 2 localhost:9901 "@and deposits @or the utah" > log || exit 1 +../api/testclient -c 2 unix:socket "@and deposits @or the utah" > log || exit 1 echo "search E5..." >>$LOG -../api/testclient -c 2 localhost:9901 "@and @or the utah deposits" > log || exit 1 +../api/testclient -c 2 unix:socket "@and @or the utah deposits" > log || exit 1 echo "search F1..." >>$LOG -../api/testclient -c 23 localhost:9901 "@not the utah " > log || exit 1 +../api/testclient -c 23 unix:socket "@not the utah " > log || exit 1 echo "search F2..." >>$LOG -../api/testclient -c 10 localhost:9901 "@not utah the " > log || exit 1 +../api/testclient -c 10 unix:socket "@not utah the " > log || exit 1 echo "search F3..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and deposits @not utah the " > log || exit 1 +../api/testclient -c 1 unix:socket "@and deposits @not utah the " > log || exit 1 echo "search F4..." >>$LOG -../api/testclient -c 1 localhost:9901 "@and @not utah the deposits" > log || exit 1 +../api/testclient -c 1 unix:socket "@and @not utah the deposits" > log || exit 1 echo "stopping server..." >>$LOG diff --git a/test/gils/timing1.sh b/test/gils/timing1.sh index 311b5d8..286bed3 100755 --- a/test/gils/timing1.sh +++ b/test/gils/timing1.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: timing1.sh,v 1.11 2005-01-03 09:19:26 adam Exp $ +# $Id: timing1.sh,v 1.12 2005-01-03 12:08:04 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 @@ -15,7 +15,7 @@ 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 echo " starting server..." >>$LOG -../../index/zebrasrv -D -p z.pid -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 2 @@ -24,7 +24,7 @@ echo " update 1..." >>$LOG sleep 2 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 sleep 2 @@ -36,7 +36,7 @@ echo " indexing it..." >>$LOG sleep 2 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 sleep 2 @@ -49,7 +49,7 @@ echo " indexing it..." >>$LOG sleep 2 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: 9$" log >/dev/null || exit 1 @@ -63,7 +63,7 @@ echo " indexing it..." >>$LOG sleep 2 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: 10$" log >/dev/null || exit 1 @@ -77,7 +77,7 @@ echo " indexing it..." >>$LOG sleep 2 echo " search 5..." >>$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 @@ -92,7 +92,7 @@ echo " indexing it..." >>$LOG sleep 2 echo " search 6..." >>$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 @@ -108,7 +108,7 @@ echo " indexing it..." >>$LOG sleep 2 echo " search 7..." >>$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 @@ -122,7 +122,7 @@ echo " indexing it..." >>$LOG sleep 2 echo " search 8..." >>$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 diff --git a/test/gils/timing2.sh b/test/gils/timing2.sh index daa1b0a..5862b6e 100755 --- a/test/gils/timing2.sh +++ b/test/gils/timing2.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: timing2.sh,v 1.11 2005-01-03 09:19:26 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:-"."} @@ -15,7 +15,7 @@ rm -f $pp/records/esdd000[12].grs # these should not be here, will be created la 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 +../../index/zebrasrv -D -p z.pid -S -c $pp/zebra2.cfg -l $LOG unix:socket test -f z.pid || exit 1 sleep 1 touch timeref2 # make a later timestamp @@ -24,7 +24,7 @@ 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 @@ -35,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 @@ -47,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 @@ -58,7 +58,7 @@ 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