[Bug 10499] New: UT: VirtualShelves.t needs a database transaction
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Bug ID: 10499 Summary: UT: VirtualShelves.t needs a database transaction Classification: Unclassified Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: gmcharlt@gmail.com Reporter: kenza.zaki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |kenza.zaki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 --- Comment #1 from kenza <kenza.zaki@biblibre.com> --- Created attachment 19171 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19171&action=edit Bug 10499: VirtualShelves.t - wrap tests in a database connection Before this patch, the queries in VirtualShelves.t were committed in the database and have to be removed at the end. This patch wraps tests in a database connection. Test plan: prove t/db_dependent/VirtualShelves.t VirtualShelves.t .. ok All tests successful. Files=1, Tests=72, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.72 cusr 0.06 csys = 0.84 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |10290 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Could you have a look at bug 10386? It was already there.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 --- Comment #3 from kenza <kenza.zaki@biblibre.com> --- The patch 10386 doesn't add the rollback, so i think these two patches are complementary. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #4 from kenza <kenza.zaki@biblibre.com> --- I just try the patch and it applies. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Chris Cormack <chris@bigballofwax.co.nz> 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=10499 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19171|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 19221 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19221&action=edit Bug 10499: VirtualShelves.t - wrap tests in a database connection Before this patch, the queries in VirtualShelves.t were committed in the database and have to be removed at the end. This patch wraps tests in a database connection. Test plan: prove t/db_dependent/VirtualShelves.t VirtualShelves.t .. ok All tests successful. Files=1, Tests=72, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.72 cusr 0.06 csys = 0.84 CPU) Result: PASS 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=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19221|0 |1 is obsolete| | --- Comment #6 from kenza <kenza.zaki@biblibre.com> --- Created attachment 19308 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19308&action=edit Bug 10499: VirtualShelves.t - wrap tests in a database connection Before this patch, the queries in VirtualShelves.t were committed in the database and have to be removed at the end. This patch wraps tests in a database connection. Test plan: prove t/db_dependent/VirtualShelves.t VirtualShelves.t .. ok All tests successful. Files=1, Tests=72, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.72 cusr 0.06 csys = 0.84 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 --- Comment #7 from kenza <kenza.zaki@biblibre.com> --- This patch needs signoff again.In fact, the patch 10386 is pushed to master so i rebase this one. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Kyle M Hall <kyle@bywatersolutions.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=10499 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19308|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19343 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19343&action=edit Bug 10499: VirtualShelves.t - wrap tests in a database connection Before this patch, the queries in VirtualShelves.t were committed in the database and have to be removed at the end. This patch wraps tests in a database connection. Test plan: prove t/db_dependent/VirtualShelves.t VirtualShelves.t .. ok All tests successful. Files=1, Tests=72, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.72 cusr 0.06 csys = 0.84 CPU) Result: PASS Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 kenza <kenza.zaki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kenza.zaki@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19343|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 19619 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19619&action=edit [PASSED QA] Bug 10499: VirtualShelves.t - wrap tests in a database connection Before this patch, the queries in VirtualShelves.t were committed in the database and have to be removed at the end. This patch wraps tests in a database connection. Test plan: prove t/db_dependent/VirtualShelves.t VirtualShelves.t .. ok All tests successful. Files=1, Tests=72, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.72 cusr 0.06 csys = 0.84 CPU) Result: PASS Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests pass. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- And welcome Kenza - thx for your patches :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to kenza from comment #3)
The patch 10386 doesn't add the rollback, so i think these two patches are complementary.
As a general note, it is not necessary to explicitly call $dbh->rollback. When AutoCommit is off, DBD::mysql automatically issues a rollback when the script ends, and if the script gets killed, the transaction never gets committed either. That said, it doesn't hurt anything to have the explicit rollback. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Kenza! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 --- Comment #13 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Although this patch is already pushed, I want to add some remarks: The code deletes the following lines: -for(my $i=0; $i<10;$i++){ - my $shelfnumber = $shelves[$i]->{number}; - if($shelfnumber<0) { - ok(1, 'Skip DelShelf for shelf -1'); - next; - } - my $status = DelShelf($shelfnumber); - ok(1 == $status, "deleted shelf $shelfnumber and its contents"); -} I do not agree with deleting those lines. Testing the DelShelf function should be done! Scrutiny :) I do agree with deleting this line: -DelBiblio($_) for @biblionumbers; I do not suggest to revert the patch however or send a followup. Why not? I am rebasing my patch on report 10441 that needs 9032 which is in Signed Off state. In this patch I will restore the DelShelf code. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10499 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.3. Thanks Kenza! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org