Add deprecation headers to HLRC classes (#79754)

This commit adds the @Deprecated annotation and Javadoc to HLRC classes.
This commit is contained in:
Lee Hinman 2021-10-25 16:11:16 -06:00 committed by GitHub
parent bfd8e15e19
commit c017e1acdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 233 additions and 5 deletions

View file

@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.startsWith;
@SuppressWarnings("removal")
public class EnrollmentDocumentationIT extends ESRestHighLevelClientTestCase {
static Path HTTP_TRUSTSTORE;

View file

@ -19,6 +19,13 @@ import java.io.IOException;
import static java.util.Collections.emptySet;
/**
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class AsyncSearchClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -39,7 +39,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-apis.html">
* X-Pack Rollup APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class CcrClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -34,7 +34,13 @@ import static java.util.Collections.singleton;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Cluster API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html">Cluster API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class ClusterClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -27,7 +27,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-apis.html">
* X-Pack Enrich Policy APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class EnrichClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -23,7 +23,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/eql.html">
* EQL APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class EqlClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -22,7 +22,13 @@ import static java.util.Collections.emptySet;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Snapshot API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/features-apis.html">Snapshot API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class FeaturesClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -16,7 +16,13 @@ import java.io.IOException;
import static java.util.Collections.emptySet;
/**
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class GraphClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -40,6 +40,13 @@ import java.io.IOException;
import static java.util.Collections.emptySet;
/**
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class IndexLifecycleClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -81,7 +81,13 @@ import static java.util.Collections.singleton;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Indices API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices.html">Indices API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class IndicesClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -27,7 +27,13 @@ import static java.util.Collections.emptySet;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Ingest API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html">Ingest API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class IngestClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -45,7 +45,13 @@ import static java.util.Collections.singleton;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/licensing-apis.html">
* X-Pack Licensing APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class LicenseClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -123,7 +123,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html">
* X-Pack Machine Learning APIs </a> for additional information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class MachineLearningClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -25,7 +25,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api.html">
* X-Pack Migration APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class MigrationClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -250,7 +250,12 @@ import static java.util.stream.Collectors.toList;
* {@link ResponseException}</li>
* </ul>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class RestHighLevelClient implements Closeable {
private static final Logger logger = LogManager.getLogger(RestHighLevelClient.class);

View file

@ -18,8 +18,12 @@ import java.util.List;
/**
* Helper to build a {@link RestHighLevelClient}, allowing setting the low-level client that
* should be used as well as whether API compatibility should be used.
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class RestHighLevelClientBuilder {
private final RestClient restClient;
private CheckedConsumer<RestClient, IOException> closeHandler = RestClient::close;

View file

@ -34,7 +34,13 @@ import java.util.Collections;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-apis.html">
* X-Pack Rollup APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class RollupClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -23,7 +23,13 @@ import java.util.Objects;
*
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html">Searchable Snapshots
* APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public class SearchableSnapshotsClient {
private RestHighLevelClient restHighLevelClient;

View file

@ -92,7 +92,13 @@ import static java.util.Collections.singleton;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Security APIs.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api.html">Security APIs on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class SecurityClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -37,7 +37,13 @@ import static java.util.Collections.emptySet;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Snapshot API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html">Snapshot API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class SnapshotClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -25,7 +25,13 @@ import static java.util.Collections.emptySet;
* A wrapper for the {@link RestHighLevelClient} that provides methods for accessing the Tasks API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html">Task Management API on elastic.co</a>
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class TasksClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -7,20 +7,26 @@
*/
package org.elasticsearch.client;
import java.io.IOException;
import java.util.Collections;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.client.textstructure.FindStructureRequest;
import org.elasticsearch.client.textstructure.FindStructureResponse;
import java.io.IOException;
import java.util.Collections;
/**
* Text Structure API client wrapper for the {@link RestHighLevelClient}
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html">
* X-Pack Text Structure APIs </a> for additional information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class TextStructureClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -28,6 +28,13 @@ import org.elasticsearch.client.transform.UpdateTransformResponse;
import java.io.IOException;
import java.util.Collections;
/**
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class TransformClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -33,6 +33,13 @@ import java.io.IOException;
import static java.util.Collections.emptySet;
import static java.util.Collections.singleton;
/**
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class WatcherClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -26,7 +26,13 @@ import static java.util.Collections.emptySet;
* <p>
* See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html">
* REST APIs on elastic.co</a> for more information.
*
* @deprecated The High Level Rest Client is deprecated in favor of the
* <a href="https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/introduction.html">
* Elasticsearch Java API Client</a>
*/
@Deprecated(since = "7.16.0", forRemoval = true)
@SuppressWarnings("removal")
public final class XPackClient {
private final RestHighLevelClient restHighLevelClient;

View file

@ -60,6 +60,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class CCRIT extends ESRestHighLevelClientTestCase {
@Before

View file

@ -53,6 +53,7 @@ import static org.mockito.Mockito.when;
/**
* Test and demonstrates how {@link RestHighLevelClient} can be extended to support custom endpoints.
*/
@SuppressWarnings("removal")
public class CustomRestHighLevelClientTests extends ESTestCase {
private static final String ENDPOINT = "/_custom";

View file

@ -62,6 +62,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
@SuppressWarnings("removal")
public abstract class ESRestHighLevelClientTestCase extends ESRestTestCase {
public static final String IGNORE_THROTTLED_DEPRECATION_WARNING = "[ignore_throttled] parameter is deprecated because frozen " +

View file

@ -26,6 +26,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
@SuppressWarnings("removal")
public class EnrichIT extends ESRestHighLevelClientTestCase {
public void testCRUD() throws Exception {

View file

@ -37,6 +37,7 @@ import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
@SuppressWarnings("removal")
public class EqlIT extends ESRestHighLevelClientTestCase {
private static final String INDEX_NAME = "index";

View file

@ -21,6 +21,7 @@ import java.util.Collections;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue;
@SuppressWarnings("removal")
public class FeaturesIT extends ESRestHighLevelClientTestCase {
public void testGetFeatures() throws IOException {
GetFeaturesRequest request = new GetFeaturesRequest();

View file

@ -134,6 +134,7 @@ import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.startsWith;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
@SuppressWarnings("removal")
public class IndicesClientIT extends ESRestHighLevelClientTestCase {
public static final RequestOptions LEGACY_TEMPLATE_OPTIONS = RequestOptions.DEFAULT.toBuilder()

View file

@ -55,6 +55,7 @@ import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class MachineLearningGetResultsIT extends ESRestHighLevelClientTestCase {
private static final String RESULTS_INDEX = ".ml-anomalies-shared";

View file

@ -218,6 +218,7 @@ import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class MachineLearningIT extends ESRestHighLevelClientTestCase {
private static final RequestOptions POST_DATA_OPTIONS = RequestOptions.DEFAULT.toBuilder()

View file

@ -24,6 +24,7 @@ import java.util.stream.Stream;
/**
* Cleans up ML resources created during tests
*/
@SuppressWarnings("removal")
public class MlTestStateCleaner {
private final Logger logger;

View file

@ -27,6 +27,7 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@SuppressWarnings("removal")
public class MockRestHighLevelTests extends ESTestCase {
private RestHighLevelClient client;
private static final List<String> WARNINGS = Collections.singletonList("Some Warning");

View file

@ -28,6 +28,7 @@ import static org.mockito.Mockito.mock;
* This test works against a {@link RestHighLevelClient} subclass that simulates how custom response sections returned by
* Elasticsearch plugins can be parsed using the high level client.
*/
@SuppressWarnings("removal")
public class RestHighLevelClientExtTests extends ESTestCase {
private RestHighLevelClient restHighLevelClient;

View file

@ -160,6 +160,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@SuppressWarnings("removal")
public class RestHighLevelClientTests extends ESTestCase {
private static final String SUBMIT_TASK_PREFIX = "submit_";

View file

@ -71,6 +71,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;
@SuppressWarnings("removal")
public class RollupIT extends ESRestHighLevelClientTestCase {
double sum = 0.0d;

View file

@ -49,6 +49,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
@SuppressWarnings("removal")
public class SearchableSnapshotsIT extends ESRestHighLevelClientTestCase {
@Before

View file

@ -51,6 +51,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class SecurityIT extends ESRestHighLevelClientTestCase {
public void testPutUser() throws Exception {

View file

@ -16,6 +16,7 @@ import org.elasticsearch.client.textstructure.FindStructureRequest;
import org.elasticsearch.client.textstructure.FindStructureResponse;
import org.elasticsearch.client.textstructure.structurefinder.TextStructure;
@SuppressWarnings("removal")
public class TextStructureIT extends ESRestHighLevelClientTestCase {
public void testFindFileStructure() throws IOException {

View file

@ -74,6 +74,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.oneOf;
@SuppressWarnings("removal")
public class TransformIT extends ESRestHighLevelClientTestCase {
private List<String> transformsToClean = new ArrayList<>();

View file

@ -33,6 +33,7 @@ import java.util.concurrent.TimeUnit;
* Documentation for Async Search APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class AsyncSearchDocumentationIT extends ESRestHighLevelClientTestCase {
@Before void setUpIndex() throws IOException {

View file

@ -58,6 +58,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("removal")
public class CCRDocumentationIT extends ESRestHighLevelClientTestCase {
@Before

View file

@ -95,6 +95,7 @@ import static org.hamcrest.Matchers.not;
* Documentation for CRUD APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class CRUDDocumentationIT extends ESRestHighLevelClientTestCase {
@SuppressWarnings("unused")

View file

@ -62,6 +62,7 @@ import static org.hamcrest.Matchers.notNullValue;
* Documentation for Cluster APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class ClusterClientDocumentationIT extends ESRestHighLevelClientTestCase {
public void testClusterPutSettings() throws IOException {

View file

@ -32,6 +32,7 @@ import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@SuppressWarnings("removal")
public class EnrichDocumentationIT extends ESRestHighLevelClientTestCase {
@After

View file

@ -26,6 +26,7 @@ import org.junit.Before;
import java.io.IOException;
import java.util.Collection;
@SuppressWarnings("removal")
public class GraphDocumentationIT extends ESRestHighLevelClientTestCase {

View file

@ -85,6 +85,7 @@ import static org.hamcrest.Matchers.containsStringIgnoringCase;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@SuppressWarnings("removal")
public class ILMDocumentationIT extends ESRestHighLevelClientTestCase {
public void testPutLifecyclePolicy() throws Exception {

View file

@ -135,6 +135,7 @@ import static org.hamcrest.Matchers.nullValue;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class IndicesClientDocumentationIT extends ESRestHighLevelClientTestCase {
public void testIndicesExist() throws IOException {

View file

@ -54,6 +54,7 @@ import java.util.concurrent.TimeUnit;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class IngestClientDocumentationIT extends ESRestHighLevelClientTestCase {
public void testPutPipeline() throws IOException {

View file

@ -49,6 +49,7 @@ import static org.hamcrest.core.Is.is;
* Documentation for Licensing APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class LicensingDocumentationIT extends ESRestHighLevelClientTestCase {
@BeforeClass

View file

@ -42,6 +42,7 @@ import java.util.concurrent.TimeUnit;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class MigrationClientDocumentationIT extends ESRestHighLevelClientTestCase {
public void testGetDeprecationInfo() throws IOException, InterruptedException {

View file

@ -44,6 +44,7 @@ import java.util.Map;
* include-tagged::{doc-tests}/MigrationDocumentationIT.java[example]
* --------------------------------------------------
*/
@SuppressWarnings("removal")
public class MigrationDocumentationIT extends ESRestHighLevelClientTestCase {
public void testClusterHealth() throws IOException {
RestHighLevelClient client = highLevelClient();

View file

@ -38,6 +38,7 @@ import static org.hamcrest.Matchers.is;
* Documentation for miscellaneous APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class MiscellaneousDocumentationIT extends ESRestHighLevelClientTestCase {
public void testMain() throws IOException {

View file

@ -235,6 +235,7 @@ import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.core.Is.is;
@SuppressWarnings("removal")
public class MlClientDocumentationIT extends ESRestHighLevelClientTestCase {
private static final RequestOptions POST_DATA_OPTIONS = RequestOptions.DEFAULT.toBuilder()

View file

@ -71,6 +71,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.oneOf;
@SuppressWarnings("removal")
public class RollupDocumentationIT extends ESRestHighLevelClientTestCase {
@Before

View file

@ -122,6 +122,7 @@ import static org.hamcrest.Matchers.greaterThan;
* Documentation for search APIs in the high level java client.
* Code wrapped in {@code tag} and {@code end} tags is included in the docs.
*/
@SuppressWarnings("removal")
public class SearchDocumentationIT extends ESRestHighLevelClientTestCase {
@SuppressWarnings({"unused", "unchecked"})

View file

@ -41,6 +41,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("removal")
public class SearchableSnapshotsDocumentationIT extends ESRestHighLevelClientTestCase {
public void testMountSnapshot() throws IOException, InterruptedException {

View file

@ -158,6 +158,7 @@ import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class SecurityDocumentationIT extends ESRestHighLevelClientTestCase {
@Override

View file

@ -80,6 +80,7 @@ import static org.hamcrest.Matchers.equalTo;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class SnapshotClientDocumentationIT extends ESRestHighLevelClientTestCase {
private static final String repositoryName = "test_repository";

View file

@ -55,6 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class StoredScriptsDocumentationIT extends ESRestHighLevelClientTestCase {
@SuppressWarnings("unused")

View file

@ -53,6 +53,7 @@ import static org.hamcrest.Matchers.notNullValue;
* than 84, the line will be cut and a horizontal scroll bar will be displayed.
* (the code indentation of the tag is not included in the width)
*/
@SuppressWarnings("removal")
public class TasksClientDocumentationIT extends ESRestHighLevelClientTestCase {
@SuppressWarnings("unused")

View file

@ -23,6 +23,7 @@ import org.elasticsearch.client.textstructure.FindStructureRequest;
import org.elasticsearch.client.textstructure.FindStructureResponse;
import org.elasticsearch.client.textstructure.structurefinder.TextStructure;
@SuppressWarnings("removal")
public class TextStructureClientDocumentationIT extends ESRestHighLevelClientTestCase {
public void testFindStructure() throws Exception {

View file

@ -66,6 +66,7 @@ import static org.elasticsearch.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
@SuppressWarnings("removal")
public class TransformDocumentationIT extends ESRestHighLevelClientTestCase {
private List<String> transformsToClean = new ArrayList<>();

View file

@ -49,6 +49,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("removal")
public class WatcherDocumentationIT extends ESRestHighLevelClientTestCase {
public void testStartStopWatchService() throws Exception {

View file

@ -68,6 +68,7 @@ import static org.hamcrest.Matchers.not;
* This test ensure that we keep the search states of a CCS request correctly when the local and remote clusters
* have different but compatible versions. See SearchService#createAndPutReaderContext
*/
@SuppressWarnings("removal")
public class SearchStatesIT extends ESRestTestCase {
private static final Logger LOGGER = LogManager.getLogger(SearchStatesIT.class);

View file

@ -62,6 +62,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.CoreMatchers.containsString;
@SuppressWarnings("removal")
public class CrossClusterSearchUnavailableClusterIT extends ESRestTestCase {
private static RestHighLevelClient restHighLevelClient;

View file

@ -115,6 +115,7 @@ import static org.hamcrest.Matchers.not;
* such parameter, hence we want to verify that results are the same in both scenarios.
*/
@TimeoutSuite(millis = 5 * TimeUnits.MINUTE) // to account for slow as hell VMs
@SuppressWarnings("removal")
public class CCSDuelIT extends ESRestTestCase {
private static final String INDEX_NAME = "ccs_duel_index";

View file

@ -29,6 +29,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
@SuppressWarnings("removal")
public abstract class AbstractMultiClusterRemoteTestCase extends ESRestTestCase {
private static final String USER = "x_pack_rest_user";

View file

@ -54,6 +54,7 @@ import static org.hamcrest.Matchers.is;
* <li>Run against the current version cluster from the second step: {@link TestStep#STEP4_NEW_CLUSTER}</li>
* </ul>
*/
@SuppressWarnings("removal")
public class MultiVersionRepositoryAccessIT extends ESRestTestCase {
private enum TestStep {

View file

@ -36,6 +36,7 @@ import javax.ws.rs.core.Response;
import static org.elasticsearch.xcontent.XContentFactory.jsonBuilder;
@Path("/employees")
@SuppressWarnings("removal")
public class RestHighLevelClientEmployeeResource {
@Inject

View file

@ -22,6 +22,7 @@ import javax.enterprise.inject.Produces;
public final class RestHighLevelClientProducer {
@Produces
@SuppressWarnings("removal")
public RestHighLevelClient createRestHighLevelClient() {
String httpUri = System.getProperty("elasticsearch.uri");

View file

@ -38,6 +38,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
@SuppressWarnings("removal")
public class MlDeprecationIT extends ESRestTestCase {
private static final RequestOptions REQUEST_OPTIONS = RequestOptions.DEFAULT.toBuilder()

View file

@ -34,6 +34,7 @@ import java.util.StringJoiner;
import static java.util.stream.Collectors.toList;
@SuppressWarnings("removal")
public abstract class BaseEqlSpecTestCase extends RemoteClusterAwareEqlRestTestCase {
protected static final String PARAM_FORMATTING = "%2$s";

View file

@ -52,6 +52,7 @@ import org.elasticsearch.xpack.ql.TestUtils;
*
* While the loader could be made generic, the queries are bound to each index and generalizing that would make things way too complicated.
*/
@SuppressWarnings("removal")
public class DataLoader {
public static final String TEST_INDEX = "endgame-140";
public static final String TEST_EXTRA_INDEX = "extra";

View file

@ -28,6 +28,7 @@ import java.util.Collections;
import static org.elasticsearch.common.Strings.hasText;
@SuppressWarnings("removal")
public abstract class RemoteClusterAwareEqlRestTestCase extends ESRestTestCase {
private static final long CLIENT_TIMEOUT = 40L; // upped from 10s to accomodate for max measured throughput decline

View file

@ -30,6 +30,7 @@ import java.util.Set;
/**
* Tests a random number of queries that increase various (most of the times, one query will "touch" multiple metrics values) metrics.
*/
@SuppressWarnings("removal")
public abstract class EqlUsageRestTestCase extends ESRestTestCase {
private RestHighLevelClient highLevelClient;

View file

@ -27,6 +27,7 @@ import java.util.Properties;
import static org.elasticsearch.test.ESTestCase.assertEquals;
@SuppressWarnings("removal")
public class EqlDataLoader {
private static final String PROPERTIES_FILENAME = "config.properties";

View file

@ -43,6 +43,7 @@ import static org.elasticsearch.xpack.ql.TestUtils.assertNoSearchContexts;
@TimeoutSuite(millis = 30 * TimeUnits.MINUTE)
@TestLogging(value = "org.elasticsearch.xpack.eql.EsEQLCorrectnessIT:INFO", reason = "Log query execution time")
@SuppressWarnings("removal")
public class EsEQLCorrectnessIT extends ESRestTestCase {
private static final String PARAM_FORMATTING = "%1$s";

View file

@ -42,6 +42,7 @@ import java.util.stream.Collectors;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
@SuppressWarnings("removal")
public abstract class IdpRestTestCase extends ESRestTestCase {
private RestHighLevelClient highLevelAdminClient;

View file

@ -67,6 +67,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@SuppressWarnings("removal")
public class PermissionsIT extends ESRestTestCase {
private static final String jsonDoc = "{ \"name\" : \"elasticsearch\", \"body\": \"foo bar\" }";

View file

@ -15,6 +15,7 @@ import org.elasticsearch.test.rest.ESRestTestCase;
import java.util.List;
@SuppressWarnings("removal")
public abstract class SecurityInBasicRestTestCase extends ESRestTestCase {
private RestHighLevelClient highLevelAdminClient;

View file

@ -33,6 +33,7 @@ import java.io.IOException;
import java.util.Collection;
import java.util.List;
@SuppressWarnings("removal")
public abstract class SecurityOnTrialLicenseRestTestCase extends ESRestTestCase {
private RestHighLevelClient highLevelAdminClient;

View file

@ -40,6 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.instanceOf;
@SuppressWarnings("removal")
public abstract class SecurityRealmSmokeTestCase extends ESRestTestCase {
private static Path httpCAPath;

View file

@ -37,6 +37,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
* Test for the clear roles API
*/
@SuppressWarnings("removal")
public class ClearRolesCacheTests extends NativeRealmIntegTestCase {
private static String[] roles;

View file

@ -35,6 +35,7 @@ import static org.elasticsearch.test.SecuritySettingsSource.SECURITY_REQUEST_OPT
/**
* Test case with method to handle the starting and stopping the stores for native users and roles
*/
@SuppressWarnings("removal")
public abstract class NativeRealmIntegTestCase extends SecurityIntegTestCase {
@Before

View file

@ -98,6 +98,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
@SuppressWarnings("removal")
public class ApiKeyIntegTests extends SecurityIntegTestCase {
private static final long DELETE_INTERVAL_MILLIS = 100L;
private static final int CRYPTO_THREAD_POOL_QUEUE_SIZE = 10;

View file

@ -60,6 +60,7 @@ import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItem;
@SuppressWarnings("removal")
public class TokenAuthIntegTests extends SecurityIntegTestCase {
@Override

View file

@ -39,6 +39,7 @@ import static org.hamcrest.Matchers.is;
/**
* Integration tests for the built in realm
*/
@SuppressWarnings("removal")
public class ReservedRealmIntegTests extends NativeRealmIntegTestCase {
private static Hasher hasher;

View file

@ -47,6 +47,7 @@ import static org.hamcrest.Matchers.emptyCollectionOf;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.startsWith;
@SuppressWarnings("removal")
public class PkiAuthDelegationIntegTests extends SecurityIntegTestCase {
@Override

View file

@ -43,6 +43,7 @@ import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("removal")
public class SnapshotUserRoleIntegTests extends NativeRealmIntegTestCase {
private Client client;

View file

@ -67,6 +67,7 @@ import static org.hamcrest.Matchers.is;
*
* @see SecuritySettingsSource
*/
@SuppressWarnings("removal")
public abstract class SecurityIntegTestCase extends ESIntegTestCase {
private static SecuritySettingsSource SECURITY_DEFAULT_SETTINGS;

View file

@ -38,6 +38,7 @@ import static org.hamcrest.Matchers.hasKey;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
@SuppressWarnings("removal")
public class LatestIT extends TransformIntegTestCase {
private static final String SOURCE_INDEX_NAME = "basic-crud-latest-reviews";

View file

@ -50,6 +50,7 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.oneOf;
@SuppressWarnings("removal")
public class TransformIT extends TransformIntegTestCase {
private static final int NUM_USERS = 28;

View file

@ -82,6 +82,7 @@ import java.util.function.Function;
import static org.elasticsearch.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.core.Is.is;
@SuppressWarnings("removal")
abstract class TransformIntegTestCase extends ESRestTestCase {
private Map<String, TransformConfig> transformConfigs = new HashMap<>();

View file

@ -50,6 +50,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
@SuppressWarnings("removal")
public class TransformUsingSearchRuntimeFieldsIT extends TransformIntegTestCase {
private static final String REVIEWS_INDEX_NAME = "basic-crud-reviews";

View file

@ -41,6 +41,7 @@ import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
import static java.time.temporal.ChronoField.NANO_OF_SECOND;
import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
@SuppressWarnings("removal")
public abstract class ContinuousTestCase extends ESRestTestCase {
public static final TimeValue SYNC_DELAY = new TimeValue(1, TimeUnit.SECONDS);

View file

@ -108,6 +108,7 @@ import static org.hamcrest.core.Is.is;
* to check that optimizations worked
* - repeat
*/
@SuppressWarnings("removal")
public class TransformContinuousIT extends ESRestTestCase {
private List<ContinuousTestCase> transformTestCases = new ArrayList<>();

Some files were not shown because too many files have changed in this diff Show more