From 5fa47568d596443eaceb380d1694ad08cf6ce102 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 27 Aug 2020 15:03:17 +0000 Subject: [PATCH] Bug 26309: Make cxn_pool configurable In get_elasticsearch_params we set the conf to static if undefined, but we never defined it To test: 1 - Apply unit test patch 2 - prove -v t/Koha/SearchEngine/Elasticsearch.t 3 - It fails 4 - Apply this patch 5 - It succeeds Signed-off-by: Fridolin Somers Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit b87dc492fe4ea009ad3c72aca43add0515d6da1c) Signed-off-by: Lucas Gass --- Koha/SearchEngine/Elasticsearch.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index a43b864145..b518405cf5 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -140,13 +140,8 @@ sub get_elasticsearch_params { croak($_->message); } }; - # Extract relevant parts of configuration - my $params = { - nodes => $conf->{nodes} - }; - $params->{cxn_pool} //= 'Static'; - return $params; + return $conf } =head2 get_elasticsearch_settings @@ -1256,6 +1251,8 @@ sub _read_configuration { ); } + $configuration->{cxn_pool} = $conf->{cxn_pool} // 'Static'; + return $configuration; } -- 2.39.5