Bug 41710 - SearchEngine/Elasticsearch/Search.t does not rollback properly
Summary: SearchEngine/Elasticsearch/Search.t does not rollback properly
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Lucas Gass (lukeg)
URL:
Keywords: RM_priority
Depends on:
Blocks:
 
Reported: 2026-01-26 10:09 UTC by Jonathan Druart
Modified: 2026-01-26 21:38 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn (1.88 KB, patch)
2026-01-26 10:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn (1.93 KB, patch)
2026-01-26 19:49 UTC, David Nind
Details | Diff | Splinter Review
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn (1.98 KB, patch)
2026-01-26 21:26 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2026-01-26 10:09:19 UTC
syspref ElasticsearchIndexStatus_mydb is created in DB and persists after the tests finished.
Comment 1 Jonathan Druart 2026-01-26 10:14:15 UTC
Created attachment 192013 [details] [review]
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
Comment 2 David Nind 2026-01-26 19:49:51 UTC
Created attachment 192061 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Lucas Gass (lukeg) 2026-01-26 21:26:44 UTC
Created attachment 192065 [details] [review]
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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2026-01-26 21:38:48 UTC
Nice work everyone!

Pushed to main for 26.05