From 977089490dbc4418e5a8b5e97471918399a34b90 Mon Sep 17 00:00:00 2001 From: zhichao-aws Date: Wed, 27 Sep 2023 14:49:38 +0800 Subject: [PATCH] Fix the compile error in [Backport/backport 333 to 2.x] (#344) * fix apache http version Signed-off-by: zhichao-aws * add import Signed-off-by: zhichao-aws --------- Signed-off-by: zhichao-aws --- .../neuralsearch/common/BaseSparseEncodingIT.java | 6 +++--- .../neuralsearch/ml/MLCommonsClientAccessorTests.java | 1 + .../neuralsearch/processor/SparseEncodingProcessIT.java | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/opensearch/neuralsearch/common/BaseSparseEncodingIT.java b/src/test/java/org/opensearch/neuralsearch/common/BaseSparseEncodingIT.java index d0231cfe6..4395bbfcd 100644 --- a/src/test/java/org/opensearch/neuralsearch/common/BaseSparseEncodingIT.java +++ b/src/test/java/org/opensearch/neuralsearch/common/BaseSparseEncodingIT.java @@ -13,9 +13,9 @@ import lombok.SneakyThrows; -import org.apache.hc.core5.http.HttpHeaders; -import org.apache.hc.core5.http.io.entity.EntityUtils; -import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.http.HttpHeaders; +import org.apache.http.message.BasicHeader; +import org.apache.http.util.EntityUtils; import org.opensearch.client.Request; import org.opensearch.client.Response; import org.opensearch.common.xcontent.XContentFactory; diff --git a/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java b/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java index 89bd3b89a..1b10966dc 100644 --- a/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java +++ b/src/test/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessorTests.java @@ -13,6 +13,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Map; import org.junit.Before; import org.mockito.ArgumentCaptor; diff --git a/src/test/java/org/opensearch/neuralsearch/processor/SparseEncodingProcessIT.java b/src/test/java/org/opensearch/neuralsearch/processor/SparseEncodingProcessIT.java index 0312eaef7..51bdf3acc 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/SparseEncodingProcessIT.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/SparseEncodingProcessIT.java @@ -11,9 +11,9 @@ import lombok.SneakyThrows; -import org.apache.hc.core5.http.HttpHeaders; -import org.apache.hc.core5.http.io.entity.EntityUtils; -import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.http.HttpHeaders; +import org.apache.http.message.BasicHeader; +import org.apache.http.util.EntityUtils; import org.junit.After; import org.junit.Before; import org.opensearch.client.Response;