Bug 14197 - Warning raised by TestBuilder
Summary: Warning raised by TestBuilder
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-13 15:57 UTC by Jonathan Druart
Modified: 2016-06-21 21:40 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14197: Remove the warning on destroying TestBuilder objects (894 bytes, patch)
2015-05-13 16:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14197: TestBuilder - Remove the error on starting the transaction (1.05 KB, patch)
2015-07-09 08:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Used to test the change (1.89 KB, patch)
2015-08-28 09:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Used to test the change (1.42 KB, patch)
2015-08-28 10:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14197: Remove the warning on destroying TestBuilder objects (998 bytes, patch)
2015-08-28 10:16 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14197: TestBuilder - Remove the error on starting the transaction (1.15 KB, patch)
2015-08-28 10:16 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[DO_NOT_PUSH] Used to test the change with/without first two patches (1.44 KB, patch)
2015-08-28 10:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[PASSED QA] Bug 14197: Remove the warning on destroying TestBuilder objects (1022 bytes, patch)
2015-09-14 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 14197: TestBuilder - Remove the error on starting the transaction (1.18 KB, patch)
2015-09-14 20:42 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (tcohen) 2015-09-16 13:54:05 UTC
Patches pushed to master.

Thanks Jonathan!