From 506f6ed2a25e76c2d4d2eafc8d2c420699e703fd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 8 Jul 2026 11:47:07 -0400 Subject: [PATCH] Bug 43034: Fix t/db_dependent/Koha/EDI.t failure when SearchEngine is Elasticsearch Bug 21820 made the Zebra queue update conditional on the new ElasticsearchEnableZebraQueue system preference, which defaults to off. The 'basic_quote_processing' subtest in t/db_dependent/Koha/EDI.t counts the log lines process_quote emits, and two of those are the "specialUpdate biblioserver" traces that ModZebra logs only when the Zebra queue path runs. When the SearchEngine preference is set to Elasticsearch, that path no longer runs by default, so the subtest now records 6 log lines instead of 8 and fails: # Failed test '8 log lines recorded for passed quote file' # got: '6' # expected: '8' # Failed test 'Trace recorded biblioserver index' Test Plan: 1) Set the SearchEngine system preference to 'Elasticsearch' 2) prove t/db_dependent/Koha/EDI.t 3) Note the basic_quote_processing subtest fails with "got: '6', expected: '8'" 4) Apply this patch 5) prove t/db_dependent/Koha/EDI.t 6) Note the tests pass! Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim --- t/db_dependent/Koha/EDI.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/db_dependent/Koha/EDI.t b/t/db_dependent/Koha/EDI.t index 4cf12e8888..84c6787cdf 100755 --- a/t/db_dependent/Koha/EDI.t +++ b/t/db_dependent/Koha/EDI.t @@ -53,6 +53,10 @@ subtest 'process_quote' => sub { ); t::lib::Mocks::mock_preference( 'CataloguingLog', 0 ); + # The log-line count below includes the Zebra 'specialUpdate biblioserver' traces, which + # Bug 21820 made conditional on ElasticsearchEnableZebraQueue when using Elasticsearch + t::lib::Mocks::mock_preference( 'ElasticsearchEnableZebraQueue', 1 ); + # Test 1: Basic Quote Processing subtest 'basic_quote_processing' => sub { plan tests => 27;