Bug 19440 - XISBN tests should skip if XISBN returns overlimit error
Summary: XISBN tests should skip if XISBN returns overlimit error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
: 19424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-09 18:27 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2019-10-14 19:57 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 19440: Identify overlimit problems in XISBN tests (3.23 KB, patch)
2017-10-09 18:42 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 19440: Existing calls need to be done in scalar context (1.26 KB, patch)
2017-10-09 18:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2017-10-09 18:27:39 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 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