[Bug 40962] New: t/db_dependent/OAI/Server.t is failing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Bug ID: 40962 Summary: t/db_dependent/OAI/Server.t is failing Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org 23:30:10 koha-1 | # Failed test 'ListRecords marcxml' 23:30:10 koha-1 | # at t/db_dependent/OAI/Server.t line 187. 23:30:10 koha-1 | # Compared reftype($data->{"ListRecords"}{"record"}[0]{"metadata"}{"record"}{"datafield"}) 23:30:10 koha-1 | # got : 'HASH' 23:30:10 koha-1 | # expect : 'ARRAY' 23:30:10 koha-1 | # PARAM:--- 23:30:10 koha-1 | # metadataPrefix: marcxml 23:30:10 koha-1 | # verb: ListRecords 23:30:10 koha-1 | # EXPECTED:--- 23:30:10 koha-1 | # ListRecords: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3993 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # code: a 23:30:10 koha-1 | # content: Title 0 23:30:10 koha-1 | # tag: '245' 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3993' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2292' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3994 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # code: a 23:30:10 koha-1 | # content: Title 1 23:30:10 koha-1 | # tag: '245' 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3994' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2293' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3995 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # code: a 23:30:10 koha-1 | # content: Title 2 23:30:10 koha-1 | # tag: '245' 23:30:10 koha-1 | # - ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3995' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2294' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # resumptionToken: 23:30:10 koha-1 | # content: !!perl/hash:Test::Deep::Regexp 23:30:10 koha-1 | # val: !!perl/regexp (?^u:^marcxml/3////0/0/\d+$) 23:30:10 koha-1 | # cursor: 3 23:30:10 koha-1 | # request: http://localhost 23:30:10 koha-1 | # xmlns: http://www.openarchives.org/OAI/2.0/ 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd 23:30:10 koha-1 | # RESPONSE:--- 23:30:10 koha-1 | # ListRecords: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3993 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3993' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2292' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3994 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3994' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2293' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # - header: 23:30:10 koha-1 | # datestamp: 2025-10-06T21:30:08Z 23:30:10 koha-1 | # identifier: TEST:3995 23:30:10 koha-1 | # metadata: 23:30:10 koha-1 | # record: 23:30:10 koha-1 | # controlfield: 23:30:10 koha-1 | # - content: '20251006213008.0' 23:30:10 koha-1 | # tag: '005' 23:30:10 koha-1 | # - content: ' lng' 23:30:10 koha-1 | # tag: '008' 23:30:10 koha-1 | # datafield: 23:30:10 koha-1 | # ind1: ' ' 23:30:10 koha-1 | # ind2: ' ' 23:30:10 koha-1 | # subfield: 23:30:10 koha-1 | # - code: c 23:30:10 koha-1 | # content: '3995' 23:30:10 koha-1 | # - code: d 23:30:10 koha-1 | # content: '2294' 23:30:10 koha-1 | # tag: '999' 23:30:10 koha-1 | # leader: 00178 a2200085 4500 23:30:10 koha-1 | # xmlns: http://www.loc.gov/MARC21/slim 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd 23:30:10 koha-1 | # resumptionToken: 23:30:10 koha-1 | # content: marcxml/3////0/0/3996 23:30:10 koha-1 | # cursor: '3' 23:30:10 koha-1 | # request: http://localhost 23:30:10 koha-1 | # xmlns: http://www.openarchives.org/OAI/2.0/ 23:30:10 koha-1 | # xmlns:xsi: http://www.w3.org/2001/XMLSchema-instance 23:30:10 koha-1 | # xsi:schemaLocation: http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd And other similar failures. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Koha_Main/3384 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Koha_Main_D11/1074 on Docker_11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Koha_Main_U24/469 on Docker_14. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40265 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40265 [Bug 40265] t/db_dependent/OAI/Server.t is failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |martin.renvoize@openfifth.c | |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195746&action=edit Bug 40962: Fix race condition in OAI Server test for OpacHiddenItems The 'Tests for OpacHiddenItems' subtest captured Perl's wall clock time *after* calling build_sample_item(), then used that timestamp as both the expected OAI datestamp and the 'from' filter. On slow systems the INSERT can straddle a second boundary, so MySQL records T:40 while dt_from_string returns T:41, causing noRecordsMatch on the ListRecords tests and a datestamp mismatch on the GetRecord tests. Fix by calling $item->discard_changes and deriving $utc_timestamp from the timestamp MySQL actually assigned, matching the pattern already used in the Bug 19725 subtest in the same file. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Self signoff as RM Assistant to test on Jenkins -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Thanks for all the hard work! Pushed to main for the next 26.05.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Bug 40962 depends on bug 40265, which changed state. Bug 40265 Summary: t/db_dependent/OAI/Server.t is failing randomly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40265 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #7 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195750 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195750&action=edit Bug 40962: Apply ViewPolicy filter consistently in OAI Server test setup The test built @marcxml and @oaidc expected data using metadata_record() with no parameters, while the OAI server's get_biblio_marcxml() always calls metadata_record({ interface => 'opac' }), which applies the ViewPolicy filter. On nodes where the MARC framework has non-default hidden values (or a stale cache entry), ViewPolicy strips fields like 245, causing the expected and actual responses to diverge. Fix by using interface => 'opac' when building the expected data, and deriving dc:title from the filtered MARC record rather than hardcoding it, so both sides of every comparison go through the same code path. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40962 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org