Bug 19009

Summary: Circulation.t is still failing randomly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18759, 18802    
Bug Blocks: 25551, 19403    
Attachments: Bug 19009: Fix random failures from Circulation.t
[SIGNED-OFF] Bug 19009: Fix random failures from Circulation.t
Bug 19009: Fix random failures from Circulation.t
Bug 19009: Fix random failures from Circulation.t

Description Jonathan Druart 2017-07-31 14:31:33 UTC
Bug 18759 was supposed to fix random failures from Circulation.t but some tests can still fail randomly.
Comment 1 Jonathan Druart 2017-07-31 15:12:15 UTC
Created attachment 65357 [details] [review]
Bug 19009: Fix random failures from Circulation.t

From jenkins output:
 Subtest: CanBookBeIssued + Koha::Patron->is_debarred<7c>has_overdues
1..8
not ok 1
[SKIP]

I executed it several times and display the different $error, $alerts and question keys.
GNA and RESTRICTED were sometimes set, which block the issue.
Reading the code it seems that some patron's attributes must be removed to avoid the checkin rejection.

Test plan:
Execute the tests several times and notice that it fails randomly
With this patch they should always pass.
Comment 2 Owen Leonard 2017-07-31 16:50:50 UTC
I still get one failure:

t/db_dependent/Circulation.t .. 68/96
#   Failed test 'days_in_advance is 7 in GetUpcomingDueIssues if not provided'
#   at t/db_dependent/Circulation.t line 894.
#          got: '3'
#     expected: '2'
Comment 3 Jonathan Druart 2017-07-31 16:57:24 UTC
I have never seen this one.
Does it fail randomly? If not it should be fixed on another bug report, it's certainly data dependent.
Comment 4 Owen Leonard 2017-07-31 17:11:10 UTC
Sorry, tester error.
Comment 5 Owen Leonard 2017-07-31 17:12:24 UTC
Created attachment 65373 [details] [review]
[SIGNED-OFF] Bug 19009: Fix random failures from Circulation.t

From jenkins output:
 Subtest: CanBookBeIssued + Koha::Patron->is_debarred<7c>has_overdues
1..8
not ok 1
[SKIP]

I executed it several times and display the different $error, $alerts and question keys.
GNA and RESTRICTED were sometimes set, which block the issue.
Reading the code it seems that some patron's attributes must be removed to avoid the checkin rejection.

Test plan:
Execute the tests several times and notice that it fails randomly
With this patch they should always pass.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Marcel de Rooy 2017-08-04 15:01:36 UTC
On top of 18802 it passes.
Comment 7 Marcel de Rooy 2017-08-04 15:02:46 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2017-08-04 15:03:19 UTC
Created attachment 65507 [details] [review]
Bug 19009: Fix random failures from Circulation.t

From jenkins output:
 Subtest: CanBookBeIssued + Koha::Patron->is_debarred<7c>has_overdues
1..8
not ok 1
[SKIP]

I executed it several times and display the different $error, $alerts and question keys.
GNA and RESTRICTED were sometimes set, which block the issue.
Reading the code it seems that some patron's attributes must be removed to avoid the checkin rejection.

Test plan:
Execute the tests several times and notice that it fails randomly
With this patch they should always pass.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Jonathan Druart 2017-08-08 12:45:52 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 10 Fridolin Somers 2017-09-29 09:00:39 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 11 Katrin Fischer 2017-10-01 21:21:12 UTC
Dependency is not in 16.11.x (doesn't apply). Please take a look if you want this included.