Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rename] remaining packages and resources in test/framework #364

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
package org.opensearch.client;

import com.carrotsearch.randomizedtesting.generators.RandomPicks;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.action.bulk.BulkItemResponse;
import org.opensearch.action.bulk.BulkProcessor;
import org.opensearch.action.bulk.BulkRequest;
Expand Down Expand Up @@ -57,11 +54,11 @@
import java.util.stream.IntStream;

import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.fieldFromSource;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasIndex;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasProperty;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasType;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.fieldFromSource;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasId;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasIndex;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasProperty;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasType;
import static org.hamcrest.Matchers.both;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.either;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.opensearch.client;

import org.opensearch.client.RequestOptions;
import org.opensearch.action.bulk.BulkRequest;
import org.opensearch.action.bulk.BulkResponse;
import org.opensearch.action.index.IndexRequest;
Expand All @@ -31,10 +30,10 @@
import java.io.IOException;
import java.util.function.Function;

import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasIndex;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasProperty;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasType;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasId;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasIndex;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasProperty;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.hasType;
import static org.hamcrest.Matchers.both;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.emptyIterable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
import java.util.Map;

import static java.util.Collections.emptyMap;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.opensearch.cluster.health.ClusterHealthStatus;
import org.opensearch.common.Priority;
import org.opensearch.common.util.CollectionUtils;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.hamcrest.CoreMatchers;
import org.junit.Assert;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.xcontent.XContentHelper;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.junit.Before;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.common.xcontent.json.JsonXContent;
import org.opensearch.rest.RestStatus;
import org.elasticsearch.test.AbstractXContentTestCase;
import org.opensearch.test.AbstractXContentTestCase;

import java.io.IOException;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
import org.opensearch.common.unit.TimeValue;
import org.opensearch.common.util.CollectionUtils;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.junit.Assert;

import java.io.IOException;
Expand All @@ -82,9 +82,9 @@
import static java.util.Collections.singletonList;
import static org.opensearch.client.indices.RandomCreateIndexGenerator.randomAliases;
import static org.opensearch.client.indices.RandomCreateIndexGenerator.randomMapping;
import static org.elasticsearch.index.RandomCreateIndexGenerator.randomAlias;
import static org.elasticsearch.index.RandomCreateIndexGenerator.randomIndexSettings;
import static org.elasticsearch.index.alias.RandomAliasActionsGenerator.randomAliasAction;
import static org.opensearch.index.RandomCreateIndexGenerator.randomAlias;
import static org.opensearch.index.RandomCreateIndexGenerator.randomIndexSettings;
import static org.opensearch.index.alias.RandomAliasActionsGenerator.randomAliasAction;
import static org.opensearch.rest.BaseRestHandler.INCLUDE_TYPE_NAME_PARAMETER;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
Expand Down Expand Up @@ -174,7 +174,7 @@ public void testCreateIndex() throws IOException {

public void testCreateIndexWithTypes() throws IOException {
org.opensearch.action.admin.indices.create.CreateIndexRequest createIndexRequest =
org.elasticsearch.index.RandomCreateIndexGenerator.randomCreateIndexRequest();
org.opensearch.index.RandomCreateIndexGenerator.randomCreateIndexRequest();

Map<String, String> expectedParams = new HashMap<>();
RequestConvertersTests.setRandomTimeout(createIndexRequest::timeout, AcknowledgedRequest.DEFAULT_ACK_TIMEOUT, expectedParams);
Expand Down Expand Up @@ -926,7 +926,7 @@ public void testRollover() throws IOException {
}
if (ESTestCase.randomBoolean()) {
rolloverRequest.getCreateIndexRequest().settings(
org.elasticsearch.index.RandomCreateIndexGenerator.randomIndexSettings());
org.opensearch.index.RandomCreateIndexGenerator.randomIndexSettings());
}
RequestConvertersTests.setRandomWaitForActiveShards(rolloverRequest.getCreateIndexRequest()::waitForActiveShards, expectedParams);

Expand Down Expand Up @@ -962,14 +962,14 @@ public void testRolloverWithTypes() throws IOException {
if (ESTestCase.randomBoolean()) {
String type = ESTestCase.randomAlphaOfLengthBetween(3, 10);
rolloverRequest.getCreateIndexRequest().mapping(type,
org.elasticsearch.index.RandomCreateIndexGenerator.randomMapping(type));
org.opensearch.index.RandomCreateIndexGenerator.randomMapping(type));
}
if (ESTestCase.randomBoolean()) {
org.elasticsearch.index.RandomCreateIndexGenerator.randomAliases(rolloverRequest.getCreateIndexRequest());
org.opensearch.index.RandomCreateIndexGenerator.randomAliases(rolloverRequest.getCreateIndexRequest());
}
if (ESTestCase.randomBoolean()) {
rolloverRequest.getCreateIndexRequest().settings(
org.elasticsearch.index.RandomCreateIndexGenerator.randomIndexSettings());
org.opensearch.index.RandomCreateIndexGenerator.randomIndexSettings());
}
RequestConvertersTests.setRandomWaitForActiveShards(rolloverRequest.getCreateIndexRequest()::waitForActiveShards, expectedParams);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.opensearch.action.support.master.AcknowledgedRequest;
import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.junit.Assert;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.WarningFailureException;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.junit.Before;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.opensearch.search.SearchHit;
import org.opensearch.search.SearchModule;
import org.opensearch.tasks.TaskId;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.opensearch.test.rest.ESRestTestCase;
import org.junit.AfterClass;
import org.junit.Before;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.http.client.methods.HttpPut;
import org.apache.http.nio.entity.NByteArrayEntity;
import org.apache.http.util.EntityUtils;
import org.opensearch.client.Request;
import org.opensearch.action.DocWriteRequest;
import org.opensearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest;
import org.opensearch.action.admin.cluster.storedscripts.GetStoredScriptRequest;
Expand Down Expand Up @@ -104,8 +103,8 @@
import org.opensearch.search.suggest.SuggestBuilder;
import org.opensearch.search.suggest.completion.CompletionSuggestionBuilder;
import org.opensearch.tasks.TaskId;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.RandomObjects;
import org.opensearch.test.ESTestCase;
import org.opensearch.test.RandomObjects;
import org.hamcrest.Matchers;

