Bugzilla – Attachment 192013 Details for
Bug 41710
SearchEngine/Elasticsearch/Search.t does not rollback properly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn
6fc670e.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2026-01-26 10:14:15 UTC
(
hide
)
Description:
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-26 10:14:15 UTC
Size:
1.88 KB
patch
obsolete
>From 6fc670efdd3b2704924a754f6f5ba9c61dda72b9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Jan 2026 11:09:33 +0100 >Subject: [PATCH] Bug 41710: Correctly run tests > SearchEngine/Elasticsearch/Search.t in a txn > >Test plan: >0. Apply this patch and startup ktd with elastic (e.g `--search-engine es7`) >1. prove t/db_dependent/check_sysprefs.t >=> pass >2. DB cli> SELECT COUNT(*) FROM systempreferences; >3. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >4. DB cli> SELECT COUNT(*) FROM systempreferences; >=> No change, still the same number of sysprefs >5. prove t/db_dependent/check_sysprefs.t >=> pass >6. Revert this patch or checkout main >7. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >8. DB cli> SELECT COUNT(*) FROM systempreferences; >=> One syspref crated (ElasticsearchIndexStatus_mydb) >9. prove t/db_dependent/check_sysprefs.t >=> fail >--- > t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >index 42d2efd588e..b1cbc3ff78d 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >@@ -26,6 +26,9 @@ use Koha::SearchEngine::Elasticsearch::QueryBuilder; > use Koha::SearchEngine::Elasticsearch::Indexer; > use Koha::SearchFields; > >+my $schema = Koha::Database->new()->schema(); >+$schema->storage->txn_begin; >+ > my $se = Test::MockModule->new('Koha::SearchEngine::Elasticsearch'); > $se->mock( > 'get_elasticsearch_mappings', >@@ -123,7 +126,6 @@ SKIP: { > subtest "_convert_facets" => sub { > plan tests => 5; > >- my $schema = Koha::Database->new()->schema(); > $schema->storage->txn_begin; > my $builder = t::lib::TestBuilder->new; > >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41710
:
192013
|
192061
|
192065