Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t
Summary: Silence non-zebra warnings in t/db_dependent/Search.t
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: Mark Tompsett
QA Contact: Marcel de Rooy
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2016-11-21 17:19 UTC by Mark Tompsett
Modified: 2019-10-14 19:56 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t (2.13 KB, patch)
2016-11-21 17:39 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t (2.23 KB, patch)
2017-08-25 03:16 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t (2.29 KB, patch)
2017-09-09 01:44 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t (2.38 KB, patch)
2017-10-06 05:47 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Tompsett 2016-11-21 17:19:11 UTC
Run prove t/db_dependent/Search.t and there are non-zebra warnings which could be easily solved.
Comment 1 Mark Tompsett 2016-11-21 17:32:19 UTC
The use of caching in bug 17638 prevents the 'template' errors from occurring in master, but Koha::Cache is not in 16.05.x.
Comment 2 Mark Tompsett 2016-11-21 17:39:50 UTC
Created attachment 57686 [details] [review]
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- notice spammy warnings (other than zebra index warnings)
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools
Comment 3 Mark Tompsett 2016-11-21 17:54:07 UTC
Comment on attachment 57686 [details] [review]
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

Review of attachment 57686 [details] [review]:
-----------------------------------------------------------------

::: Koha/QueryParser/Driver/PQF/query_plan/node.pm
@@ +49,4 @@
>          foreach my $field (@{$self->fields}) {
>              $fieldobj = $self->plan->QueryParser->bib1_mapping_by_name('field', $self->classname, $field, $server);
>              $relbump = $self->plan->QueryParser->bib1_mapping_by_name('relevance_bump', $self->classname, $field, $server);
> +            if ($relbump && defined $relbump->{'attr_string'}) {

This could be added to master, but I don't know how to trigger or test it. :)
Comment 4 Jonathan Druart 2017-07-26 17:49:23 UTC
Is this only for 16.05?
Comment 5 Mark Tompsett 2017-07-26 20:52:55 UTC
(In reply to Jonathan Druart from comment #4)
> Is this only for 16.05?

The comment #3 part still applies, I think to master. I just don't know how to trigger it. Changing to master and giving this back to the community to do.
Comment 6 Alex Buckley 2017-07-30 19:38:16 UTC
Hi

Can you please merge this patch with the current master as I get this merge error whilst applying


57686 - Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t
Using index info to reconstruct a base tree...
M	t/db_dependent/Search.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Search.t
CONFLICT (content): Merge conflict in t/db_dependent/Search.t
Failed to merge in the changes.
Patch failed at 0001 Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-17664---Silence-non-zebra-warnings-in-tdbdepen-lNEMGe.patch
Comment 7 Mark Tompsett 2017-08-25 03:16:59 UTC
Created attachment 66431 [details] [review]
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- the spammy warnings (other than zebra index warnings) may
      already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools
Comment 8 Alex Buckley 2017-09-09 01:44:46 UTC
Created attachment 67027 [details] [review]
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- the spammy warnings (other than zebra index warnings) may
      already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 9 Marcel de Rooy 2017-10-06 05:47:55 UTC
Created attachment 67665 [details] [review]
Bug 17664 - Silence non-zebra warnings in t/db_dependent/Search.t

TEST PLAN
---------
0) back up database
1) drop database; create database
2) run web installer
3) prove t/db_dependent/Search.t
   -- the spammy warnings (other than zebra index warnings) may
      already be fixed, but the mocked value was not realistic.
4) apply patch
5) prove t/db_dependent/Search.t
   -- notice only zebra index warnings.
6) run qa test tools

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Jonathan Druart 2017-10-06 15:17:14 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 11 Fridolin Somers 2017-10-27 13:27:49 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 12 Katrin Fischer 2017-10-29 18:53:45 UTC
This patch has been pushed to 16.11.x and will be in 16.11.14.
Comment 13 Mason James 2017-11-23 23:24:19 UTC
Pushed to 16.05.x, for 16.05.19 release