Bug 33214

Summary: Make sure cache is cleared properly
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi <tomascohen>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: martin.renvoize, tomascohen
Version: Main   
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.04
Bug Depends on: 30920    
Bug Blocks:    
Attachments: Bug 33214: Make tests use random data and clear the cache
Bug 33214: Make tests use random data and clear the cache
Bug 33214: (follow-up) Consistency on key names
Bug 33214: (follow-up) Make tests less fragile

Description Tomás Cohen Arazi 2023-03-13 17:21:40 UTC
We are seeing some random failures in which the calculated AV values are not correct. It all points to cache:

https://jenkins.koha-community.org/job/Koha_Master/lastCompletedBuild/console
Comment 1 Tomás Cohen Arazi 2023-03-13 17:31:54 UTC
Created attachment 148132 [details] [review]
Bug 33214: Make tests use random data and clear the cache

This trivial patch removes some wrongly hardcoded bits, and makes the
tests also clear the cache before and after being run.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Kyle M Hall 2023-03-13 17:48:50 UTC
Created attachment 148134 [details] [review]
Bug 33214: Make tests use random data and clear the cache

This trivial patch removes some wrongly hardcoded bits, and makes the
tests also clear the cache before and after being run.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Tomás Cohen Arazi 2023-03-13 18:13:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 4 Tomás Cohen Arazi 2023-03-13 19:53:55 UTC
Created attachment 148143 [details] [review]
Bug 33214: (follow-up) Consistency on key names

This patch makes GetAuthorisedValueDesc used cache keys match what we
discussed on the bug, which seems to have been lost on some rebase and
highlighted by failing tests.

I also add some more cache flushes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi 2023-03-13 19:53:57 UTC
Created attachment 148144 [details] [review]
Bug 33214: (follow-up) Make tests less fragile

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi 2023-03-13 20:04:47 UTC
(In reply to Tomás Cohen Arazi from comment #3)
> Pushed to master for 22.11.

Oops, outdated config on the laptop!
Comment 7 Martin Renvoize 2023-03-14 07:07:28 UTC
Thanks for working through these Tomas, great spot on the rebase issue.. weird, that somehow crept in.
Comment 8 Matt Blenkinsop 2023-03-14 10:44:44 UTC
Nice work everyone!

Pushed to stable for 22.11.x