From 113f9b0156b53993e03e2c9692832e4ac6d40693 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 17 Dec 2013 15:05:57 +0100 Subject: [PATCH] Better cluster test Unfortunately needs YAZ 5.0.7. So, test_cluster.sh is not enabled by default yet. --- test/pz.1.xml | 14 ---------- test/pz.2.xml | 14 ---------- test/pz.3.xml | 6 ----- test/pz.4.xml | 14 ---------- test/run_pazpar2.sh | 8 +++--- test/test_cluster.cfg | 49 +++++++++++++++++++++++++++++++++++ test/test_cluster.pz.1.xml | 14 ++++++++++ test/test_cluster.pz.2.xml | 14 ++++++++++ test/test_cluster.pz.3.xml | 6 +++++ test/test_cluster.pz.4.xml | 14 ++++++++++ test/test_cluster.urls | 6 +++++ test/test_cluster_3.res | 30 ++++++---------------- test/test_cluster_4.res | 2 ++ test/test_cluster_5.res | 54 +++++++++++++++++++++++++++++++++++++++ test/test_cluster_6.res | 2 ++ test/test_cluster_7.res | 54 +++++++++++++++++++++++++++++++++++++++ test/test_cluster_8.res | 2 ++ test/test_cluster_9.res | 61 ++++++++++++++++++++++++++++++++++++++++++++ 18 files changed, 290 insertions(+), 74 deletions(-) delete mode 100644 test/pz.1.xml delete mode 100644 test/pz.2.xml delete mode 100644 test/pz.3.xml delete mode 100644 test/pz.4.xml create mode 100644 test/test_cluster.cfg create mode 100644 test/test_cluster.pz.1.xml create mode 100644 test/test_cluster.pz.2.xml create mode 100644 test/test_cluster.pz.3.xml create mode 100644 test/test_cluster.pz.4.xml create mode 100644 test/test_cluster_4.res create mode 100644 test/test_cluster_5.res create mode 100644 test/test_cluster_6.res create mode 100644 test/test_cluster_7.res create mode 100644 test/test_cluster_8.res create mode 100644 test/test_cluster_9.res diff --git a/test/pz.1.xml b/test/pz.1.xml deleted file mode 100644 index a59aaa0..0000000 --- a/test/pz.1.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Jack Collins - book - 1995 - How to program a computer vol1 - - - Jack Collins - book - 1995 - How to program a computer vol2 - - diff --git a/test/pz.2.xml b/test/pz.2.xml deleted file mode 100644 index f899c96..0000000 --- a/test/pz.2.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Jack Collins - book - 1995 - How to program a computer vol3 - - - Jack Collins - book - 1995 - How to program a computer vol2 - - diff --git a/test/pz.3.xml b/test/pz.3.xml deleted file mode 100644 index ffdf34e..0000000 --- a/test/pz.3.xml +++ /dev/null @@ -1,6 +0,0 @@ - - Jack Collins - book - 1995 - How to program a computer vol1 - diff --git a/test/pz.4.xml b/test/pz.4.xml deleted file mode 100644 index f87b885..0000000 --- a/test/pz.4.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Jack Collins - book - 1995 - How to program a computer vol1 - - - Jack Collins - book - 1995 - How to program a computer vol4 - - diff --git a/test/run_pazpar2.sh b/test/run_pazpar2.sh index de6c021..49ae5e8 100755 --- a/test/run_pazpar2.sh +++ b/test/run_pazpar2.sh @@ -9,9 +9,6 @@ # srcdir might be set by make srcdir=${srcdir:-"."} -YAZ_ZTEST_XML_FETCH=${srcdir}/ -export YAZ_ZTEST_XML_FETCH - # terminate pazpar2 if test takes more than this (in seconds) WAIT=120 @@ -87,6 +84,9 @@ if test "$icu" = "true"; then fi if test "$ztest" = "true" ; then + YAZ_ZTEST_XML_FETCH=${srcdir}/${PREFIX}. + export YAZ_ZTEST_XML_FETCH + oIFS=$IFS IFS=: F='' @@ -121,7 +121,7 @@ if test "$ztest" = "true" ; then fi rm -f ztest.pid rm -f ${PREFIX}_ztest.log - $F -l ${PREFIX}_ztest.log -p ztest.pid -D tcp:localhost:9999 + $F -l ${PREFIX}_ztest.log -a ztest_apdu.log -p ztest.pid -D tcp:localhost:9999 sleep 1 if test ! -f ztest.pid; then echo "yaz-ztest could not be started" diff --git a/test/test_cluster.cfg b/test/test_cluster.cfg new file mode 100644 index 0000000..6b99b2f --- /dev/null +++ b/test/test_cluster.cfg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/test_cluster.pz.1.xml b/test/test_cluster.pz.1.xml new file mode 100644 index 0000000..a59aaa0 --- /dev/null +++ b/test/test_cluster.pz.1.xml @@ -0,0 +1,14 @@ + + + Jack Collins + book + 1995 + How to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol2 + + diff --git a/test/test_cluster.pz.2.xml b/test/test_cluster.pz.2.xml new file mode 100644 index 0000000..87c4eef --- /dev/null +++ b/test/test_cluster.pz.2.xml @@ -0,0 +1,14 @@ + + + Jack Collins + book + 1995 + How to program a computer vol3 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + diff --git a/test/test_cluster.pz.3.xml b/test/test_cluster.pz.3.xml new file mode 100644 index 0000000..ffdf34e --- /dev/null +++ b/test/test_cluster.pz.3.xml @@ -0,0 +1,6 @@ + + Jack Collins + book + 1995 + How to program a computer vol1 + diff --git a/test/test_cluster.pz.4.xml b/test/test_cluster.pz.4.xml new file mode 100644 index 0000000..f87b885 --- /dev/null +++ b/test/test_cluster.pz.4.xml @@ -0,0 +1,14 @@ + + + Jack Collins + book + 1995 + How to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + diff --git a/test/test_cluster.urls b/test/test_cluster.urls index 13fc5cf..6c772d5 100755 --- a/test/test_cluster.urls +++ b/test/test_cluster.urls @@ -1,3 +1,9 @@ http://localhost:9763/search.pz2?command=init +http://localhost:9763/search.pz2?session=1&command=search&query=1 +1 http://localhost:9763/search.pz2?session=1&command=show&block=1 +http://localhost:9763/search.pz2?session=1&command=search&query=2 +1 http://localhost:9763/search.pz2?session=1&command=show&block=1 +http://localhost:9763/search.pz2?session=1&command=search&query=3 +1 http://localhost:9763/search.pz2?session=1&command=show&block=1 http://localhost:9763/search.pz2?session=1&command=search&query=4 1 http://localhost:9763/search.pz2?session=1&command=show&block=1 diff --git a/test/test_cluster_3.res b/test/test_cluster_3.res index 80cf35c..2f88c6a 100644 --- a/test/test_cluster_3.res +++ b/test/test_cluster_3.res @@ -2,44 +2,30 @@ OK 0 1 -23 +1 0 1 Jack Collins book 1995 - How to program a computer vol3 + How to program a computer vol1 - Jack Collins - book - 1995 - How to program a computer vol3 - - - Jack Collins - book - 1995 - How to program a computer vol2 - - + name="ztest" checksum="1993510496"> Jack Collins book 1995 How to program a computer vol1 + name="ztest" checksum="1993510496"> Jack Collins book 1995 - How to program a computer vol4 + How to program a computer vol2 - 4 - 89257 - content: author jack collins medium book title how to program a computer vol + 2 + 0 + content: author jack collins medium book title how to program a computer vol1 \ No newline at end of file diff --git a/test/test_cluster_4.res b/test/test_cluster_4.res new file mode 100644 index 0000000..ab63fe6 --- /dev/null +++ b/test/test_cluster_4.res @@ -0,0 +1,2 @@ + +OK \ No newline at end of file diff --git a/test/test_cluster_5.res b/test/test_cluster_5.res new file mode 100644 index 0000000..6da9672 --- /dev/null +++ b/test/test_cluster_5.res @@ -0,0 +1,54 @@ + +OK +0 +2 +2 +0 +2 + + Jack Collins + book + 1995 + How to program a computer vol1 + + Jack Collins + book + 1995 + How to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol2 + + 2 + 0 + content: author jack collins medium book title how to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol3 + + Jack Collins + book + 1995 + How to program a computer vol3 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + 2 + 0 + content: author jack collins medium book title how to program a computer vol3 + + \ No newline at end of file diff --git a/test/test_cluster_6.res b/test/test_cluster_6.res new file mode 100644 index 0000000..ab63fe6 --- /dev/null +++ b/test/test_cluster_6.res @@ -0,0 +1,2 @@ + +OK \ No newline at end of file diff --git a/test/test_cluster_7.res b/test/test_cluster_7.res new file mode 100644 index 0000000..d616b21 --- /dev/null +++ b/test/test_cluster_7.res @@ -0,0 +1,54 @@ + +OK +0 +2 +3 +0 +2 + + Jack Collins + book + 1995 + How to program a computer vol1 + + Jack Collins + book + 1995 + How to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol2 + + 2 + 0 + content: author jack collins medium book title how to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol3 + + Jack Collins + book + 1995 + How to program a computer vol3 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + 2 + 0 + content: author jack collins medium book title how to program a computer vol3 + + \ No newline at end of file diff --git a/test/test_cluster_8.res b/test/test_cluster_8.res new file mode 100644 index 0000000..ab63fe6 --- /dev/null +++ b/test/test_cluster_8.res @@ -0,0 +1,2 @@ + +OK \ No newline at end of file diff --git a/test/test_cluster_9.res b/test/test_cluster_9.res new file mode 100644 index 0000000..0b6bbcc --- /dev/null +++ b/test/test_cluster_9.res @@ -0,0 +1,61 @@ + +OK +0 +2 +4 +0 +2 + + Jack Collins + book + 1995 + How to program a computer vol1 + + Jack Collins + book + 1995 + How to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol2 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + 3 + 0 + content: author jack collins medium book title how to program a computer vol1 + + + Jack Collins + book + 1995 + How to program a computer vol3 + + Jack Collins + book + 1995 + How to program a computer vol3 + + + Jack Collins + book + 1995 + How to program a computer vol4 + + 2 + 0 + content: author jack collins medium book title how to program a computer vol3 + + \ No newline at end of file -- 1.7.10.4