[Koha-bugs] [Bug 21155] SwitchOnSiteCheckouts.t is failing randomly
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Oct 16 15:42:18 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80652|0 |1
is obsolete| |
--- Comment #3 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 80653
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80653&action=edit
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 at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list