Bug 12782 - t/db_dependent/XISBN.t should work on DOM too
Summary: t/db_dependent/XISBN.t should work on DOM too
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Chris Cormack
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 28288
  Show dependency treegraph
 
Reported: 2014-08-18 19:52 UTC by Tomás Cohen Arazi
Modified: 2021-05-04 14:38 UTC (History)
1 user (show)

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


Attachments
Bug 12782: t/db_dependent/XISBN.t fails in DOM setup (1.24 KB, patch)
2014-08-18 20:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 12782: (followup) skip tests that fail because of provider's error (2.52 KB, patch)
2014-08-18 20:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 12782: t/db_dependent/XISBN.t fails in DOM setup (1.30 KB, patch)
2014-08-19 09:06 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 12782: (followup) skip tests that fail because of provider's error (2.57 KB, patch)
2014-08-19 09:07 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 12782: t/db_dependent/XISBN.t fails in DOM setup (1.36 KB, patch)
2014-08-20 11:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12782: (followup) skip tests that fail because of provider's error (2.64 KB, patch)
2014-08-20 11:18 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 2014-08-18 19:52:34 UTC
The current Mock_SimpleSearch sub always returns usmarc data. This will conflict with _get_biblio_from_xisbn, that calls C4::Search::new_record_from_zebra, so it expects MARCXML data on DOM.
Comment 1 Tomás Cohen Arazi 2014-08-18 20:08:41 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2014-08-18 20:25:55 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2014-08-19 09:06:49 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2014-08-19 09:07:06 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2014-08-20 11:18:00 UTC
Created attachment 31020 [details] [review]
Bug 12782: t/db_dependent/XISBN.t fails in DOM setup

To test:
- Have a DOM setup
- Run
  $ prove -v t/db_dependent/XISBN.t
=> FAIL: Can't call method "field" on an undefined value at .... C4/Search.pm ...
- Apply the patch
- Run
  $ prove -v t/db_dependent/XISBN.t
=> SUCCESS: Tests pass.
- Sign off

Regards
To+

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2014-08-20 11:18:31 UTC
Created attachment 31021 [details] [review]
Bug 12782: (followup) skip tests that fail because of provider's error

It seems that XISBN is failing sometimes, if you run the tests a couple
of times in a row. An error 500 is raised by lwp.

This problem should be trapped and related tests skipped. Because too much
noise could make people pay no attention to this tests failing.

To reproduce:
- Run the tests several consecutive times:
  $ prove -v t/db_dependent/XISBN.t
=> FAIL: XISBN test will fail eventually, printing a networking-related warning.
- Apply the patch
- Repeat the test
=> SUCCESS: when XISBN the networking/connection refused problem arises, the test
  is skipped, and it still passes.

Regards
To+

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Tomás Cohen Arazi 2014-08-20 15:29:49 UTC
Patches pushed to master.