Bugzilla – Attachment 80653 Details for
Bug 21155
SwitchOnSiteCheckouts.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
Bug-21155-Prevent-SwitchOnSiteCheckoutst-to-fail-r.patch (text/plain), 1.91 KB, created by
Martin Renvoize
on 2018-10-16 13:42:18 UTC
(
hide
)
Description:
Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2018-10-16 13:42:18 UTC
Size:
1.91 KB
patch
obsolete
>From 0d13bb7851e7eef3bee8378279c61504f0a56a85 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Oct 2018 10:27:37 -0300 >Subject: [PATCH] Bug 21155: Prevent SwitchOnSiteCheckouts.t to fail randomly > > # Failed test 'The date_due should have been set depending on the circ > rules when the on-site checkout has been switched' > # at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 126. > # got: '2018-10-16T23:59:00' > # expected: '2018-10-21T23:59:00' > >TestBuilder set date to today, so issuingrules.harduedate will be set to >today. >issuingrules.hardduedatecompare will be set to an integer. >If set to 0, $datedue will be reset to the hard due date > >The call stack is: AddIssue > CalcDateDue > GetHardDueDate > >In GetHardDueDate: >3509 if ( $hardduedatecompare == 0 || $hardduedatecompare == $cmp ) { >3510 $datedue = $hardduedate->clone; >3511 } > >To fix this random failure we need to set issuingrules.harduedate to undef. > >Test plan: >0. Do not apply this patch >1. Modify the test to set hardduedatecompare to 0 (search 'my $issuingrule = ') >2. Execute the test and confirm the failure >3. Apply this patch >4. Execute the test and confirm the it is no longer failing > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Circulation/SwitchOnSiteCheckouts.t | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/t/db_dependent/Circulation/SwitchOnSiteCheckouts.t b/t/db_dependent/Circulation/SwitchOnSiteCheckouts.t >index 506423d676..62685617a1 100644 >--- a/t/db_dependent/Circulation/SwitchOnSiteCheckouts.t >+++ b/t/db_dependent/Circulation/SwitchOnSiteCheckouts.t >@@ -95,6 +95,8 @@ my $issuingrule = $builder->build({ > maxonsiteissueqty => 1, > lengthunit => 'days', > issuelength => 5, >+ hardduedate => undef, >+ hardduedatecompare => 0, > }, > }); > >-- >2.19.1
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 21155
:
80652
| 80653