Skip to content

Commit 2365afc

Browse files
fix building error http core5 diverging between main and 2x (#2278) (#2280)
Signed-off-by: Jing Zhang <[email protected]> (cherry picked from commit cbbff4b) Co-authored-by: Jing Zhang <[email protected]>
1 parent c52b63a commit 2365afc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

plugin/src/test/java/org/opensearch/ml/rest/RestMLGuardrailsIT.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
import java.util.List;
1010
import java.util.Map;
1111

12-
import org.apache.hc.core5.http.HttpEntity;
13-
import org.apache.hc.core5.http.HttpHeaders;
14-
import org.apache.hc.core5.http.message.BasicHeader;
12+
import org.apache.http.HttpEntity;
1513
import org.junit.Before;
1614
import org.junit.Rule;
1715
import org.junit.rules.ExpectedException;
@@ -22,7 +20,6 @@
2220
import org.opensearch.ml.utils.TestData;
2321
import org.opensearch.ml.utils.TestHelper;
2422

25-
import com.google.common.collect.ImmutableList;
2623
import com.google.common.collect.ImmutableMap;
2724

2825
public class RestMLGuardrailsIT extends MLCommonsRestTestCase {
@@ -159,7 +156,7 @@ protected void createStopWordsIndex() throws IOException {
159156
"_bulk?refresh=true",
160157
null,
161158
TestHelper.toHttpEntity(TestData.STOP_WORDS_DATA.replaceAll("stop_words", indexName)),
162-
ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, ""))
159+
null
163160
);
164161

165162
Response statsResponse = TestHelper.makeRequest(client(), "GET", indexName, ImmutableMap.of(), "", null);
@@ -255,7 +252,7 @@ protected void disableClusterConnectorAccessControl() throws IOException {
255252
"_cluster/settings",
256253
null,
257254
"{\"persistent\":{\"plugins.ml_commons.connector_access_control_enabled\":false, \"plugins.ml_commons.sync_up_job_interval_in_seconds\":3}}",
258-
ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, ""))
255+
null
259256
);
260257
assertEquals(200, response.getStatusLine().getStatusCode());
261258
}

0 commit comments

Comments
 (0)