Bugzilla – Attachment 65306 Details for
Bug 18991
Fix cleanup in t/db_dependent/Log.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18991: [QA Follow-up] Use schema txn_begin and txn_rollback
Bug-18991-QA-Follow-up-Use-schema-txnbegin-and-txn.patch (text/plain), 1.74 KB, created by
Marcel de Rooy
on 2017-07-28 10:05:23 UTC
(
hide
)
Description:
Bug 18991: [QA Follow-up] Use schema txn_begin and txn_rollback
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-07-28 10:05:23 UTC
Size:
1.74 KB
patch
obsolete
>From 7e77b355f2498e58a710ddab2174093a2632c002 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 28 Jul 2017 11:58:24 +0200 >Subject: [PATCH] Bug 18991: [QA Follow-up] Use schema txn_begin and > txn_rollback >Content-Type: text/plain; charset=utf-8 > >We also need just one rollback at the end here. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Log.t | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Log.t b/t/db_dependent/Log.t >index 9114808..dbdf0e2 100644 >--- a/t/db_dependent/Log.t >+++ b/t/db_dependent/Log.t >@@ -8,6 +8,7 @@ use Modern::Perl; > use Test::More tests => 10; > > use C4::Context; >+use Koha::Database; > use Koha::DateUtils; > > use t::lib::Mocks qw/mock_preference/; # to mock CronjobLog >@@ -20,9 +21,9 @@ BEGIN { > my $success; > > # Make sure we can rollback. >+my $schema = Koha::Database->new->schema; >+$schema->storage->txn_begin; > my $dbh = C4::Context->dbh; >-$dbh->{AutoCommit} = 0; >-$dbh->{RaiseError} = 1; > > eval { > # FIXME: are we sure there is an member number 1? >@@ -121,8 +122,6 @@ subtest 'logaction(): interface is correctly logged' => sub { > logaction( "MEMBERS", "MODIFY", 1, 'test info', 'sip'); > $logs = GetLogs(); > is( @{$logs}[0]->{ interface }, 'sip', 'Passed interface is respected (sip)'); >- >- $dbh->rollback; > }; > > subtest 'GetLogs() respects interface filters' => sub { >@@ -150,8 +149,6 @@ subtest 'GetLogs() respects interface filters' => sub { > > $logs = GetLogs(undef,undef,undef,undef,undef,undef,undef,['commandline']); > is( @{$logs}[0]->{ interface }, 'commandline', 'Interface correctly filtered (commandline)'); >- >- $dbh->rollback; > }; > >-$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 18991
:
65295
|
65300
|
65305
| 65306