Bug 18411 - t/db_dependent/www/search_utf8.t fails
Summary: t/db_dependent/www/search_utf8.t fails
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Mark Tompsett
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 22:06 UTC by Katrin Fischer
Modified: 2018-12-03 20:03 UTC (History)
5 users (show)

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


Attachments
Bug 18411: Fix one test. (1.62 KB, patch)
2017-06-09 23:28 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18411: Fix one test. (1.85 KB, patch)
2017-06-10 11:50 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18411: Fix failing search_utf8.t tests (1.94 KB, patch)
2017-06-12 13:41 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 Katrin Fischer 2017-04-10 22:06:28 UTC
https://jenkins.koha-community.org/job/Koha_16.11.x_D8/lastCompletedBuild/testReport/(root)/t_db_dependent_www_search_utf8_t/Number_of_runned_tests_does_not_match_plan___668_/

perl t/db_dependent/www/history.t
1..2
ok 1 - Latin characters with umlauts show correctly on the history page.
ok 2 - Cyrillic characters with umlauts show correctly on the history page.
kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl t/db_dependent/www/search_utf8.t 
1..66
ok 1 - connect to intranet
ok 2 - login to staff client
ok 3 - load main page
ok 4 - open tools module
Link not found at t/db_dependent/www/search_utf8.t line 127.
# Looks like your test exited with 255 just after 4.
Comment 1 Mason James 2017-04-10 23:09:37 UTC
(In reply to Katrin Fischer from comment #0)
> https://jenkins.koha-community.org/job/Koha_16.11.x_D8/lastCompletedBuild/
> testReport/(root)/t_db_dependent_www_search_utf8_t/
> Number_of_runned_tests_does_not_match_plan___668_/
> 
> perl t/db_dependent/www/history.t
> 1..2
> ok 1 - Latin characters with umlauts show correctly on the history page.
> ok 2 - Cyrillic characters with umlauts show correctly on the history page.
> kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ perl
> t/db_dependent/www/search_utf8.t 
> 1..66
> ok 1 - connect to intranet
> ok 2 - login to staff client
> ok 3 - load main page
> ok 4 - open tools module
> Link not found at t/db_dependent/www/search_utf8.t line 127.
> # Looks like your test exited with 255 just after 4.

Hi, this also fails for me on master/7c8610c too

mason@xen1:~/g/master$ sudo koha-shell -c 'prove ./t/db_dependent/www/search_utf8.t' mast3
./t/db_dependent/www/search_utf8.t .. You tried to plan twice at ./t/db_dependent/www/search_utf8.t line 65.
# Looks like your test exited with 255 before it could output anything.
./t/db_dependent/www/search_utf8.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 66/66 subtests

Test Summary Report
-------------------
./t/db_dependent/www/search_utf8.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 66 tests but ran 0.
Files=1, Tests=0,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.79 cusr  0.25 csys =  2.08 CPU)
Result: FAIL
Comment 2 Jonathan Druart 2017-04-11 13:42:32 UTC
(In reply to Mason James from comment #1)
> ./t/db_dependent/www/search_utf8.t .. You tried to plan twice at

You did not specify KOHA_INTRANET_URL and KOHA_OPAC_URL

% KOHA_INTRANET_URL=http://pro.kohadev.vm KOHA_OPAC_URL=http://catalogue.kohadev.vm prove t/db_dependent/www/search_utf8.t
t/db_dependent/www/search_utf8.t .. ok     
All tests successful.
Files=1, Tests=66, 67 wallclock secs ( 0.03 usr  0.00 sys +  1.44 cusr  0.76 csys =  2.23 CPU)
Result: PASS
Comment 3 Katrin Fischer 2017-04-11 13:57:40 UTC
Hm, ok, but how would we do this for Jenkins?
Comment 4 Jonathan Druart 2017-04-11 14:08:06 UTC
I get much more errors that Jenkins's ones.
Someone else to take a look?
Comment 5 Jonathan Druart 2017-04-11 21:16:10 UTC
(In reply to Jonathan Druart from comment #4)
> I get much more errors that Jenkins's ones.
> Someone else to take a look?

Ok pass for me locally finally.
Comment 6 Jonathan Druart 2017-04-11 21:24:53 UTC
Tomas,

I get the following if I launch the tests manually on jenkins
t/db_dependent/www/search_utf8.t .. 9/66 Error GETing http://koha_16_11:8080/cgi-bin/koha/tools/background-job-progress.pl?jobID=741d649f9d4472fe75f30761ba2488c0: Bad Request at t/db_dependent/www/search_utf8.t line 170.

But nothing in the logs to debug. Any ideas?

I just see the apache access log which indeed returns a 400
koha_16_05:8080 127.0.0.1 - - [11/Apr/2017:20:54:24 +0000] "GET /cgi-bin/koha/tools/background-job-progress.pl?jobID=741d649f9d4472fe75f30761ba2488c0 HTTP/1.1" 400 0 "http://koha_16_11:8080/cgi-bin/koha/tools/stage-marc-import.pl" "Test-WWW-Mechanize/1.42"
Comment 7 Katrin Fischer 2017-05-14 12:00:49 UTC
Anything we can do here? Jenkins is still not happy.
Comment 8 Mark Tompsett 2017-06-09 23:23:06 UTC
(In reply to Katrin Fischer from comment #7)
> Anything we can do here? Jenkins is still not happy.

Have a partial fix?
Comment 9 Mark Tompsett 2017-06-09 23:28:24 UTC
Created attachment 64169 [details] [review]
Bug 18411: Fix one test.

TEST PLAN
---------
export KOHA_INTRANET_URL=...
prove -v t/db_dependent/www/search_utf8.t

something like seen before failure:
t/db_dependent/www/search_utf8.t .. 9/66 Error GETing http://koha_16_11:8080/cgi-bin/koha/tools/background-job-progress.pl?jobID=741d649f9d4472fe75f30761ba2488c0: Bad Request at t/db_dependent/www/search_utf8.t line 170.

apply this patch
prove -v t/db_dependent/www/search_utf8.t

Now it is the marc staging that is failing.
And that is failing in master for me.
So, I don't think it is the test that is a problem at this point,
but the actual staged marc records process.
Comment 10 Lee Jamison 2017-06-10 11:50:11 UTC
Created attachment 64172 [details] [review]
[SIGNED OFF] Bug 18411: Fix one test.

TEST PLAN
---------
export KOHA_INTRANET_URL=...
prove -v t/db_dependent/www/search_utf8.t

something like seen before failure:
t/db_dependent/www/search_utf8.t .. 9/66 Error GETing http://koha_16_11:8080/cgi-bin/koha/tools/background-job-progress.pl?jobID=741d649f9d4472fe75f30761ba2488c0: Bad Request at t/db_dependent/www/search_utf8.t line 170.

apply this patch
prove -v t/db_dependent/www/search_utf8.t

Now it is the marc staging that is failing.
And that is failing in master for me.
So, I don't think it is the test that is a problem at this point,
but the actual staged marc records process.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
I'm not sure why you had problems. All 66 tests passed
after patch application and the patch also passes QA Tools.
I tested this patch on a brand new kohadevbox without issue.
Comment 11 Jonathan Druart 2017-06-12 13:39:55 UTC
The tests pass for me, but the changes make sense (get only takes 1 parameter).
It will certainly not fix Jenkins failures.
Comment 12 Jonathan Druart 2017-06-12 13:41:07 UTC
Created attachment 64199 [details] [review]
Bug 18411: Fix failing search_utf8.t tests

TEST PLAN
---------
export KOHA_INTRANET_URL=...
prove -v t/db_dependent/www/search_utf8.t

something like seen before failure:
t/db_dependent/www/search_utf8.t .. 9/66 Error GETing http://koha_16_11:8080/cgi-bin/koha/tools/background-job-progress.pl?jobID=741d649f9d4472fe75f30761ba2488c0: Bad Request at t/db_dependent/www/search_utf8.t line 170.

apply this patch
prove -v t/db_dependent/www/search_utf8.t

Now it is the marc staging that is failing.
And that is failing in master for me.
So, I don't think it is the test that is a problem at this point,
but the actual staged marc records process.

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
I'm not sure why you had problems. All 66 tests passed
after patch application and the patch also passes QA Tools.
I tested this patch on a brand new kohadevbox without issue.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Mark Tompsett 2017-06-12 13:49:34 UTC
(In reply to Jonathan Druart from comment #11)
> The tests pass for me, but the changes make sense (get only takes 1
> parameter).
> It will certainly not fix Jenkins failures.

True, but as I said in comment #8 -- it's a partial fix. If someone could track down why it is failing for me, and not Lee, then we would have Jenkins fixed.
Comment 14 Jonathan Druart 2017-06-12 14:27:03 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 15 Fridolin Somers 2017-06-13 06:49:22 UTC
Pushed to 17.05.x, will be in 17.05.01
Comment 16 Katrin Fischer 2017-06-13 20:38:49 UTC
This patch has been pushed to 16.11.x and will be in 16.11.09.