]> git.koha-community.org Git - koha.git/commit
Bug 19440: Identify overlimit problems in XISBN tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 9 Oct 2017 18:36:41 +0000 (15:36 -0300)
committerKatrin Fischer <katrin.fischer.83@web.de>
Wed, 18 Oct 2017 21:02:51 +0000 (23:02 +0200)
commit0b2e517259eaf7838bb814d3a36137424df89583
tree52b1d52a325442373201facf284ca087dd3230aa
parent61cfb6e24172804e48edc01e9dde2081cffcbaec
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e90874241808354777cc1c27ad3ad106ffdc7cd4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aaf0d3dc474def89ffbb69548ebaf830109143b0)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/XISBN.pm
t/db_dependent/XISBN.t