Bugzilla – Attachment 67431 Details for
Bug 19385
t/Calendar.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19385: Fix random t/Calendar.t failure - clear the cache before
Bug-19385-Fix-random-tCalendart-failure---clear-th.patch (text/plain), 1.62 KB, created by
Jonathan Druart
on 2017-09-28 17:51:28 UTC
(
hide
)
Description:
Bug 19385: Fix random t/Calendar.t failure - clear the cache before
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-28 17:51:28 UTC
Size:
1.62 KB
patch
obsolete
>From a452da5e2b57a7cf58228a54dffda3bf6cf4b448 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Sep 2017 14:49:11 -0300 >Subject: [PATCH] Bug 19385: Fix random t/Calendar.t failure - clear the cache > before > >The cache 'exception_holidays' may be populated when we run these tests, >we need to clear it before the tests are run. > >Test plan: > prove t/db_dependent/Circulation/CalcDateDue.t t/Calendar.t > >Without this patch, t/Calendar will fail with: > # Failed test 'Exception holiday is not a closed day test' > # at t/Calendar.t line 159. > # got: '1' > # expected: '0' > # Looks like you failed 1 test of 38. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/Calendar.t | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/t/Calendar.t b/t/Calendar.t >index d5b8967cbf..e0128b76f4 100755 >--- a/t/Calendar.t >+++ b/t/Calendar.t >@@ -85,7 +85,8 @@ fixtures_ok [ > ], "add fixtures"; > > my $cache = Koha::Caches->get_instance(); >-$cache->clear_from_cache( 'single_holidays') ; >+$cache->clear_from_cache( 'single_holidays' ) ; >+$cache->clear_from_cache( 'exception_holidays' ) ; > > # 'MPL' branch is arbitrary, is not used at all but is needed for initialization > my $cal = Koha::Calendar->new( branchcode => 'MPL' ); >@@ -330,3 +331,7 @@ my $holiday_for_another_branch = DateTime->new( > is ( $cal->is_holiday($holiday_for_another_branch), 1, 'Holiday defined for CPL should be defined as an holiday' ); > } > >+END { >+ $cache->clear_from_cache( 'single_holidays' ) ; >+ $cache->clear_from_cache( 'exception_holidays' ) ; >+}; >-- >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 19385
: 67431