Bug 31992 - t::lib::Mocks::Zebra still using old stage for import page
Summary: t::lib::Mocks::Zebra still using old stage for import page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: rel_22_11_candidate
Depends on: 27421 31162
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-26 14:29 UTC by Jonathan Druart
Modified: 2023-06-08 22:28 UTC (History)
4 users (show)

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


Attachments
Bug 31992: Fix t::lib::Mocks::Zebra (9.82 KB, patch)
2022-10-26 15:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31992: Fix t::lib::Mocks::Zebra (9.73 KB, patch)
2022-10-26 15:44 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31992: Fix t::lib::Mocks::Zebra (10.74 KB, patch)
2022-10-27 07:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31992: Fix t::lib::Mocks::Zebra (10.80 KB, patch)
2022-10-28 07:22 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-10-26 14:29:30 UTC
This has been forgotten by bug 27421.

And there is a ref to background-job-progress.pl
Comment 1 Jonathan Druart 2022-10-26 15:35:12 UTC
Created attachment 142674 [details] [review]
Bug 31992: Fix t::lib::Mocks::Zebra
Comment 2 Jonathan Druart 2022-10-26 15:35:22 UTC
It's not working, I think I am missing a step in the import.
I need to leave for today, so letting this patch here, in case someone wants to give it a try.
Comment 3 Jonathan Druart 2022-10-26 15:44:35 UTC
Created attachment 142675 [details] [review]
Bug 31992: Fix t::lib::Mocks::Zebra
Comment 4 Jonathan Druart 2022-10-27 07:39:02 UTC
Created attachment 142695 [details] [review]
Bug 31992: Fix t::lib::Mocks::Zebra

This will fix t/db_dependent/www/batch.t and t/db_dependent/www/search_utf8.t

QA - improvement ideas welcome! It's definitely not the best we can do.

Test plan:
  prove t/db_dependent/www/search_utf8.t t/db_dependent/www/batch.t
must return green
Comment 5 David Nind 2022-10-27 10:37:51 UTC
Getting a sha1 error when applying th epatch:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 31992: Fix t::lib::Mocks::Zebra
error: sha1 information is lacking or useless (t/db_dependent/www/batch.t).
error: could not build fake ancestor
Patch failed at 0001 Bug 31992: Fix t::lib::Mocks::Zebra
Comment 6 Jonathan Druart 2022-10-27 11:20:06 UTC
(In reply to David Nind from comment #5)
> Getting a sha1 error when applying th epatch:
> 
> Apply? [(y)es, (n)o, (i)nteractive] y
> Applying: Bug 31992: Fix t::lib::Mocks::Zebra
> error: sha1 information is lacking or useless (t/db_dependent/www/batch.t).
> error: could not build fake ancestor
> Patch failed at 0001 Bug 31992: Fix t::lib::Mocks::Zebra

It needs the last 2 follow-ups from bug 31162.
Comment 7 Tomás Cohen Arazi 2022-10-27 11:31:31 UTC
(In reply to Jonathan Druart from comment #6)
> (In reply to David Nind from comment #5)
> > Getting a sha1 error when applying th epatch:
> > 
> > Apply? [(y)es, (n)o, (i)nteractive] y
> > Applying: Bug 31992: Fix t::lib::Mocks::Zebra
> > error: sha1 information is lacking or useless (t/db_dependent/www/batch.t).
> > error: could not build fake ancestor
> > Patch failed at 0001 Bug 31992: Fix t::lib::Mocks::Zebra
> 
> It needs the last 2 follow-ups from bug 31162.

Pushed to master.
Comment 8 David Nind 2022-10-27 19:01:26 UTC
Tests are failing for me:

prove -v t/db_dependent/www/search_utf8.t
t/db_dependent/www/search_utf8.t .. 
1..0 # SKIP Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests
Can't call method "cleanup" on an undefined value at t/db_dependent/www/search_utf8.t line 188.
END failed--call queue aborted.
# Looks like your test exited with 22 before it could output anything.
skipped: Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests

Test Summary Report
-------------------
t/db_dependent/www/search_utf8.t (Wstat: 5632 Tests: 0 Failed: 0)
  Non-zero exit status: 22
Files=1, Tests=0,  1 wallclock secs ( 0.03 usr  0.00 sys +  1.03 cusr  0.08 csys =  1.14 CPU)
Result: FAIL


prove -v t/db_dependent/www/batch.t
t/db_dependent/www/batch.t .. Warning: <retrieval> element has non-unique value in 'name' key attribute: F at t/db_dependent/www/batch.t line 35.
Warning: <retrieval> element has non-unique value in 'name' key attribute: B at t/db_dependent/www/batch.t line 35.

1..24
Error GETing /cgi-bin/koha/mainpage.pl: URL must be absolute at /kohadevbox/koha/t/lib/Mocks/Zebra.pm line 131.
# Looks like your test exited with 255 before it could output anything.
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 24/24 subtests 

Test Summary Report
-------------------
t/db_dependent/www/batch.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 24 tests but ran 0.
Files=1, Tests=0,  1 wallclock secs ( 0.02 usr  0.01 sys +  1.15 cusr  0.07 csys =  1.25 CPU)
Result: FAIL
Comment 9 Martin Renvoize 2022-10-28 07:22:26 UTC
Created attachment 142745 [details] [review]
Bug 31992: Fix t::lib::Mocks::Zebra

This will fix t/db_dependent/www/batch.t and t/db_dependent/www/search_utf8.t

QA - improvement ideas welcome! It's definitely not the best we can do.

Test plan:
  prove t/db_dependent/www/search_utf8.t t/db_dependent/www/batch.t
must return green

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2022-10-28 07:24:48 UTC
I had to reset_all on ktd before these tests would pass.. but that's not unreasonable.. I think I had some cleanup issues before testing.

It took a little while to wrap my head around the changes, but they do make sense.  I couldn't come up with a nicer way to do the sleep either :(/

Signing off and will continue to ponder if there are improvements to be made.. one to keep refining I think,  but I'd be tempted to push what we have to clear the wood for the tree's to spot other failing tests down the line before release.
Comment 11 Jonathan Druart 2022-10-28 07:30:22 UTC
(In reply to David Nind from comment #8)

Try in a koha-shell, it will set KOHA_INTRANET_URL.
Comment 12 Victor Grousset/tuxayo 2022-10-28 17:22:48 UTC
(In reply to Jonathan Druart from comment #11)
> (In reply to David Nind from comment #8)
> 
> Try in a koha-shell, it will set KOHA_INTRANET_URL.

Same issue, thanks a lot. That's a precious info, I got to document this for RMaints also. When running test locally, me Fridolin and Kyle always had some test failing. Most were the www ones. So finally we know the cause and the fix, thanks again!
Comment 13 Tomás Cohen Arazi 2022-10-28 19:48:01 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!