[Bug 18802] New: Circulation.t fails if finesMode != "Do not calculate"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Bug ID: 18802 Summary: Circulation.t fails if finesMode != "Do not calculate" Change sponsored?: --- Product: Koha Version: 17.05 Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17680 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Caused by bug 14390. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. # Failed test 'auto_too_much_oweing | OPACFineNoRenewalsBlockAutoRenew' # at t/db_dependent/Circulation.t line 679. t/db_dependent/Circulation.t .. 94/95 # Looks like you failed 1 test of 95. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|17.05 |master Depends on| |14390 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14390 [Bug 14390] Fine not updated from 'FU' to 'F' on renewal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64286&action=edit Bug 18802: Fix Circulation.t if finesMode ne 'production' If finesMode is not set to production, only 1 fine will be created (the renewal one will not). This is what assumes the tests. If set to 'production', the tests will fail because the fines will not be deleted (because of the DBIx::Class) warning. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. Test plan: prove t/db_dependent/Circulation.t should return green whatever the value of finesMode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |alexbuckley@catalyst.net.nz --- Comment #3 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Jonathan When running Circulation.t on a clean branch all 95 tests pass successfully. When running Circulation.t after applying this patch the tests are not successful because 97 tests are run when 96 are expected so can you please change the number of tests expected.
Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/97 subtests
Test Summary Report ------------------- Circulation.t (Wstat: 65280 Tests: 96 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 97 tests but ran 96.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64286|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64829 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64829&action=edit Bug 18802: Fix Circulation.t if finesMode ne 'production' If finesMode is not set to production, only 1 fine will be created (the renewal one will not). This is what assumes the tests. If set to 'production', the tests will fail because the fines will not be deleted (because of the DBIx::Class) warning. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. Test plan: prove t/db_dependent/Circulation.t should return green whatever the value of finesMode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Alex Buckley <alexbuckley@catalyst.net.nz> 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=18802 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64829|0 |1 is obsolete| | --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 65327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65327&action=edit Bug 18802: Fix Circulation.t if finesMode ne 'production' If finesMode is not set to production, only 1 fine will be created (the renewal one will not). This is what assumes the tests. If set to 'production', the tests will fail because the fines will not be deleted (because of the DBIx::Class) warning. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. Test plan: prove t/db_dependent/Circulation.t should return green whatever the value of finesMode Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- In one case you run 3 tests, in another you run 2 - this causes count errors depending on the values set. Wouldn't it be better to mock the pref and test both secnarios? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65327|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 65375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65375&action=edit Bug 18802: Fix Circulation.t if finesMode ne 'production' If finesMode is not set to production, only 1 fine will be created (the renewal one will not). This is what assumes the tests. If set to 'production', the tests will fail because the fines will not be deleted (because of the DBIx::Class) warning. Now we mock the value before charging. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. Test plan: prove t/db_dependent/Circulation.t should return green whatever the value of finesMode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=18802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65375|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 65488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65488&action=edit Bug 18802: Fix Circulation.t if finesMode ne 'production' If finesMode is not set to production, only 1 fine will be created (the renewal one will not). This is what assumes the tests. If set to 'production', the tests will fail because the fines will not be deleted (because of the DBIx::Class) warning. Now we mock the value before charging. prove t/db_dependent/Circulation.t t/db_dependent/Circulation.t .. 16/95 DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at t/db_dependent/Circulation.t line 491 t/db_dependent/Circulation.t .. 56/95 # Failed test 'Can auto renew, OPACFineNoRenewals=10, patron has 10' # at t/db_dependent/Circulation.t line 670. # got: 'auto_too_much_oweing' # expected: 'auto_renew' # Looks like you failed 1 test of 6. Test plan: prove t/db_dependent/Circulation.t should return green whatever the value of finesMode Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #6)
Wouldn't it be better to mock the pref and test both secnarios?
Test now only uses production. But as I understand, the focus of this test is on the renewal side, not the fines. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19009 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19009 [Bug 19009] Circulation.t is still failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Master |Pushed to Stable --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Doesn't apply to 16.11.x, please rebase if you want it included. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18802 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org