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.
Created attachment 30951 [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+
Created attachment 30952 [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+
Created attachment 30970 [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>
Created attachment 30971 [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>
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>
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>
Patches pushed to master.