From 0f692460b7c737490a32b9a1331cd9a2680357aa Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Thu, 5 Jan 2023 09:24:49 -0800 Subject: [PATCH] Updates method name Signed-off-by: Owais Kazi --- src/main/java/org/opensearch/sdk/SDKClient.java | 4 ++-- src/test/java/org/opensearch/sdk/TestSDKClient.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/opensearch/sdk/SDKClient.java b/src/main/java/org/opensearch/sdk/SDKClient.java index 06ae591ac..5c209762a 100644 --- a/src/main/java/org/opensearch/sdk/SDKClient.java +++ b/src/main/java/org/opensearch/sdk/SDKClient.java @@ -115,7 +115,7 @@ public RestHighLevelClient initializeRestClient(String hostAddress, int port) { * * @throws IOException if closing the restClient fails */ - public void doCloseRestClient() throws IOException { + public void doCloseJavaClient() throws IOException { if (restClient != null) { restClient.close(); } @@ -126,7 +126,7 @@ public void doCloseRestClient() throws IOException { * * @throws IOException if closing the highLevelClient fails */ - public void doCloseHLRClient() throws IOException { + public void doCloseRestClient() throws IOException { if (highLevelClient != null) { highLevelClient.close(); } diff --git a/src/test/java/org/opensearch/sdk/TestSDKClient.java b/src/test/java/org/opensearch/sdk/TestSDKClient.java index b8ade6ffd..6998be0e5 100644 --- a/src/test/java/org/opensearch/sdk/TestSDKClient.java +++ b/src/test/java/org/opensearch/sdk/TestSDKClient.java @@ -40,7 +40,7 @@ public void testCreateJavaClient() throws Exception { ) ); - sdkClient.doCloseRestClient(); + sdkClient.doCloseJavaClient(); } @Test @@ -54,7 +54,7 @@ public void testCreateHighLevelRestClient() throws Exception { assertThrows(ConnectException.class, () -> testClient.indices().create(createIndexRequest, RequestOptions.DEFAULT)); - sdkClient.doCloseHLRClient(); + sdkClient.doCloseRestClient(); }