From a879e5b89e6ca527018eed5e2baa65871ffc6e0b 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 --- 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.11.0