Bugzilla – Attachment 39871 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/Bookseller.t AutoCommit fix
Bug-14334-tdbdependentBooksellert-AutoCommit-fix.patch (text/plain), 1.41 KB, created by
Mark Tompsett
on 2015-06-04 20:03:47 UTC
(
hide
)
Description:
Bug 14334: t/db_dependent/Bookseller.t AutoCommit fix
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-04 20:03:47 UTC
Size:
1.41 KB
patch
obsolete
>From 90ed54775f5e596fea4bf8e003107f243dc03dd3 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 4 Jun 2015 16:01:20 -0400 >Subject: [PATCH] Bug 14334: t/db_dependent/Bookseller.t AutoCommit fix > >TEST PLAN >---------- >1) git reset --hard origin/master >2) prove t/db_dependent/Bookseller.t > -- horrible failure about transaction >3) apply this patch >4) prove t/db_dependent/Bookseller.t > -- no issues >5) koha qa test tools. >--- > t/db_dependent/Bookseller.t | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t >index 7587fee..964ba87 100644 >--- a/t/db_dependent/Bookseller.t >+++ b/t/db_dependent/Bookseller.t >@@ -15,6 +15,7 @@ use C4::Budgets; > use C4::Biblio; > > use Koha::Acquisition::Order; >+use Koha::Database; > > BEGIN { > use_ok('C4::Bookseller'); >@@ -32,8 +33,11 @@ can_ok( > > #Start transaction > my $dbh = C4::Context->dbh; >+my $database = Koha::Database->new(); >+my $schema = $database->schema(); >+$schema->storage->txn_begin(); >+ > $dbh->{RaiseError} = 1; >-$dbh->{AutoCommit} = 0; > > #Start tests > $dbh->do(q|DELETE FROM aqorders|); >@@ -742,7 +746,7 @@ is( scalar @$contacts, > 1, 'Only one contact after modification' ); > > #End transaction >-$dbh->rollback; >+$schema->storage->txn_rollback(); > > #field_filter filters the useless fields or foreign keys > #NOTE: all the fields of aqbookseller arent considered >-- >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