Bugzilla – Attachment 89799 Details for
Bug 22917
Circulation.t fails if tests are ran slowly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22917: Fix more funky things
Bug-22917-Fix-more-funky-things.patch (text/plain), 1.61 KB, created by
Jonathan Druart
on 2019-05-16 01:12:07 UTC
(
hide
)
Description:
Bug 22917: Fix more funky things
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-05-16 01:12:07 UTC
Size:
1.61 KB
patch
obsolete
>From c45fd14707a8b0ff9c3cdbf3d91cca977c86bb36 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 May 2019 20:02:37 -0500 >Subject: [PATCH] Bug 22917: Fix more funky things > >And that's where a land. > >We are making another test failing much more often than before. >The 'now' mocked will be far before the now() of mysql from the tests >executed at the end of Circulation.t >Without this patch I get the following error one out of the two runs: > # Failed test 'renew log successfully added' > # at t/db_dependent/Circulation.t line 3024. > # got: '4' > # expected: '5' > # Looks like you failed 1 test of 13. > >Using the mocked value will solve this issue. >I cannot find any side-effects this change could cause. >--- > C4/Log.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index 34e2b609c2..8450a4a68a 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -77,9 +77,10 @@ sub logaction { > $usernumber ||= 0; > $interface //= C4::Context->interface; > >+ my $now = dt_from_string; > my $dbh = C4::Context->dbh; >- my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info,interface) values (now(),?,?,?,?,?,?)"); >- $sth->execute($usernumber,$modulename,$actionname,$objectnumber,$infos,$interface); >+ my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info,interface) values (?,?,?,?,?,?,?)"); >+ $sth->execute($now, $usernumber,$modulename,$actionname,$objectnumber,$infos,$interface); > $sth->finish; > > my $logger = Koha::Logger->get( >-- >2.11.0
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 22917
:
89797
|
89798
|
89799
|
89853
|
89855
|
89856
|
89857
|
89876
|
89877
|
90018
|
90019
|
90020
|
90021