Skip to content

Commit

Permalink
Forces HTTP1 version policy for local clusters
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Feb 8, 2024
1 parent 6f02a20 commit 2f35225
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2f35225

Please sign in to comment.