import java.io.IOException;
Expand All @@ -130,7 +129,7 @@
import static org.opensearch.client.RequestConverters.enforceSameContentType;
import static org.opensearch.index.query.QueryBuilders.matchAllQuery;
import static org.opensearch.search.RandomSearchRequestGenerator.randomSearchRequest;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.opensearch.common.ParseField;
import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.opensearch.common.xcontent.XContentParser;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;
import org.junit.Before;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@
import org.apache.http.message.BasicStatusLine;
import org.apache.http.nio.entity.NByteArrayEntity;
import org.apache.http.nio.entity.NStringEntity;
import org.opensearch.client.Cancellable;
import org.opensearch.client.Request;
import org.opensearch.client.RequestOptions;
import org.opensearch.client.Response;
import org.opensearch.client.ResponseException;
import org.opensearch.client.ResponseListener;
import org.opensearch.client.RestClient;
import org.opensearch.OpenSearchException;
import org.opensearch.action.ActionListener;
import org.opensearch.action.ActionRequest;
Expand Down Expand Up @@ -77,10 +70,10 @@
import org.opensearch.search.aggregations.InternalAggregations;
import org.opensearch.search.aggregations.matrix.stats.MatrixStatsAggregationBuilder;
import org.opensearch.search.suggest.Suggest;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalAggregationTestCase;
import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestApi;
import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec;
import org.opensearch.test.ESTestCase;
import org.opensearch.test.InternalAggregationTestCase;
import org.opensearch.test.rest.yaml.restspec.ClientYamlSuiteRestApi;
import org.opensearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec;
import org.hamcrest.Matchers;
import org.junit.Before;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.opensearch.client.Request;
import org.opensearch.OpenSearchException;
import org.opensearch.OpenSearchStatusException;
import org.opensearch.action.explain.ExplainRequest;
Expand Down Expand Up @@ -96,7 +95,7 @@
import java.util.Map;

import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
import static org.hamcrest.Matchers.arrayContaining;
import static org.hamcrest.Matchers.both;
import static org.hamcrest.Matchers.containsString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.ByteSizeUnit;
import org.opensearch.repositories.fs.FsRepository;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.Map;

import static org.opensearch.common.xcontent.support.XContentMapValues.extractValue;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.opensearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;

public class StoredScriptsIT extends OpenSearchRestHighLevelClientTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.flush.ShardsSyncedFlushResult;
import org.elasticsearch.indices.flush.SyncedFlushService;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksRequest;
import org.opensearch.client.tasks.CancelTasksRequest;
import org.opensearch.tasks.TaskId;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.opensearch.client;

import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

public class TimedRequestTests extends ESTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.opensearch.client;

import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.util.Collections;
import java.util.List;

import static org.elasticsearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode;
import static org.opensearch.test.EqualsHashCodeTestUtils.checkEqualsAndHashCode;
import static org.hamcrest.Matchers.equalTo;

// similar to SearchRequestTests as CountRequest inline several members (and functionality) from SearchRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import org.elasticsearch.index.shard.ShardId;
import org.opensearch.rest.action.RestActions;
import org.opensearch.search.SearchShardTarget;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;

import static org.elasticsearch.test.AbstractXContentTestCase.xContentTester;
import static org.opensearch.test.AbstractXContentTestCase.xContentTester;

public class CountResponseTests extends ESTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.opensearch.cluster.ClusterName;
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.test.VersionUtils;
import org.opensearch.test.VersionUtils;

import java.io.IOException;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
package org.opensearch.client.core;

import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import static org.elasticsearch.test.AbstractXContentTestCase.xContentTester;
import static org.opensearch.test.AbstractXContentTestCase.xContentTester;

public class MultiTermVectorsResponseTests extends ESTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
package org.opensearch.client.core;

import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.test.ESTestCase;
import org.opensearch.test.ESTestCase;

import java.io.IOException;

import static org.elasticsearch.test.AbstractXContentTestCase.xContentTester;
import static org.opensearch.test.AbstractXContentTestCase.xContentTester;

public class ShardsAcknowledgedResponseTests extends ESTestCase {

Expand Down
Loading