[Bug 41012] New: ILSDI_Services.t failing on U22
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Bug ID: 41012 Summary: ILSDI_Services.t failing on U22 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 Koha_Main_U22/2183 18:58:19 koha-1 | # Failed test 'Title hidden in output as expected' 18:58:19 koha-1 | # at t/db_dependent/ILSDI_Services.t line 874. 18:58:19 koha-1 | # got: '1' 18:58:19 koha-1 | # expected: '0' 18:58:19 koha-1 | # Looks like you failed 1 test of 11. 18:58:19 koha-1 | 18:58:19 koha-1 | # Failed test 'GetRecords' 18:58:19 koha-1 | # at t/db_dependent/ILSDI_Services.t line 923. 866 my $cgi = CGI->new; 867 $cgi->param( service => 'GetRecords' ); 868 $cgi->param( id => $item->biblionumber ); 869 870 my $reply = C4::ILSDI::Services::GetRecords($cgi); 871 872 my $opac_marcxml = $reply->{record}->[0]->{marcxml}; 873 my @title_matches = ( $opac_marcxml =~ m/This is an awesome title/g ); 874 is( scalar @title_matches, 0, 'Title hidden in output as expected' ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ILSDI_Services.t failing on |ILSDI_Services.t is failing |U22 |randomly --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- It's passing locally on U22. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40622 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40622 [Bug 40622] Bug 38233 not properly applied to 24.11.x, 25.05.x, and main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- I don't understand why the test passes. The marc subfield structure cache is not flushed after we hide the title. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Jonathan Druart <jonathan.druart@gmail.com> 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=41012 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187899 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187899&action=edit Bug 41012: (bug 40622 follow-up) Clear the MSS cache For some reasons t/db_dependent/ILSDI_Services.t fails if run after t/db_dependent/api/v1/biblios.t When we modify the MARC subfield structure from the tests we must flush the cache. Actually I don't understand why the tests are even passing. I have not tracked down why it only fails when run after t/db_dependent/api/v1/biblios.t Test plan: 0. Do not apply this patch 1. prove t/db_dependent/api/v1/biblios.t t/db_dependent/ILSDI_Services.t It fails # Failed test 'Title hidden in output as expected' # at t/db_dependent/ILSDI_Services.t line 874. # got: '1' # expected: '0' 2. Apply this patch, repeat 1. => it's green! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #2)
I don't understand why the test passes. The marc subfield structure cache is not flushed after we hide the title.
That's a good point. In KTD, if I run "memcdump -s memcached:11211", I do see a couple of keys... koha_kohadev::MarcSubfieldStructure- koha_kohadev::MarcSubfieldStructure-BKS I wonder if in a fresh KTD if the cache gets populated on the first run of t/db_dependent/ILSDI_Services.t whereas on the CI server it's already been pre-populated I guess I have an idea on how to test that... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #4)
In KTD, if I run "memcdump -s memcached:11211", I do see a couple of keys... koha_kohadev::MarcSubfieldStructure- koha_kohadev::MarcSubfieldStructure-BKS
I wonder if in a fresh KTD if the cache gets populated on the first run of t/db_dependent/ILSDI_Services.t whereas on the CI server it's already been pre-populated I guess I have an idea on how to test that...
Admittedly memcdump isn't the best tool. I've found it doesn't already report everything. But I just tried to add a MARC record in Default Framework and BKS framework via the webapp to pre-prime the caches... Which gave me these cache keys: koha_kohadev::MarcSubfieldStructure- koha_kohadev::MarcStructure-1-BKS koha_kohadev::MarcStructure-1- After running t/db_dependent/ILSDI_Services.t, I get the following: koha_kohadev::MarcStructure-0- koha_kohadev::MarcStructure-1- koha_kohadev::MarcStructure-1-BKS koha_kohadev::MarcSubfieldStructure- In theory the bibliographic framework used should be the default one... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from David Cook <dcook@prosentient.com.au> --- So I don't think your patch will help. And the reason is that you can remove the following lines and the test still passes: - my $framework_f245a = Koha::MarcSubfieldStructures->find( - { frameworkcode => $biblio->frameworkcode, tagfield => "245", tagsubfield => "a" } ); - $framework_f245a->hidden('8'); - $framework_f245a->store(); So there's something else going on here... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #6)
So I don't think your patch will help.
And the reason is that you can remove the following lines and the test still passes:
- my $framework_f245a = Koha::MarcSubfieldStructures->find( - { frameworkcode => $biblio->frameworkcode, tagfield => "245", tagsubfield => "a" } ); - $framework_f245a->hidden('8'); - $framework_f245a->store();
So there's something else going on here...
Actually, if I remove those lines, and then re-run it, it will fail... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- I don't care to dig into this one more, so I think I'll just sign off the patch, because in theory it should work. We should probably have more cache clearing in the unit tests really... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187899|0 |1 is obsolete| | --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Created attachment 187900 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187900&action=edit Bug 41012: (bug 40622 follow-up) Clear the MSS cache For some reasons t/db_dependent/ILSDI_Services.t fails if run after t/db_dependent/api/v1/biblios.t When we modify the MARC subfield structure from the tests we must flush the cache. Actually I don't understand why the tests are even passing. I have not tracked down why it only fails when run after t/db_dependent/api/v1/biblios.t Test plan: 0. Do not apply this patch 1. prove t/db_dependent/api/v1/biblios.t t/db_dependent/ILSDI_Services.t It fails # Failed test 'Title hidden in output as expected' # at t/db_dependent/ILSDI_Services.t line 874. # got: '1' # expected: '0' 2. Apply this patch, repeat 1. => it's green! Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #7)
(In reply to David Cook from comment #6)
So I don't think your patch will help.
And the reason is that you can remove the following lines and the test still passes:
- my $framework_f245a = Koha::MarcSubfieldStructures->find( - { frameworkcode => $biblio->frameworkcode, tagfield => "245", tagsubfield => "a" } ); - $framework_f245a->hidden('8'); - $framework_f245a->store();
So there's something else going on here...
Actually, if I remove those lines, and then re-run it, it will fail...
Sorry I mean... if I remove those lines, clear the cache, and re-run it, it will fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 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=41012 Nick Clemens (kidclamp) <nick@bywatersolutions.com> 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=41012 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187900|0 |1 is obsolete| | --- Comment #11 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188028&action=edit Bug 41012: (bug 40622 follow-up) Clear the MSS cache For some reasons t/db_dependent/ILSDI_Services.t fails if run after t/db_dependent/api/v1/biblios.t When we modify the MARC subfield structure from the tests we must flush the cache. Actually I don't understand why the tests are even passing. I have not tracked down why it only fails when run after t/db_dependent/api/v1/biblios.t Test plan: 0. Do not apply this patch 1. prove t/db_dependent/api/v1/biblios.t t/db_dependent/ILSDI_Services.t It fails # Failed test 'Title hidden in output as expected' # at t/db_dependent/ILSDI_Services.t line 874. # got: '1' # expected: '0' 2. Apply this patch, repeat 1. => it's green! Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.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=41012 --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.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=41012 --- Comment #13 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable Version(s)|25.11.00,25.05.05 |25.11.00,25.05.05,24.11.11 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41012 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #16 from David Nind <david@davidnind.com> --- Test suite related, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org