Bugzilla – Attachment 65300 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: Fix cleanup in t/db_dependent/Log.t
Bug-18991-Fix-cleanup-in-tdbdependentLogt.patch (text/plain), 1.60 KB, created by
Marc Véron
on 2017-07-28 06:09:14 UTC
(
hide
)
Description:
Bug 18991: Fix cleanup in t/db_dependent/Log.t
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-07-28 06:09:14 UTC
Size:
1.60 KB
patch
obsolete
>From d632d8cd5dc2921b6a7afb391adb5a233bb39abd Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Thu, 27 Jul 2017 14:56:18 +0000 >Subject: [PATCH] Bug 18991: Fix cleanup in t/db_dependent/Log.t >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >There is an action_logs entry via logaction() without transaction to be rolled >back in t/db_dependent/Log.t. This leaves an entry in action_logs after >the test is over. > >To replicate: >1. prove t/db_dependent/Log.t >2. Observe a new entry in action_logs table > >To test: >1. Apply patch >2. prove t/db_dependent/Log.t >3. Observe there are no new entries in action_logs > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > t/db_dependent/Log.t | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Log.t b/t/db_dependent/Log.t >index 3d878bd..9114808 100644 >--- a/t/db_dependent/Log.t >+++ b/t/db_dependent/Log.t >@@ -19,9 +19,13 @@ BEGIN { > } > my $success; > >+# Make sure we can rollback. >+my $dbh = C4::Context->dbh; >+$dbh->{AutoCommit} = 0; >+$dbh->{RaiseError} = 1; >+ > eval { > # FIXME: are we sure there is an member number 1? >- # FIXME: can we remove this log entry somehow? > logaction("MEMBERS","MODIFY",1,"test operation"); > $success = 1; > } or do { >@@ -57,11 +61,6 @@ eval { > }; > ok($success, "GetLogs seemed to find ".$success." like our test record in a tighter search"); > >-# Make sure we can rollback. >-my $dbh = C4::Context->dbh; >-$dbh->{AutoCommit} = 0; >-$dbh->{RaiseError} = 1; >- > # We want numbers to be the same between runs. > $dbh->do("DELETE FROM action_logs;"); > >-- >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