Bugzilla – Attachment 39879 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/Biblio.t AutoCommit fix
Bug-14334-tdbdependentBibliot-AutoCommit-fix.patch (text/plain), 1.67 KB, created by
Mark Tompsett
on 2015-06-05 04:20:24 UTC
(
hide
)
Description:
Bug 14334: t/db_dependent/Biblio.t AutoCommit fix
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-05 04:20:24 UTC
Size:
1.67 KB
patch
obsolete
>From c7d23f58f1e66bb12604de1e987ac5aaf136a488 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 5 Jun 2015 00:15:17 -0400 >Subject: [PATCH] Bug 14334: t/db_dependent/Biblio.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? > -- this is a special case, in that the transaction > rollbacks seem to terminate the transaction in DBIx. > So there needs to be a transaction for each subtest. >3) run koha qa test tools >--- > t/db_dependent/Biblio.t | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index f53b6a5..5174247 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -29,7 +29,8 @@ BEGIN { > > my $dbh = C4::Context->dbh; > # Start transaction >-$dbh->{AutoCommit} = 0; >+my $database = Koha::Database->new(); >+my $schema = $database->schema(); > $dbh->{RaiseError} = 1; > > # Mocking variables >@@ -259,22 +260,25 @@ sub create_issn_field { > return $field; > } > >+$schema->storage->txn_begin(); > subtest 'MARC21' => sub { > plan tests => 27; > run_tests('MARC21'); >- $dbh->rollback; >+ $schema->storage->txn_rollback(); > }; > >+$schema->storage->txn_begin(); > subtest 'UNIMARC' => sub { > plan tests => 27; > run_tests('UNIMARC'); >- $dbh->rollback; >+ $schema->storage->txn_rollback(); > }; > >+$schema->storage->txn_begin(); > subtest 'NORMARC' => sub { > plan tests => 27; > run_tests('NORMARC'); >- $dbh->rollback; >+ $schema->storage->txn_rollback(); > }; > > >-- >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