[Bug 8768] New: t/ItemType.t fails because DBD::Mock has no empty result set
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Priority: P5 - low Change sponsored?: --- Bug ID: 8768 Assignee: gmcharlt@gmail.com Summary: t/ItemType.t fails because DBD::Mock has no empty result set Severity: enhancement Classification: Unclassified OS: All Reporter: colin.campbell@ptfs-europe.com Hardware: All Status: NEW Version: unspecified Component: Test Suite Product: Koha ItemType.t fails because the second test attempts to retrieve a non existent result set causing an error in DBI The intention of the test is that all returns 0 on an empty table so DBD::Mock should be populated with an empty result set otherwise the test suite fails -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Colin Campbell <colin.campbell@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |colin.campbell@ptfs-europe. | |com --- Comment #1 from Colin Campbell <colin.campbell@ptfs-europe.com> --- Created attachment 12185 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12185&action=edit Proposed patch To test with this patch prove t/ItemType.t should run all tests and test two should return ok, running prove -v t/ItemType.t should show 'test 2 - Testing all itemtypes is empty' to have passed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Hmm I dont see the fail before the patch prove t/ItemType.t 2012-09-14 14:28:40 chrisc pts/1 t/ItemType.t .. ok All tests successful. Files=1, Tests=15, 1 wallclock secs ( 0.05 usr 0.01 sys + 0.12 cusr 0.03 csys = 0.21 CPU) Result: PASS And still all 15 pass afterwards. But it is more correct to declare an empty set, so will sign off. (Note this was passing fine on jenkins too) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12185|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 12205 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12205&action=edit bug 8768 correct an error in ItemType.t The second test in ItemType.t tests that an empty table returns no rows however as Mock::DBD has no resultset it fails with an error in DBI It requires that an empty resultset is defined in Mock::DBD first This patch adds that mocked empty table Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comments: The patch fixes a failed test. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8768 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|unspecified |rel_3_10 --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org