https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44321 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 212778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212778&action=edit Bug 44321: Delete the imported records in t::lib::Mocks::Zebra::clean_records clean_records did not delete anything: - it used a new Test::WWW::Mechanize agent that was not logged in, so every request returned the login page (and get_ok passed), - it deleted the biblio with a GET op=delete, which addbiblio.pl ignores since the CSRF changes (only POST op=cud-delete deletes), - it only handled the first record of the batch. The records imported by t/db_dependent/www/search_utf8.t were then left in the catalog and in the search index, and the searches of the next runs found them. Only the first run on a fresh database really tested that the newly imported records were indexed. Reuse the logged in agent from load_records_ui, delete every imported biblio with a POST op=cud-delete and test that the batch is cleaned and the biblios are deleted. Test plan: 1. Note the number of biblios: SELECT COUNT(*) FROM biblio; 2. prove -v t/db_dependent/www/search_utf8.t (KOHA_INTRANET_URL and KOHA_OPAC_URL must be set) 3. Without the patch the number of biblios increases by 6 at each run, with the patch it does not change and the tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.