[Bug 15081] New: TestBuilder should not handle the transaction
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Bug ID: 15081 Summary: TestBuilder should not handle the transaction Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: gmcharlt@gmail.com Right now, TestBuilder has the side effect of introducing a race condition on the DBIC transaction. The consecquences are uncomfortable, because warnings are raised on all tests that use it. A patch removing it should make sure the tests have their own rollback handling using the Koha::Databases-provided schema. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44281 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44281&action=edit Bug 15081: Take transaction handling out from TestBuilder This patch removes transaction handling code from TestBuilder. It fixes the TestBuilder.t to handle the transaction on its own. Verify that t/db_dependent/TestBuilder.t passes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 44282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44282&action=edit Bug 15081: (followup) Make test files using TestBuilder handle their transactions This trivial patch introduces the code needed on the test files so they handle the DB transaction instead of relying on the (removed) transaction started/rolled back by TestBuilder. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|chris@bigballofwax.co.nz |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44281|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 44284 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44284&action=edit Bug 15081: Take transaction handling out from TestBuilder This patch removes transaction handling code from TestBuilder. It fixes the TestBuilder.t to handle the transaction on its own. Verify that t/db_dependent/TestBuilder.t passes. Followed test plan, TestBuilder.t passes Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44282|0 |1 is obsolete| | --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 44286 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44286&action=edit Bug 15081: (followup) Make test files using TestBuilder handle their transactions This trivial patch introduces the code needed on the test files so they handle the DB transaction instead of relying on the (removed) transaction started/rolled back by TestBuilder. Tested all of the files before and after applying the patch, resultes are the same. (Pass exept of t/db_dependent/Barcodes_ValueBuilder.t, this has the same error). Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 --- Comment #5 from Marc Véron <veron@veron.ch> --- Note: With and without patch, t/db_dependent/Barcodes_ValueBuilder.t fails with: DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`issues`, CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON UPDATE CASCADE) [for Statement "DELETE FROM items"] at t/db_dependent/Barcodes_ValueBuilder.t line 35. not ok 2 - incremental barcode -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Kyle M Hall <kyle@bywatersolutions.com> 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=15081 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44284|0 |1 is obsolete| | Attachment #44286|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44387 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44387&action=edit [PASSED QA] Bug 15081: Take transaction handling out from TestBuilder This patch removes transaction handling code from TestBuilder. It fixes the TestBuilder.t to handle the transaction on its own. Verify that t/db_dependent/TestBuilder.t passes. Followed test plan, TestBuilder.t passes Signed-off-by: Marc Véron <veron@veron.ch> 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=15081 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44388 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44388&action=edit [PASSED QA] Bug 15081: (followup) Make test files using TestBuilder handle their transactions This trivial patch introduces the code needed on the test files so they handle the DB transaction instead of relying on the (removed) transaction started/rolled back by TestBuilder. Tested all of the files before and after applying the patch, resultes are the same. (Pass exept of t/db_dependent/Barcodes_ValueBuilder.t, this has the same error). Signed-off-by: Marc Véron <veron@veron.ch> 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=15081 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 44389 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44389&action=edit Bug 15081 [QA Followup] - Fix issue with Barcodes_ValueBuilder.t -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks for the followup, Kyle! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14878 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14878 [Bug 14878] Tests - Create the branchcodes if needed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- Is this patch needed on 3.20.x branch for its test suite? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15081 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Frédéric Demians from comment #10)
Is this patch needed on 3.20.x branch for its test suite?
I don't think so. It is part of a bigger tests rewrite. If it applies, it shouldn't harm and could help make jenkins stable for 3.20. But maybe it is not worth the trouble. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org