Make Rest-High-Rest-Level tests allow deprecation warning temporarily, during deprecation of request parameter 'master_timeout' (#2702)

Temporarily build rest client with setStrictDeprecationMode(false) to allow 
deprecation warning in HLRC tests while master_timeout parameters is
being refactored.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
This commit is contained in:
Tianli Feng 2022-04-04 08:22:22 -07:00 committed by GitHub
parent 6c195abc59
commit 6a2a33d187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -824,7 +824,8 @@ public abstract class OpenSearchRestTestCase extends OpenSearchTestCase {
protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOException {
RestClientBuilder builder = RestClient.builder(hosts);
configureClient(builder, settings);
builder.setStrictDeprecationMode(true);
// TODO: set the method argument to 'true' after PR https://github.com/opensearch-project/OpenSearch/pull/2683 merged.
builder.setStrictDeprecationMode(false);
return builder.build();
}