[Bug 10495] New: t/db_dependent/HoldsQueue.t can fail unnecessarily
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Bug ID: 10495 Summary: t/db_dependent/HoldsQueue.t can fail unnecessarily Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: gmcharlt@gmail.com Reporter: gmcharlt@gmail.com The test case assumes that the AutomaticItemReturn system preference is off initially; if it starts off on, two of the tests fail: not ok 4 - take from homebranch (don't use cost matrix) holding branch # Failed test 'take from homebranch (don't use cost matrix) holding branch' # at t/db_dependent/HoldsQueue.t line 162. # got: 'FFL' # expected: 'CPL' [snip] ok 5 - take from homebranch (use cost matrix) pick up branch not ok 6 - take from homebranch (use cost matrix) holding branch # Failed test 'take from homebranch (use cost matrix) holding branch' # at t/db_dependent/HoldsQueue.t line 162. # got: 'UPL' # expected: 'CPL' [snip] Test Summary Report ------------------- t/db_dependent/HoldsQueue.t (Wstat: 512 Tests: 18 Failed: 2) Failed tests: 4, 6 Non-zero exit status: 2 The test case should explicitly turn off the AutomaticItemReturn syspref when it starts. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 --- Comment #1 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 19159 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19159&action=edit bug 10495: set precondition for HoldsQueue test t/db_dependent/HoldsQueue.t assumed, but did not check, that the AutomaticItemReturns system preference was off at the beginning of the test un. This patch makes sure that that assumption is met. To test: [1] Make sure that at least one item is on loan (this is another assumption that the test case makes, one that should be corrected with the work proposed for bug 10336. [2] Turn the AutomaticItemReturn system preference on. [3] Run the test: prove -v t/db_dependent/HoldsQueue.t [4] Tests 4 and 6 should fail. [5] Apply the patch. [6] Run the test case again; this time, all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Galen, I got a bad news, with my DB tests, I have a bad news, with your patch I get: t/db_dependent/HoldsQueue.t .. 1/18 Use of uninitialized value $borrower_branchcode in string ne at t/db_dependent/HoldsQueue.t line 36. Use of uninitialized value $borrower_branchcode in string ne at t/db_dependent/HoldsQueue.t line 36. [...] Use of uninitialized value $borrower_branchcode in string ne at t/db_dependent/HoldsQueue.t line 36. Use of uninitialized value $borrower_branchcode in join or string at t/db_dependent/HoldsQueue.t line 48. DBD::mysql::st execute failed: Column 'frombranch' cannot be null at t/db_dependent/HoldsQueue.t line 55. DBD::mysql::st execute failed: Column 'frombranch' cannot be null at t/db_dependent/HoldsQueue.t line 55. # Looks like you planned 18 tests but ran 2. # Looks like your test exited with 255 just after 2. t/db_dependent/HoldsQueue.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 16/18 subtests Test Summary Report ------------------- t/db_dependent/HoldsQueue.t (Wstat: 65280 Tests: 2 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 18 tests but ran 2. Files=1, Tests=2, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.43 cusr 0.02 csys = 0.47 CPU) Result: FAIL But I have a good one, if I apply 10336 before yours, I get: t/db_dependent/HoldsQueue.t .. ok All tests successful. Files=1, Tests=18, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.53 cusr 0.06 csys = 0.62 CPU) Result: PASS So I will sign off this one! Thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19159|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 19173 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19173&action=edit bug 10495: set precondition for HoldsQueue test t/db_dependent/HoldsQueue.t assumed, but did not check, that the AutomaticItemReturns system preference was off at the beginning of the test un. This patch makes sure that that assumption is met. To test: [1] Make sure that at least one item is on loan (this is another assumption that the test case makes, one that should be corrected with the work proposed for bug 10336. [2] Turn the AutomaticItemReturn system preference on. [3] Run the test: prove -v t/db_dependent/HoldsQueue.t [4] Tests 4 and 6 should fail. [5] Apply the patch. [6] Run the test case again; this time, all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10336 --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to comment #2)
Galen, I got a bad news, with my DB tests, I have a bad news, with your patch I get:
Yes, this relates to the comment I made in bug 10336 -- HoldsQueue.t currently assumes that there is at least one item out on loan; your patch removes that assumption. Consequently, to whoever QAs this: this patch should be tested in conjunction with the patch for 10336. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19173|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 19257 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19257&action=edit bug 10495: set precondition for HoldsQueue test t/db_dependent/HoldsQueue.t assumed, but did not check, that the AutomaticItemReturns system preference was off at the beginning of the test un. This patch makes sure that that assumption is met. To test: [1] Make sure that at least one item is on loan (this is another assumption that the test case makes, one that should be corrected with the work proposed for bug 10336. [2] Turn the AutomaticItemReturn system preference on. [3] Run the test: prove -v t/db_dependent/HoldsQueue.t [4] Tests 4 and 6 should fail. [5] Apply the patch. [6] Run the test case again; this time, all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Galen Charlton from comment #6)
Pushed to master.
Thanks, Galen! :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.2. Thanks Galen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10495 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.8 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org