[Bug 21155] New: SwitchOnSiteCheckouts.t is failing randomly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Bug ID: 21155 Summary: SwitchOnSiteCheckouts.t is failing randomly Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org https://jenkins.koha-community.org/job/Koha_18.05_D9/lastCompletedBuild/cons... koha_1 | # Failed test 'The date_due should have been set depending on the circ rules when the on-site checkout has been switched' koha_1 | # at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 122. koha_1 | # got: '2018-08-03T23:59:00' koha_1 | # expected: '2018-08-08T23:59:00' koha_1 | # Looks like you failed 1 test of 10. koha_1 | [13:48:23] t/db_dependent/Circulation/SwitchOnSiteCheckouts.t koha_1 | Dubious, test returned 1 (wstat 256, 0x100) koha_1 | Failed 1/10 subtests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- https://jenkins.koha-community.org/job/Koha_18.05_D8/lastCompletedBuild/cons... koha_1 | # Failed test 'The date_due should have been set depending on the circ rules when the on-site checkout has been switched' koha_1 | # at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 122. koha_1 | # got: '2018-10-16T23:59:00' koha_1 | # expected: '2018-10-21T23:59:00' koha_1 | # Looks like you failed 1 test of 10. koha_1 | [12:17:48] t/db_dependent/Circulation/SwitchOnSiteCheckouts.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80652&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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80652|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@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@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Well sleuthed Jonathan. Going straight to Passed QA for this; Works as expected and keeps Jenkins happy.. it's always good to appease the mighty Jenkins! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21155 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org