Bugzilla – Attachment 39884 Details for
Bug 14334
DBI fighting DBIx over Autocommit in tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14334: t/db_dependent/Borrowers.t AutoCommit fix
Bug-14334-tdbdependentBorrowerst-AutoCommit-fix.patch (text/plain), 1.18 KB, created by
Mark Tompsett
on 2015-06-05 05:11:44 UTC
(
hide
)
Description:
Bug 14334: t/db_dependent/Borrowers.t AutoCommit fix
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-05 05:11:44 UTC
Size:
1.18 KB
patch
obsolete
>From 6b129e648a8b38b5064fbae7a4f09e9313503f51 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 5 Jun 2015 01:10:24 -0400 >Subject: [PATCH] Bug 14334: t/db_dependent/Borrowers.t AutoCommit fix > >There is no easy way to trigger an obvious problem. > >TEST PLAN >--------- >1) apply patch >2) git diff origin/master > -- Are the additions/subtractions similar to > http://paste.lisp.org/display/149194? >3) run koha qa test tools >--- > t/db_dependent/Borrowers.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Borrowers.t b/t/db_dependent/Borrowers.t >index 50d9c32..8b807bf 100755 >--- a/t/db_dependent/Borrowers.t >+++ b/t/db_dependent/Borrowers.t >@@ -30,7 +30,9 @@ BEGIN { > > # Start transaction > my $dbh = C4::Context->dbh; >-$dbh->{AutoCommit} = 0; >+my $database = Koha::Database->new(); >+my $schema = $database->schema(); >+$schema->storage->txn_begin(); > $dbh->{RaiseError} = 1; > $dbh->do("DELETE FROM issues"); > $dbh->do("DELETE FROM borrowers"); >@@ -93,4 +95,5 @@ foreach my $b ( $borrowers->as_list() ) { > is( $b->categorycode(), $categorycode, "Iteration returns a borrower object" ); > } > >+$schema->storage->txn_rollback(); > 1; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14334
:
39871
|
39872
|
39873
|
39874
|
39875
|
39876
|
39877
|
39879
|
39880
|
39881
|
39882
|
39883
|
39884
|
39885
|
40080
|
40086
|
40184
|
82989
|
83129
|
83201