Bug 14158 - t/db_dependent/www/search_utf8.t hangs if error is returned
Summary: t/db_dependent/www/search_utf8.t hangs if error is returned
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-06 15:03 UTC by Tomás Cohen Arazi
Modified: 2016-12-05 21:25 UTC (History)
5 users (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 14158: www search tests - Cleanup at the end (1.13 KB, patch)
2016-03-30 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14158: www search tests - Cleanup at the end (1.19 KB, patch)
2016-03-30 13:26 UTC, Tomás Cohen Arazi
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 2015-05-06 15:03:37 UTC
There is currently a bug with the stage-marc-import.pl when the plugins are disabled. It raises a "Internal server error" page.

I noticed that Koha_Master_U14 (the task on jenkins that runs the mentioned test) just hangs waiting for output of the test.

This should be fixed.

To reproduce:

- Checkout 4e0468e8c2587fa4f51cb22b59ac5466383bbab1 (a commit without the fix for the specific problem that raises the test problem).
- Set the environment for running the test:
export KOHA_USER=kohaadmin
export KOHA_PASS=katikoan
export KOHA_INTRANET_URL="<paste your intranet url>"
export KOHA_OPAC_URL="<paste your opac url>"
- Run the test:
prove t/db_dependent/www/search_utf8.t
=> FAIL: You will see something like this on the output while the test just hangs:
t/db_dependent/www/search_utf8.t .. 3/64 Error GETing http://koha-dev.biblioadmin/cgi-bin/koha/tools/stage-marc-import.pl: Internal Server Error at t/db_dependent/www/search_utf8.t line 127.
# Looks like you planned 64 tests but ran 4.
# Looks like your test exited with 255 just after 4.

and the prompt is not released. At all.
Comment 1 Tomás Cohen Arazi 2016-03-29 20:42:57 UTC
There should be (at least) a reasonable timeout.
Comment 2 Jonathan Druart 2016-03-30 10:01:55 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2016-03-30 13:26:33 UTC
Created attachment 49684 [details] [review]
Bug 14158: www search tests - Cleanup at the end

When something wrong happen, the parent process is waiting for the
children to finish, but they have been zombified and the test hangs.

To fix that, we should ensure that the cleanup is correctly done and
that the processes are correctly killed.

Test plan:
export KOHA_USER=koha
export KOHA_PASS=koha
export KOHA_INTRANET_URL=http://do_not_exist_but_its_expected
export KOHA_OPAC_URL=http://another_url
prove t/db_dependent/www/search_utf8.t

Without this patch, the tests will hang
With the patch applied, they won't!

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Comment 4 Tomás Cohen Arazi 2016-03-30 13:27:12 UTC
QAing as it is a trivial test fix no one has cared about yet :-D
Comment 5 Brendan Gallagher 2016-03-30 13:43:26 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 6 Julian Maurice 2016-04-06 13:49:39 UTC
Patch pushed to 3.22.x, will be in 3.22.6
Comment 7 Frédéric Demians 2016-04-27 15:41:16 UTC
Pushed to 3.20.x, will be in 3.20.11.