Bug 14197

Summary: Warning raised by TestBuilder
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: normal    
Priority: P5 - low CC: katrin.fischer, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14045
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14494
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14197: Remove the warning on destroying TestBuilder objects
Bug 14197: TestBuilder - Remove the error on starting the transaction
Used to test the change
Used to test the change
Bug 14197: Remove the warning on destroying TestBuilder objects
Bug 14197: TestBuilder - Remove the error on starting the transaction
[DO_NOT_PUSH] Used to test the change with/without first two patches
[PASSED QA] Bug 14197: Remove the warning on destroying TestBuilder objects
[PASSED QA] Bug 14197: TestBuilder - Remove the error on starting the transaction

Description Jonathan Druart 2015-05-13 15:57:09 UTC
(in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1) at t/lib/TestBuilder.pm line 318
Comment 1 Jonathan Druart 2015-05-13 16:02:12 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-07-09 08:36:35 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-07-09 09:01:52 UTC
(In reply to Jonathan Druart from comment #1)
> To see the warning see patches on bug 14045.

And the errors with the patch on bug 14494.
Comment 4 Marcel de Rooy 2015-08-28 09:55:01 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-08-28 09:55:46 UTC
Jonathan: I cannot reproduce with the simple third patch.
What should I change there to see behavior change with/without your patches?
Comment 6 Marcel de Rooy 2015-08-28 09:58:32 UTC
Oops, I lost some changes in that test file.
But what exactly should trigger the error on txn_begin or end in testbuilder?
Comment 7 Marcel de Rooy 2015-08-28 10:07:15 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2015-08-28 10:10:00 UTC
Only this question: Why does the test abort with the DESTROY and does it only warn when I undef $builder ?
Comment 9 Marcel de Rooy 2015-08-28 10:13:50 UTC
(In reply to Marcel de Rooy from comment #8)
> Only this question: Why does the test abort with the DESTROY and does it
> only warn when I undef $builder ?
Because the second DESTROY crashes the test :)
Comment 10 Marcel de Rooy 2015-08-28 10:16:28 UTC Comment hidden (obsolete)
Comment 11 Marcel de Rooy 2015-08-28 10:16:36 UTC Comment hidden (obsolete)
Comment 12 Marcel de Rooy 2015-08-28 10:17:40 UTC
Created attachment 42059 [details] [review]
[DO_NOT_PUSH] Used to test the change with/without first two patches
Comment 13 Katrin Fischer 2015-09-01 23:07:13 UTC
Can I get a test plan please?
Comment 14 Marcel de Rooy 2015-09-02 07:31:14 UTC
(In reply to Katrin Fischer from comment #13)
> Can I get a test plan please?

Katrin:
Run the test from the third patch with and without the two patches.
Compare the results.
Comment 15 Katrin Fischer 2015-09-14 20:42:33 UTC
Created attachment 42545 [details] [review]
[PASSED QA] Bug 14197: Remove the warning on destroying TestBuilder objects

This module will be called by db_dependent tests, which already create a
transaction.
TestBuilder creates a new one (which is certainly useless) and the
rollback does not do anything.

To see the warning see patches on bug 14045.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2015-09-14 20:42:36 UTC
Created attachment 42546 [details] [review]
[PASSED QA] Bug 14197: TestBuilder - Remove the error on starting the transaction

DBD::mysql::db begin_work failed: Already in a transaction at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1560.
DBIx::Class::Storage::DBI::txn_rollback(): Storage transaction_depth 0 does not match false AutoCommit of DBI::db=HASH(0xa429648), attempting ROLLBACK anyway at t/lib/TestBuilder.pm line 363

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Tomás Cohen Arazi 2015-09-16 13:54:05 UTC
Patches pushed to master.

Thanks Jonathan!