Summary: | Search.t is failing if run after Filter_MARC_ViewPolicy.t | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, martin.renvoize, pedro.amorim, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.05.00,22.11.07
|
|
Bug Depends on: | 28373 | ||
Bug Blocks: | 25551 | ||
Attachments: |
Bug 32648: Avoid skipping record or hiding item
Bug 32648: Avoid skipping record or hiding item Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t |
Description
Jonathan Druart
2023-01-17 14:23:41 UTC
Koha_Master/2448 Created attachment 149026 [details] [review] Bug 32648: Avoid skipping record or hiding item It seems that depending on other tests, the item could be hidden from the record, or the entire record hidden because of the way we count hidden items. I add a mock for the two HIddenItems prefs and hardcode an xml record to avoid problematic data from test builder Created attachment 149029 [details] [review] Bug 32648: Avoid skipping record or hiding item It seems that depending on other tests, the item could be hidden from the record, or the entire record hidden because of the way we count hidden items. I add a mock for the two HIddenItems prefs and hardcode an xml record to avoid problematic data from test builder Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Thanks! Pushed to master for 23.05. Nice work everyone, thanks! Still failing Koha_Master_MDB_Latest/1286 Nice work, thanks everyone! Pushed to 22.11.x for the next release. Looks like it didn't work 00:19:24 koha_1 | # Failed test 'Item field returned from default XSLT if pref set' 00:19:24 koha_1 | # at t/Search.t line 239. 00:19:24 koha_1 | # found warning: No item at t/Search.t line 186. 00:19:24 koha_1 | # expected to find warning: (?^u:Item here) 00:19:24 koha_1 | # Looks like you failed 1 test of 2. 00:19:24 koha_1 | 00:19:24 koha_1 | # Failed test 'searchResults PassItemMarcToXSLT test' 00:19:24 koha_1 | # at t/Search.t line 248. 00:19:24 koha_1 | # Looks like you failed 1 test of 4. (In reply to Jonathan Druart from comment #8) > Looks like it didn't work > > 00:19:24 koha_1 | # Failed test 'Item field returned from > default XSLT if pref set' > 00:19:24 koha_1 | # at t/Search.t line 239. > 00:19:24 koha_1 | # found warning: No item at t/Search.t line 186. > 00:19:24 koha_1 | # expected to find warning: (?^u:Item here) > 00:19:24 koha_1 | # Looks like you failed 1 test of 2. > 00:19:24 koha_1 | > 00:19:24 koha_1 | # Failed test 'searchResults PassItemMarcToXSLT > test' > 00:19:24 koha_1 | # at t/Search.t line 248. > 00:19:24 koha_1 | # Looks like you failed 1 test of 4. Koha_Master_My8/1213 I've reused the same order as in https://jenkins.koha-community.org/job/Koha_Master_My8/1213/consoleText And I managed to make it fails. So it's data related (and note that it's wrongly in t instead of t/db_dependent!) Will need to investigate later. To recreate run this script: https://pastebin.com/t1qmfJcS Some debugging here, 245$a (and I think all other fields and so 952$*) had visibility=8 and so considered hidden. flush_memcached made the tests pass. We are missing a flush in another tests, but this also means that this test does not set properly the data it needs. Created attachment 151199 [details] [review] Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t Search.t is failing if run after Filter_MARC_ViewPolicy.t because of a missing flush Created attachment 151239 [details] [review] Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t Search.t is failing if run after Filter_MARC_ViewPolicy.t because of a missing flush Signed-off-by: David Nind <david@davidnind.com> Testing notes (using KTD): 1. The main patch for this bug is already in master. 2. Before applying the additional patch: - run prove t/db_dependent/Filter_MARC_ViewPolicy.t then prove t/Search.t => t/Search.t tests will fail - run prove t/db_dependent/Filter_MARC_ViewPolicy.t then flush_memcached and then prove t/Search.t => tests pass 3. Apply the second patch and then run prove t/db_dependent/Filter_MARC_ViewPolicy.t then prove t/Search.t => tests will now pass without the flush_memcached between running the tests Created attachment 151243 [details] [review] Bug 32648: Clear cache in Filter_MARC_ViewPolicy.t Search.t is failing if run after Filter_MARC_ViewPolicy.t because of a missing flush Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Back to PQA to get the follow-up pushed.. all works as desired Follow-up pushed to master for 23.05. Nice work everyone! Pushed to 22.11.x for next release Follow-up pushed to 22.11.07 |