https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42156 --- Comment #20 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197874&action=edit Bug 42156: (QA follow-up) Expand unit tests for recovery and skip paths The original test only verified that a warning was emitted when a corrupt authority record was encountered; it did not assert that get_matches returned the recovered record, that an unrecoverable record was dropped, or that a stale index pointing at a deleted authid was handled. This patch turns the 'get_matches bad record test' subtest into a full exercise of the three code paths introduced on this bug: 1 - Recoverable: a record with stray non-XML characters is repaired by record_strip_nonxml and returned in the match list with the expected authid. 2 - Unrecoverable: record_strip_nonxml is mocked to return undef; the parse warning still fires but the record is silently dropped from the result set (no die). 3 - Stale search index: search_auth_compat returns an authid that does not exist in auth_header; get_matches no longer dies and returns an empty result. The MarcMatcher fixture is given an explicit threshold of 1 so the 1000 score on the authority matchpoint always passes and matches are returned. Test plan: 1 - prove t/db_dependent/Matcher.t 2 - All subtests pass including the expanded 'get_matches bad record test'. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.