syspref ElasticsearchIndexStatus_mydb is created in DB and persists after the tests finished.
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
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>
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>
Nice work everyone! Pushed to main for 26.05