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

This reverts commit 6a2a33d187.

During the process of deprecating REST API request parameter master_timeout and adding alternative parameter cluster_manager_timeout, I made High-Level-Rest-Client tests allow deprecation warning temporarily, by changing the argument of `setStrictDeprecationMode()` to false when building `RestClient` for tests, in the above commit / PR https://github.com/opensearch-project/OpenSearch/pull/2702,

This PR sets the High-Level-Rest-Client tests back to treating warning header as a failure.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
This commit is contained in:
Tianli Feng 2022-04-19 13:39:42 -07:00 committed by GitHub
parent 18f4495f4d
commit b45bfc9afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

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