From c28f63a8eb7756a4a4307224349be5ff2baa4821 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Wed, 9 Oct 2019 14:15:39 +0300 Subject: [PATCH] Bug 13937: (QA follow-up) Fix tests. Checking result set size is enough to verify that proper results were returned. The check for non-existing record could have caused a range error depending of library versions. --- t/db_dependent/Koha/Z3950Responder/GenericSession.t | 4 +--- t/db_dependent/Koha/Z3950Responder/ZebraSession.t | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Koha/Z3950Responder/GenericSession.t b/t/db_dependent/Koha/Z3950Responder/GenericSession.t index 1dcf69fa60..b8d9013826 100644 --- a/t/db_dependent/Koha/Z3950Responder/GenericSession.t +++ b/t/db_dependent/Koha/Z3950Responder/GenericSession.t @@ -20,7 +20,7 @@ our $child; subtest 'test_search' => sub { - plan tests => 20; + plan tests => 19; t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch'); @@ -114,8 +114,6 @@ subtest 'test_search' => sub { ok($returned2, 'Record 2 returned as MARCXML'); is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); - is($rs->record(2), undef, 'Record 3 does not exist'); - # SRU protocol tests my $base = 'http://localhost:42111'; my $ns = 'http://docs.oasis-open.org/ns/search-ws/sruResponse'; diff --git a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t b/t/db_dependent/Koha/Z3950Responder/ZebraSession.t index d61fcc0ee3..8e39b0b0ca 100644 --- a/t/db_dependent/Koha/Z3950Responder/ZebraSession.t +++ b/t/db_dependent/Koha/Z3950Responder/ZebraSession.t @@ -18,7 +18,7 @@ our $child; subtest 'test_search' => sub { - plan tests => 9; + plan tests => 8; t::lib::Mocks::mock_preference('SearchEngine', 'Zebra'); @@ -114,8 +114,6 @@ subtest 'test_search' => sub { ok ($returned2, 'Record 2 returned as MARCXML'); is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); - is($rs->record(2), undef, 'Record 3 does not exist'); - cleanup(); }; -- 2.17.1