From 2f35225a55e779c293aceaa568ecb77b2441a811 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 8 Feb 2024 10:41:20 -0500 Subject: [PATCH] Forces HTTP1 version policy for local clusters Signed-off-by: Darshit Chanpura --- .../org/opensearch/replication/MultiClusterRestTestCase.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt b/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt index eca8750f..090bdf00 100644 --- a/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt +++ b/src/test/kotlin/org/opensearch/replication/MultiClusterRestTestCase.kt @@ -27,6 +27,7 @@ import org.apache.hc.core5.http.message.BasicHeader import org.apache.hc.core5.http.io.entity.StringEntity import org.apache.hc.core5.ssl.SSLContexts import org.apache.hc.core5.http.io.entity.EntityUtils +import org.apache.hc.core5.http2.HttpVersionPolicy import org.apache.hc.core5.util.Timeout import org.apache.lucene.util.SetOnce import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest @@ -102,6 +103,7 @@ abstract class MultiClusterRestTestCase : OpenSearchTestCase() { val builder = RestClient.builder(*httpHosts.toTypedArray()).setHttpClientConfigCallback { httpAsyncClientBuilder -> httpAsyncClientBuilder.setConnectionManager(connManager) + httpAsyncClientBuilder.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_1) } configureClient(builder, getClusterSettings(clusterName), securityEnabled) builder.setStrictDeprecationMode(false)