[Bug 39700] New: Fix test case t/db_dependent/Authority/Merge.t broken in 34739
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Bug ID: 39700 Summary: Fix test case t/db_dependent/Authority/Merge.t broken in 34739 Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: domm@plix.at QA Contact: testopia@bugs.koha-community.org Bug 34739 adds some new tests to t/db_dependent/Authority/Merge.t, which work when run alone. But when running the whole test suite, some weird fails show up. This patch fixes that bug in the test suite The new test case calls AddBiblio. And AddBiblio returns ($biblionumber, $biblioitemnumber). But the test calls it like this: my $biblionumber = AddBiblio; AddBiblio returns a list, but the calling code only stores a single value, so it get's the last value, i.e. the biblioitemnumber.  Now, when running the test alone, the DB sequences for biblio and biblioitem are in sync and both return the same value so the test works (by accident) But some tests add biblios with multiple items (or biblios without items), thus the sequences are no longer in sync and when the test tries to load a biblio via a biblioitemid, it finds nothing, which causes the fail bad: my $biblionumber = AddBiblio( $biblio_record, '', { skip_record_index => 1 } ); ok-ish: my ($biblionumber) = AddBiblio( $biblio_record, '', { skip_record_index => 1 } ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Depends on| |34739 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34739 [Bug 34739] Linked biblios should not be merged (updated) when changes to an authority don't change the authorized heading -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 --- Comment #1 from Thomas Klausner <domm@plix.at> --- Created attachment 181309 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181309&action=edit Bug 39700: Fix test case t/db_dependent/Authority/Merge.t broken in 34739 Bug 34739 added some test cases to t/db_dependent/Authority/Merge.t which work when run as a standlone test, but fail when run with some other tests. This patch fixes the test. Test Plan: * Start KTD and enter a shell * Run only the single test: prove t/db_dependent/Authority/Merge.t * You should get "All test successful" * Now run two tests: prove t/db_dependent/Biblio.t t/db_dependent/Authority/Merge.t * You will get a FAIL: t/db_dependent/Authority/Merge.t (Wstat: 256 (exited 1) Tests: 14 Failed: 1) Failed test: 13 * Apply the patch * Again run two tests: prove t/db_dependent/Biblio.t t/db_dependent/Authority/Merge.t * You should get "All test successful" Sponsored by: HKS3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Thomas Klausner <domm@plix.at> 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=39700 Roman Dolny <roman.dolny@jezuici.pl> 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=39700 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181309|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 181310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181310&action=edit Bug 39700: Fix test case t/db_dependent/Authority/Merge.t broken in 34739 Bug 34739 added some test cases to t/db_dependent/Authority/Merge.t which work when run as a standlone test, but fail when run with some other tests. This patch fixes the test. Test Plan: * Start KTD and enter a shell * Run only the single test: prove t/db_dependent/Authority/Merge.t * You should get "All test successful" * Now run two tests: prove t/db_dependent/Biblio.t t/db_dependent/Authority/Merge.t * You will get a FAIL: t/db_dependent/Authority/Merge.t (Wstat: 256 (exited 1) Tests: 14 Failed: 1) Failed test: 13 * Apply the patch * Again run two tests: prove t/db_dependent/Biblio.t t/db_dependent/Authority/Merge.t * You should get "All test successful" Sponsored by: HKS3 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Great detective work, thanks a lot, Thomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Picking this out of the queue :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.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=39700 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 34739 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39700 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |david@davidnind.com Status|Needs documenting |RESOLVED --- Comment #7 from David Nind <david@davidnind.com> --- Test suite changes, 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