Bug 19440

Summary: XISBN tests should skip if XISBN returns overlimit error
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, katrin.fischer, mtj, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 19440: Identify overlimit problems in XISBN tests
Bug 19440: Existing calls need to be done in scalar context

Description Tomás Cohen Arazi 2017-10-09 18:27:39 UTC

    
Comment 1 Tomás Cohen Arazi 2017-10-09 18:42:31 UTC
Created attachment 67847 [details] [review]
Bug 19440: Identify overlimit problems in XISBN tests

This patch makes C4::XISBN::get_xisbns() return an errors hashref
including information of the failing fetches from xisbn services.

It tackles the situation of XISBN, which in some cases returns 'overlimit'
errors.

The patch makes the relevant functions check if the response->{stat} string
is 'ok' and returns the string in $errors otherwise.

This only happens when in list context. This allows to fix the randomly failing
tests while keeping the current behaviour.

All this code should be rewritten. It does the job bug doesn't have problems handling
or reoprting. This is just a band aid.

To test:
- Make sure
 k$ prove t/db_dependent/XISBN.t
=> SUCCESS :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2017-10-09 18:59:06 UTC
Created attachment 67848 [details] [review]
Bug 19440: Existing calls need to be done in scalar context
Comment 3 Jonathan Druart 2017-10-09 19:17:04 UTC
Patches pushed to master, Thanks Tomas!
Comment 4 Jonathan Druart 2017-10-09 21:52:55 UTC
*** Bug 19424 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Druart 2017-10-12 20:32:47 UTC
RMaints, please backport.
Comment 6 Fridolin Somers 2017-10-17 07:08:02 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 7 Katrin Fischer 2017-10-18 21:03:53 UTC
These patches have been pushed to 16.11.x and will be in 16.11.13.
Comment 8 Mason James 2017-11-23 23:15:27 UTC
Pushed to 16.05.x, for 16.05.18 release