[Bug 26250] New: Test suite does not pass if Elastic is used as search engine
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Bug ID: 26250 Summary: Test suite does not pass if Elastic is used as search engine Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: alex.arnaud@biblibre.com, martin.renvoize@ptfs-europe.com, nick@bywatersolutions.com, tomascohen@gmail.com This is a long standing issue we really need to address. Who is willing to help me with this one? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 108590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108590&action=edit Bug 26250: Fix tests when SearchEngine=Elastic Most of the time the tests are failing because the item is not created correctly (missing biblio and/or biblioitem). The usual error is: t/db_dependent/selenium/regressions.t ..... 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 534. In this patch we are making sure $builder->build({ source => 'Item' }) is replace with $builder->build_sample_item Test plan: Turn on Elastic and confirm that all the tests pass! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 108591 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108591&action=edit Bug 26250: StockRotationItems.t - wip StockRotationItems.t and StockRotationStages.t need to be fixed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We are very close here, only 2 test files are still failing. Can I get some help to fix them and have this awesome patch pushed to master ASAP? It will be a nightmare to rebase, we need it now! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 108623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108623&action=edit Bug 26250: StockRotationItems.t and StockRotationStages.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108591|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Thanks Martin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108623|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 108627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108627&action=edit Bug 26250: StockRotationItems.t and StockRotationStages.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108590|0 |1 is obsolete| | Attachment #108627|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108730&action=edit Bug 26250: Fix tests when SearchEngine=Elastic Most of the time the tests are failing because the item is not created correctly (missing biblio and/or biblioitem). The usual error is: t/db_dependent/selenium/regressions.t ..... 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 534. In this patch we are making sure $builder->build({ source => 'Item' }) is replace with $builder->build_sample_item Test plan: Turn on Elastic and confirm that all the tests pass! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 108731 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108731&action=edit Bug 26250: StockRotationItems.t and StockRotationStages.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have a QA script fail here: FAIL t/db_dependent/Koha/Patrons.t OK critic FAIL forbidden patterns forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 612) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 613) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 1427) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 1428) Hm, and some tests are failing? t/db_dependent/CourseReserves/CourseItems.t Test Summary Report ------------------- t/db_dependent/CourseReserves/CourseItems.t (Wstat: 1536 Tests: 35 Failed: 6) Failed tests: 2, 7, 12, 17, 22, 34 Non-zero exit status: 6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #9)
We have a QA script fail here:
FAIL t/db_dependent/Koha/Patrons.t OK critic FAIL forbidden patterns forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 612) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 613) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 1427) forbidden pattern: Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840) (line 1428)
That's not valid, the diff is: - AddIssue( $patron, $item_1->{barcode}, DateTime->now->subtract( days => 1 ) ); - AddIssue( $patron, $item_2->{barcode}, DateTime->now->subtract( days => 5 ) ); - AddIssue( $patron, $item_3->{barcode} ); + AddIssue( $patron, $item_1->barcode, DateTime->now->subtract( days => 1 ) ); + AddIssue( $patron, $item_2->barcode, DateTime->now->subtract( days => 5 ) ); + AddIssue( $patron, $item_3->barcode );
Hm, and some tests are failing? t/db_dependent/CourseReserves/CourseItems.t Test Summary Report ------------------- t/db_dependent/CourseReserves/CourseItems.t (Wstat: 1536 Tests: 35 Failed: 6) Failed tests: 2, 7, 12, 17, 22, 34 Non-zero exit status: 6
It passes for me :-/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have rerun the tests on a fresh setup and it looks much better now. I have an issue with the selenium tests in general sadly, so I am passing QA, but ask you to double check this one. Maybe you can also see what's going wrong, so posting my error too: prove t/db_dependent/selenium/regressions.t t/db_dependent/selenium/regressions.t .. Could not create new session: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: null,"translators":null,"contributors":null,"locales":["sk"]},{"name":"Википедија (sr)","description":"Претрага Википедије на српском језику","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["sr"]},{"name":"Wikipedia (af)","description":"Wikipedia, die vrye ensiklopedie","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["af"]},{"name":"ویکیپدیا (fa)","description":"ویکیپدیا، دانشنامهٔ آزاد","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["fa"]},{"name":"വിക്കിപീഡിയ (ml)","description":"വിക്കിപീഡിയ, സ്വതന്ത്ര സര്വ്വവിജ്ഞാനകോശം ","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["ml"]},{"name":"Wikipedia (ms)","description":"Wikipedia, ensiklopedia bebas","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["ms"]},{"name":"Wikipedia (ia)","description":"Wikipedia, le encyclopedia libere","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["ia"]},{"name":"Wikipedia (no)","description":"Wikipedia, den frie encyklopedi","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["NO"]},{"name":"Википедия (ru)","description":"Википедия, свободная энциклопедия","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["ru"]},{"name":"Wikipedia (br)","description":"Wikipedia, an holloueziadur digor","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["br"]},{"name":"Wikipedia (pl)","description":"Wikipedia, wolna encyklopedia","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["pl"]},{"name":"Вікіпэдыя (be-tarask)","description":"Вікіпэдыя, вольная энцыкляпэдыя","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["be-tarask"]},{"name":"ວິກິພີເດຍ (lo)","description":"ວິກິພີເດຍ, ສາລານຸກົມເສລີ","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["lo"]},{"name":"Wikipedia (sv)","description":"Wikipedia, den fria encyklopedin","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["sv-SE"]},{"name":"Vikipēdija","description":"Vikipēdija, brīvā enciklopēdija","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["lv"]},{"name":"Wikipedija (sl)","description":"Wikipedija, prosta enciklopedija","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["sl"]},{"name":"Biquipedia (an)","description":"A enciclopedia Libre","creator":null,"developers":null,"translators":null,"contributors":null,"locales":["an"]}],"targetApplications":[{"id":"toolkit@mozilla.org","minVersion":null,"maxVersion":null}],"targetPlatforms":[],"seen":true,"dependencies":[],"incognito":"spanning","userPermissions":{"permissions":[],"origins":[]},"icons":{"16":"favicon.ico"},"iconURL":null,"blocklistState":0,"blocklistURL":null,"startupData":null,"hidden":true,"installTelemetryInfo":null,"recommendationState":null,"rootURI":"resource://search-extensions/wikipedia/","location":"app-builtin"} 1598362999817 addons.xpi DEBUG Loading bootstrap scope from resource://search-extensions/wikipedia/ 1598362999817 addons.xpi DEBUG Calling bootstrap method install on wikipedia@search.mozilla.org version 1.0 1598362999817 addons.xpi DEBUG Calling bootstrap method startup on wikipedia@search.mozilla.org version 1.0 1598363019143 addons.productaddons INFO sending request to: https://aus5.mozilla.org/update/3/GMP/68.11.0/20200720181548/Linux_x86_64-gc... 1598363019578 addons.productaddons INFO Completed downloading document at /home/vagrant/kohaclone/t/lib/Selenium.pm line 58. Use of uninitialized value $value in string eq at /home/vagrant/kohaclone/C4/Context.pm line 529. # Looks like your test exited with 255 before it could output anything. t/db_dependent/selenium/regressions.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 5/5 subtests Test Summary Report ------------------- t/db_dependent/selenium/regressions.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 5 tests but ran 0. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108730|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 109208 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109208&action=edit Bug 26250: Fix tests when SearchEngine=Elastic Most of the time the tests are failing because the item is not created correctly (missing biblio and/or biblioitem). The usual error is: t/db_dependent/selenium/regressions.t ..... 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 534. In this patch we are making sure $builder->build({ source => 'Item' }) is replace with $builder->build_sample_item Test plan: Turn on Elastic and confirm that all the tests pass! Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #108731|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 109209 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109209&action=edit Bug 26250: StockRotationItems.t and StockRotationStages.t Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #11)
I have rerun the tests on a fresh setup and it looks much better now. I have an issue with the selenium tests in general sadly, so I am passing QA, but ask you to double check this one.
Maybe you can also see what's going wrong, so posting my error too:
I guess you are not using ktd but kohadevbox. It is one of the reason I moved to ktd, it was getting tricky to make the selenium tests pass. You should double check the selenium version, most of the time the problems come from there (you need 2.53.1) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Yes, the last one on kohadevbox it appears... but thx for the hint, I will check! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- doesnt apply clean to 20.05.x, no backport please rebase if needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 109838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109838&action=edit Bug 26250: Fix regressions.t when SearchEngine=ES Prior to this patch it failed with: t/db_dependent/selenium/regressions.t .. 5/5 Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 548. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Last patch pushed to master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26972 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org