Bug 25641 - Koha/XSLT/Base.t is failing on U20
Summary: Koha/XSLT/Base.t is failing on U20
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 25640
  Show dependency treegraph
 
Reported: 2020-06-01 10:53 UTC by Jonathan Druart
Modified: 2021-06-14 21:31 UTC (History)
7 users (show)

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


Attachments
Bug 25641: Fix Koha/XSLT/Base.t failures on U20 (2.61 KB, patch)
2020-06-01 10:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25641: Fix Koha/XSLT/Base.t failures on U20 (2.67 KB, patch)
2020-06-06 03:06 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 25641: [19.11.x] Fix XSLT_Handler.t failures on U20 (2.22 KB, patch)
2020-08-19 12:51 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 Jonathan Druart 2020-06-01 10:53:31 UTC
kohadev-koha@a72d3d9a1f4d:/kohadevbox/koha$ prove  t/db_dependent/Koha/XSLT/Base.t      
t/db_dependent/Koha/XSLT/Base.t .. 1/33 
#   Failed test 'Malformed XML warning correctly displayed'
#   at t/db_dependent/Koha/XSLT/Base.t line 87.
# found warning: XSLT::Base: :1: parser error : Opening and ending tag mismatch: a line 0 and b
# expected to find warning: (?^u:parser error : Opening and ending tag mismatch: a line 1 and b)

#   Failed test 'Malformed XML warning correctly displayed'
#   at t/db_dependent/Koha/XSLT/Base.t line 99.
# found warning: XSLT::Base: :1: parser error : Opening and ending tag mismatch: a line 0 and b
# expected to find warning: (?^u:parser error : Opening and ending tag mismatch: a line 1 and b)

#   Failed test 'Malformed XML warning correctly displayed'
#   at t/db_dependent/Koha/XSLT/Base.t line 104.
# found warning: XSLT::Base: :1: parser error : Opening and ending tag mismatch: a line 0 and b
# expected to find warning: (?^u:parser error : Opening and ending tag mismatch: a line 1 and b)

#   Failed test 'Malformed XML warning correctly displayed'
#   at t/db_dependent/Koha/XSLT/Base.t line 110.
# found warning: XSLT::Base: :1: parser error : Opening and ending tag mismatch: a line 0 and b
# expected to find warning: (?^u:parser error : Opening and ending tag mismatch: a line 1 and b)
# Looks like you failed 4 tests of 33.
t/db_dependent/Koha/XSLT/Base.t .. Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/33 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/XSLT/Base.t (Wstat: 1024 Tests: 33 Failed: 4)
  Failed tests:  10, 12, 14, 16
  Non-zero exit status: 4
Files=1, Tests=33,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.44 cusr  0.04 csys =  0.52 CPU)
Result: FAIL
Comment 1 Jonathan Druart 2020-06-01 10:56:03 UTC
Created attachment 105469 [details] [review]
Bug 25641: Fix Koha/XSLT/Base.t failures on U20

There is a change in the version number.
On U20 we get
  Opening and ending tag mismatch: a line 0 and b
On others (D9, D10, U18) we get:
  Opening and ending tag mismatch: a line 1 and b

I did not find where it did come from, so assuming it's just a minor
change and won't have side-effects.

Test plan:
Make sure the tests pass on U20 and another OS
Comment 2 Mason James 2020-06-02 11:23:19 UTC
(In reply to Jonathan Druart from comment #1)
> Created attachment 105469 [details] [review] [review]
> Bug 25641: Fix Koha/XSLT/Base.t failures on U20
> 
> There is a change in the version number.
> On U20 we get
>   Opening and ending tag mismatch: a line 0 and b
> On others (D9, D10, U18) we get:
>   Opening and ending tag mismatch: a line 1 and b
> 
> I did not find where it did come from, so assuming it's just a minor
> change and won't have side-effects.
> 
> Test plan:
> Make sure the tests pass on U20 and another OS

hi, i've seen the same error on deb11 too

https://jenkins.koha-community.org/job/Koha_Master_D11/2/
https://jenkins.koha-community.org/job/Koha_Master_D11/2/testReport/junit/(root)/t_db_dependent_Koha_XSLT_Base_t/Malformed_XML_warning_correctly_displayed__2075_/


not ok 10 - Malformed XML warning correctly displayed
ok 11 - Engine returns error on malformed xml
not ok 12 - Malformed XML warning correctly displayed
ok 13 - Engine respects do_not_return_source==1
not ok 14 - Malformed XML warning correctly displayed
ok 15 - Second engine respects it too
not ok 16 - Malformed XML warning correctly displayed
Comment 3 Victor Grousset/tuxayo 2020-06-06 03:06:50 UTC
Created attachment 105606 [details] [review]
Bug 25641: Fix Koha/XSLT/Base.t failures on U20

There is a change in the version number.
On U20 we get
  Opening and ending tag mismatch: a line 0 and b
On others (D9, D10, U18) we get:
  Opening and ending tag mismatch: a line 1 and b

I did not find where it did come from, so assuming it's just a minor
change and won't have side-effects.

Test plan:
Make sure the tests pass on U20 and another OS

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2020-06-06 03:11:10 UTC
It works! (U20, D10, D11)
Comment 5 Jonathan Druart 2020-06-07 10:00:05 UTC
Skipping QA, I want this one pushed.
Comment 6 Jonathan Druart 2020-06-07 10:03:29 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Marcel de Rooy 2020-06-12 07:19:01 UTC
Is U20 counting lines in a file from 0 now ?
Maybe we should just use \d+ ? The line number is not really relevant..
Comment 8 Jonathan Druart 2020-06-12 07:24:11 UTC
That's how I fixed it at the beginning. But then it sounded more accurate to test 0|1.
Comment 9 Lucas Gass 2020-06-16 21:44:40 UTC
backported to 20.05.x for 20.05.01
Comment 10 Aleisha Amohia 2020-06-16 22:42:28 UTC
t/db_dependent/Koha/XSLT/Base.t is not in 19.11.x, not backporting
Comment 11 Jonathan Druart 2020-08-19 12:51:20 UTC
Created attachment 108622 [details] [review]
Bug 25641: [19.11.x] Fix XSLT_Handler.t failures on U20
Comment 12 Jonathan Druart 2020-08-19 12:51:33 UTC
(In reply to Aleisha Amohia from comment #10)
> t/db_dependent/Koha/XSLT/Base.t is not in 19.11.x, not backporting

This test was failing on Koha_19.11_U20 #59

Here is a patch for 19.11.x
Comment 13 Aleisha Amohia 2020-08-19 22:05:27 UTC
backported second patch to 19.11.x for 19.11.09
Comment 14 Victor Grousset/tuxayo 2020-09-20 15:01:33 UTC
Backported to 19.05.x branch for 19.05.15