Bugzilla – Attachment 39872 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/Budgets.t AutoCommit fix
Bug-14334-tdbdependentBudgetst-AutoCommit-fix.patch (text/plain), 1.39 KB, created by
Mark Tompsett
on 2015-06-04 20:10:18 UTC
(
hide
)
Description:
Bug 14334: t/db_dependent/Budgets.t AutoCommit fix
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-06-04 20:10:18 UTC
Size:
1.39 KB
patch
obsolete
>From 9269b5cdf9e027e129389caac1ce4564bf9d3bb1 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 4 Jun 2015 16:08:22 -0400 >Subject: [PATCH] Bug 14334: t/db_dependent/Budgets.t AutoCommit fix > >TEST PLAN >---------- >1) git reset --hard origin/master >2) prove t/db_dependent/Budgets.t > -- horrible failure about transaction >3) apply this patch >4) prove t/db_dependent/Budgets.t > -- no issues >5) koha qa test tools. >--- > t/db_dependent/Budgets.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t >index 11838c8..4e51ecd 100755 >--- a/t/db_dependent/Budgets.t >+++ b/t/db_dependent/Budgets.t >@@ -12,10 +12,13 @@ use C4::Dates; > use C4::Members qw( AddMember ); > > use Koha::Acquisition::Order; >+use Koha::Database; > > use YAML; > 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(q|DELETE FROM aqbudgetperiods|); >@@ -579,6 +582,8 @@ is( C4::Budgets::GetBudget($budget_id2)->{budget_owner_id}, > is( C4::Budgets::GetBudget($budget_id21)->{budget_owner_id}, > undef, "SetOwnerToFundHierarchy should have set John Doe $john_doe for budget 21 ($budget_id21)" ); > >+$schema->storage->txn_rollback(); >+ > sub _get_dependencies { > my ($budget_hierarchy) = @_; > my $graph; >-- >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