From e10b9d1cf0ed369de67645325fdda2038b500b64 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 --- 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 24ff497e27..3183e1d910 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -141,13 +141,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 @@ -1261,6 +1256,8 @@ sub _read_configuration { ); } + $configuration->{cxn_pool} = $conf->{cxn_pool} // 'Static'; + return $configuration; } -- 2.27.0