Skip to content

Commit

Permalink
Make sure we close the RestClient at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
dadoonet committed Jul 4, 2020
1 parent 928273d commit 8d3bbf3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void restClientSecuredClusterHealth() throws IOException {
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(ELASTICSEARCH_USERNAME, ELASTICSEARCH_PASSWORD));

RestClient client = RestClient.builder(HttpHost.create(container.getHttpHostAddress()))
client = RestClient.builder(HttpHost.create(container.getHttpHostAddress()))
.setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider))
.build();

Expand Down

0 comments on commit 8d3bbf3

Please sign in to comment.