Summary: | QueryParser fails tests | ||
---|---|---|---|
Product: | Koha | Reporter: | Colin Campbell <colin.campbell> |
Component: | Searching | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jcamins, mtj, simanta.s, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 12742 | ||
Attachments: |
Bug 12647: PQF QueryParser driver and unit tests fixes
Bug 12647: PQF QueryParser driver and unit tests fixes [PASSED QA] Bug 12647: PQF QueryParser driver and unit tests fixes |
Description
Colin Campbell
2014-07-24 09:14:30 UTC
Created attachment 30638 [details] [review] Bug 12647: PQF QueryParser driver and unit tests fixes Due to Perl 5.18, QueryParser the default search class is no longer 'keyword' (see bug 12738), and needs to be set manually. This patch adds a line that does that. The problem that gets fixed is with test 'super simple keyword query'. The rest of the non-deterministically failing tests are due to the same problem, keys returning differently sorted keys from hashes. So this patch sorts keys in the step that concatenates attributes when building the PQF queries (and tests get adjusted to match the now deterministic result). I did that (sorting there) under Jared's recommendation. Hopefuly he will step in and comment/fix any mistake I made. My main concern was a possible loss in performance. That we agreed it is almost void, because of the tiny size of the hash. Sponsored-by: Universidad Nacional de Cordoba *** Bug 12182 has been marked as a duplicate of this bug. *** Created attachment 30666 [details] [review] Bug 12647: PQF QueryParser driver and unit tests fixes Due to Perl 5.18, QueryParser the default search class is no longer 'keyword' (see bug 12738), and needs to be set manually. This patch adds a line that does that. The problem that gets fixed is with test 'super simple keyword query'. The rest of the non-deterministically failing tests are due to the same problem, keys returning differently sorted keys from hashes. So this patch sorts keys in the step that concatenates attributes when building the PQF queries (and tests get adjusted to match the now deterministic result). I did that (sorting there) under Jared's recommendation. Hopefuly he will step in and comment/fix any mistake I made. My main concern was a possible loss in performance. That we agreed it is almost void, because of the tiny size of the hash. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Created attachment 30671 [details] [review] [PASSED QA] Bug 12647: PQF QueryParser driver and unit tests fixes Due to Perl 5.18, QueryParser the default search class is no longer 'keyword' (see bug 12738), and needs to be set manually. This patch adds a line that does that. The problem that gets fixed is with test 'super simple keyword query'. The rest of the non-deterministically failing tests are due to the same problem, keys returning differently sorted keys from hashes. So this patch sorts keys in the step that concatenates attributes when building the PQF queries (and tests get adjusted to match the now deterministic result). I did that (sorting there) under Jared's recommendation. Hopefuly he will step in and comment/fix any mistake I made. My main concern was a possible loss in performance. That we agreed it is almost void, because of the tiny size of the hash. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests are passing now again :) Patch pushed to master. Pushed to 3.16.x, will be in 3.16.13 (In reply to Mason James from comment #6) > Pushed to 3.16.x, will be in 3.16.13 A recent VM upgrade to perl-5.20/deb8 seems to have caused this test to fail, for 3.16.x |