Bug 19440 - XISBN tests should skip if XISBN returns overlimit error
Summary: XISBN tests should skip if XISBN returns overlimit error
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 19424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-09 18:27 UTC by Tomás Cohen Arazi
Modified: 2017-10-18 21:03 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19440: Identify overlimit problems in XISBN tests (3.23 KB, patch)
2017-10-09 18:42 UTC, Tomás Cohen Arazi
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 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.