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 <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2026-07-08 11:47:07 -04:00 committed by Lucas Gass
parent 810ff07321
commit 7162eed0f7
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 4 additions and 0 deletions

View File

@ -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;