From 8c2f6f9d1e6f9a405bb60be16596f3712f332f13 Mon Sep 17 00:00:00 2001 From: Abbas Hussain Date: Mon, 8 Mar 2021 20:50:48 +0530 Subject: [PATCH] [Rename] server/src/test/java/org/elasticsearch/(cli,client,deps,env) (#219) Signed-off-by: Abbas Hussain --- .../cli/CommandTests.java | 6 +- .../cli/MultiCommandTests.java | 2 +- .../cli/TerminalTests.java | 8 +-- .../client/AbstractClientHeadersTestCase.java | 46 ++++++------ .../client/OriginSettingClientTests.java | 24 +++---- .../ParentTaskAssigningClientTests.java | 24 +++---- .../client/documentation/placeholder.txt | 0 .../client/node/NodeClientHeadersTests.java | 26 +++---- .../transport/FailAndRetryMockTransport.java | 54 +++++++------- .../TransportClientHeadersTests.java | 70 +++++++++--------- .../TransportClientNodesServiceTests.java | 72 +++++++++---------- .../transport/TransportClientTests.java | 30 ++++---- .../deps/jackson/JacksonLocationTests.java | 8 +-- .../deps/lucene/SimpleLuceneTests.java | 8 +-- .../deps/lucene/VectorHighlighterTests.java | 8 +-- .../env/ESFileStoreTests.java | 8 +-- .../env/EnvironmentTests.java | 12 ++-- .../env/NodeEnvironmentTests.java | 46 ++++++------ .../env/NodeMetadataTests.java | 16 ++--- .../env/NodeRepurposeCommandTests.java | 54 +++++++------- .../env/OverrideNodeVersionCommandTests.java | 26 +++---- 21 files changed, 274 insertions(+), 274 deletions(-) rename server/src/test/java/org/{elasticsearch => opensearch}/cli/CommandTests.java (98%) rename server/src/test/java/org/{elasticsearch => opensearch}/cli/MultiCommandTests.java (99%) rename server/src/test/java/org/{elasticsearch => opensearch}/cli/TerminalTests.java (97%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/AbstractClientHeadersTestCase.java (86%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/OriginSettingClientTests.java (81%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/ParentTaskAssigningClientTests.java (78%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/documentation/placeholder.txt (100%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/node/NodeClientHeadersTests.java (78%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/transport/FailAndRetryMockTransport.java (82%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/transport/TransportClientHeadersTests.java (81%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/transport/TransportClientNodesServiceTests.java (90%) rename server/src/test/java/org/{elasticsearch => opensearch}/client/transport/TransportClientTests.java (83%) rename server/src/test/java/org/{elasticsearch => opensearch}/deps/jackson/JacksonLocationTests.java (93%) rename server/src/test/java/org/{elasticsearch => opensearch}/deps/lucene/SimpleLuceneTests.java (97%) rename server/src/test/java/org/{elasticsearch => opensearch}/deps/lucene/VectorHighlighterTests.java (97%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/ESFileStoreTests.java (87%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/EnvironmentTests.java (97%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/NodeEnvironmentTests.java (95%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/NodeMetadataTests.java (94%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/NodeRepurposeCommandTests.java (89%) rename server/src/test/java/org/{elasticsearch => opensearch}/env/OverrideNodeVersionCommandTests.java (93%) diff --git a/server/src/test/java/org/elasticsearch/cli/CommandTests.java b/server/src/test/java/org/opensearch/cli/CommandTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/cli/CommandTests.java rename to server/src/test/java/org/opensearch/cli/CommandTests.java index 092e5dfd480..6c60215745f 100644 --- a/server/src/test/java/org/elasticsearch/cli/CommandTests.java +++ b/server/src/test/java/org/opensearch/cli/CommandTests.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.cli; +package org.opensearch.cli; import joptsimple.OptionException; import joptsimple.OptionSet; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.test.OpenSearchTestCase; -public class CommandTests extends ESTestCase { +public class CommandTests extends OpenSearchTestCase { static class UserErrorCommand extends Command { diff --git a/server/src/test/java/org/elasticsearch/cli/MultiCommandTests.java b/server/src/test/java/org/opensearch/cli/MultiCommandTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/cli/MultiCommandTests.java rename to server/src/test/java/org/opensearch/cli/MultiCommandTests.java index 736b19aaef0..c220195dceb 100644 --- a/server/src/test/java/org/elasticsearch/cli/MultiCommandTests.java +++ b/server/src/test/java/org/opensearch/cli/MultiCommandTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cli; +package org.opensearch.cli; import joptsimple.ArgumentAcceptingOptionSpec; import joptsimple.OptionSet; diff --git a/server/src/test/java/org/elasticsearch/cli/TerminalTests.java b/server/src/test/java/org/opensearch/cli/TerminalTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/cli/TerminalTests.java rename to server/src/test/java/org/opensearch/cli/TerminalTests.java index 85b8ec5bf26..1f11583554f 100644 --- a/server/src/test/java/org/elasticsearch/cli/TerminalTests.java +++ b/server/src/test/java/org/opensearch/cli/TerminalTests.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.cli; +package org.opensearch.cli; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.test.OpenSearchTestCase; import java.io.BufferedReader; import java.io.StringReader; -import static org.elasticsearch.cli.Terminal.readLineToCharArray; +import static org.opensearch.cli.Terminal.readLineToCharArray; import static org.hamcrest.Matchers.equalTo; -public class TerminalTests extends ESTestCase { +public class TerminalTests extends OpenSearchTestCase { public void testVerbosity() throws Exception { MockTerminal terminal = new MockTerminal(); diff --git a/server/src/test/java/org/elasticsearch/client/AbstractClientHeadersTestCase.java b/server/src/test/java/org/opensearch/client/AbstractClientHeadersTestCase.java similarity index 86% rename from server/src/test/java/org/elasticsearch/client/AbstractClientHeadersTestCase.java rename to server/src/test/java/org/opensearch/client/AbstractClientHeadersTestCase.java index ce65ed063bc..8c896b6e976 100644 --- a/server/src/test/java/org/elasticsearch/client/AbstractClientHeadersTestCase.java +++ b/server/src/test/java/org/opensearch/client/AbstractClientHeadersTestCase.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.client; +package org.opensearch.client; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.ActionType; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.admin.cluster.reroute.ClusterRerouteAction; -import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotAction; -import org.elasticsearch.action.admin.cluster.stats.ClusterStatsAction; -import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptAction; -import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheAction; -import org.elasticsearch.action.admin.indices.create.CreateIndexAction; -import org.elasticsearch.action.admin.indices.flush.FlushAction; -import org.elasticsearch.action.admin.indices.stats.IndicesStatsAction; -import org.elasticsearch.action.delete.DeleteAction; -import org.elasticsearch.action.get.GetAction; -import org.elasticsearch.action.index.IndexAction; -import org.elasticsearch.action.search.SearchAction; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.Environment; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionListener; +import org.opensearch.action.admin.cluster.reroute.ClusterRerouteAction; +import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotAction; +import org.opensearch.action.admin.cluster.stats.ClusterStatsAction; +import org.opensearch.action.admin.cluster.storedscripts.DeleteStoredScriptAction; +import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheAction; +import org.opensearch.action.admin.indices.create.CreateIndexAction; +import org.opensearch.action.admin.indices.flush.FlushAction; +import org.opensearch.action.admin.indices.stats.IndicesStatsAction; +import org.opensearch.action.delete.DeleteAction; +import org.opensearch.action.get.GetAction; +import org.opensearch.action.index.IndexAction; +import org.opensearch.action.search.SearchAction; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.Environment; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.threadpool.ThreadPool; import java.util.HashMap; import java.util.Map; @@ -49,7 +49,7 @@ import java.util.stream.Collectors; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -public abstract class AbstractClientHeadersTestCase extends ESTestCase { +public abstract class AbstractClientHeadersTestCase extends OpenSearchTestCase { protected static final Settings HEADER_SETTINGS = Settings.builder() .put(ThreadContext.PREFIX + ".key1", "val1") diff --git a/server/src/test/java/org/elasticsearch/client/OriginSettingClientTests.java b/server/src/test/java/org/opensearch/client/OriginSettingClientTests.java similarity index 81% rename from server/src/test/java/org/elasticsearch/client/OriginSettingClientTests.java rename to server/src/test/java/org/opensearch/client/OriginSettingClientTests.java index f13b5e4c5c0..0f82bdf2c5d 100644 --- a/server/src/test/java/org/elasticsearch/client/OriginSettingClientTests.java +++ b/server/src/test/java/org/opensearch/client/OriginSettingClientTests.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.client; +package org.opensearch.client; -import org.elasticsearch.action.ActionType; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.search.ClearScrollRequest; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.client.NoOpClient; +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionListener; +import org.opensearch.action.ActionRequest; +import org.opensearch.action.ActionResponse; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.search.ClearScrollRequest; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.test.client.NoOpClient; -public class OriginSettingClientTests extends ESTestCase { +public class OriginSettingClientTests extends OpenSearchTestCase { public void testSetsParentId() { String origin = randomAlphaOfLength(7); diff --git a/server/src/test/java/org/elasticsearch/client/ParentTaskAssigningClientTests.java b/server/src/test/java/org/opensearch/client/ParentTaskAssigningClientTests.java similarity index 78% rename from server/src/test/java/org/elasticsearch/client/ParentTaskAssigningClientTests.java rename to server/src/test/java/org/opensearch/client/ParentTaskAssigningClientTests.java index 9f93bea56ca..e4fb876af67 100644 --- a/server/src/test/java/org/elasticsearch/client/ParentTaskAssigningClientTests.java +++ b/server/src/test/java/org/opensearch/client/ParentTaskAssigningClientTests.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.client; +package org.opensearch.client; -import org.elasticsearch.action.ActionType; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.search.ClearScrollRequest; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.client.NoOpClient; +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionListener; +import org.opensearch.action.ActionRequest; +import org.opensearch.action.ActionResponse; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.search.ClearScrollRequest; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.tasks.TaskId; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.test.client.NoOpClient; -public class ParentTaskAssigningClientTests extends ESTestCase { +public class ParentTaskAssigningClientTests extends OpenSearchTestCase { public void testSetsParentId() { TaskId[] parentTaskId = new TaskId[] {new TaskId(randomAlphaOfLength(3), randomLong())}; diff --git a/server/src/test/java/org/elasticsearch/client/documentation/placeholder.txt b/server/src/test/java/org/opensearch/client/documentation/placeholder.txt similarity index 100% rename from server/src/test/java/org/elasticsearch/client/documentation/placeholder.txt rename to server/src/test/java/org/opensearch/client/documentation/placeholder.txt diff --git a/server/src/test/java/org/elasticsearch/client/node/NodeClientHeadersTests.java b/server/src/test/java/org/opensearch/client/node/NodeClientHeadersTests.java similarity index 78% rename from server/src/test/java/org/elasticsearch/client/node/NodeClientHeadersTests.java rename to server/src/test/java/org/opensearch/client/node/NodeClientHeadersTests.java index e88337e974d..fd6b502e41a 100644 --- a/server/src/test/java/org/elasticsearch/client/node/NodeClientHeadersTests.java +++ b/server/src/test/java/org/opensearch/client/node/NodeClientHeadersTests.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.client.node; +package org.opensearch.client.node; -import org.elasticsearch.action.ActionType; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.TransportAction; -import org.elasticsearch.client.AbstractClientHeadersTestCase; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.tasks.TaskManager; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionListener; +import org.opensearch.action.ActionRequest; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.TransportAction; +import org.opensearch.client.AbstractClientHeadersTestCase; +import org.opensearch.client.Client; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.settings.Settings; +import org.opensearch.tasks.Task; +import org.opensearch.tasks.TaskManager; +import org.opensearch.threadpool.ThreadPool; import java.util.Collections; import java.util.HashMap; diff --git a/server/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java b/server/src/test/java/org/opensearch/client/transport/FailAndRetryMockTransport.java similarity index 82% rename from server/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java rename to server/src/test/java/org/opensearch/client/transport/FailAndRetryMockTransport.java index 4b77cb8bd29..c34d767592d 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java +++ b/server/src/test/java/org/opensearch/client/transport/FailAndRetryMockTransport.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.Version; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse; -import org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.component.Lifecycle; -import org.elasticsearch.common.component.LifecycleListener; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.BoundTransportAddress; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.transport.CloseableConnection; -import org.elasticsearch.transport.ConnectTransportException; -import org.elasticsearch.transport.ConnectionProfile; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportException; -import org.elasticsearch.transport.TransportMessageListener; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.transport.TransportResponseHandler; -import org.elasticsearch.transport.TransportService; -import org.elasticsearch.transport.TransportStats; +import org.opensearch.Version; +import org.opensearch.action.ActionListener; +import org.opensearch.action.admin.cluster.node.liveness.LivenessResponse; +import org.opensearch.action.admin.cluster.node.liveness.TransportLivenessAction; +import org.opensearch.action.admin.cluster.state.ClusterStateAction; +import org.opensearch.action.admin.cluster.state.ClusterStateResponse; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.component.Lifecycle; +import org.opensearch.common.component.LifecycleListener; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.BoundTransportAddress; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.transport.CloseableConnection; +import org.opensearch.transport.ConnectTransportException; +import org.opensearch.transport.ConnectionProfile; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportException; +import org.opensearch.transport.TransportMessageListener; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportResponse; +import org.opensearch.transport.TransportResponseHandler; +import org.opensearch.transport.TransportService; +import org.opensearch.transport.TransportStats; import java.net.UnknownHostException; import java.util.Collections; diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java b/server/src/test/java/org/opensearch/client/transport/TransportClientHeadersTests.java similarity index 81% rename from server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java rename to server/src/test/java/org/opensearch/client/transport/TransportClientHeadersTests.java index 36fbf11c4e0..75f976c5b2f 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/TransportClientHeadersTests.java +++ b/server/src/test/java/org/opensearch/client/transport/TransportClientHeadersTests.java @@ -17,42 +17,42 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.Version; -import org.elasticsearch.action.ActionType; -import org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse; -import org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.client.AbstractClientHeadersTestCase; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.NetworkPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.MockTransportClient; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportException; -import org.elasticsearch.transport.TransportInterceptor; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestHandler; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.transport.TransportResponseHandler; -import org.elasticsearch.transport.TransportService; +import org.opensearch.Version; +import org.opensearch.action.ActionType; +import org.opensearch.action.admin.cluster.node.liveness.LivenessResponse; +import org.opensearch.action.admin.cluster.node.liveness.TransportLivenessAction; +import org.opensearch.action.admin.cluster.state.ClusterStateAction; +import org.opensearch.action.admin.cluster.state.ClusterStateResponse; +import org.opensearch.client.AbstractClientHeadersTestCase; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.network.NetworkModule; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.env.Environment; +import org.opensearch.plugins.NetworkPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.MockTransportClient; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportException; +import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestHandler; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportResponse; +import org.opensearch.transport.TransportResponseHandler; +import org.opensearch.transport.TransportService; import java.util.Collections; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java b/server/src/test/java/org/opensearch/client/transport/TransportClientNodesServiceTests.java similarity index 90% rename from server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java rename to server/src/test/java/org/opensearch/client/transport/TransportClientNodesServiceTests.java index 0e4ae650dc4..6c79959c073 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java +++ b/server/src/test/java/org/opensearch/client/transport/TransportClientNodesServiceTests.java @@ -17,41 +17,41 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.Version; -import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse; -import org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateAction; -import org.elasticsearch.action.admin.cluster.state.ClusterStateRequest; -import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.node.Node; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.threadpool.TestThreadPool; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportChannel; -import org.elasticsearch.transport.TransportException; -import org.elasticsearch.transport.TransportInterceptor; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestHandler; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.transport.TransportResponseHandler; +import org.opensearch.Version; +import org.opensearch.action.ActionListener; +import org.opensearch.action.admin.cluster.node.liveness.LivenessResponse; +import org.opensearch.action.admin.cluster.node.liveness.TransportLivenessAction; +import org.opensearch.action.admin.cluster.state.ClusterStateAction; +import org.opensearch.action.admin.cluster.state.ClusterStateRequest; +import org.opensearch.action.admin.cluster.state.ClusterStateResponse; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.common.UUIDs; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.node.Node; +import org.opensearch.tasks.Task; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.threadpool.TestThreadPool; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportChannel; +import org.opensearch.transport.TransportException; +import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestHandler; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportResponse; +import org.opensearch.transport.TransportResponseHandler; import org.hamcrest.CustomMatcher; import java.io.Closeable; @@ -67,7 +67,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.transport.MockTransportService.createNewService; +import static org.opensearch.test.transport.MockTransportService.createNewService; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.everyItem; import static org.hamcrest.CoreMatchers.hasItem; @@ -78,7 +78,7 @@ import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; -public class TransportClientNodesServiceTests extends ESTestCase { +public class TransportClientNodesServiceTests extends OpenSearchTestCase { private static class TestIteration implements Closeable { private final ThreadPool threadPool; diff --git a/server/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java b/server/src/test/java/org/opensearch/client/transport/TransportClientTests.java similarity index 83% rename from server/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java rename to server/src/test/java/org/opensearch/client/transport/TransportClientTests.java index 03ac1ebc3b6..3edb7c6d831 100644 --- a/server/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java +++ b/server/src/test/java/org/opensearch/client/transport/TransportClientTests.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; -import org.elasticsearch.common.io.stream.NamedWriteable; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.transport.MockTransportClient; -import org.elasticsearch.transport.TransportSettings; +import org.opensearch.action.admin.cluster.health.ClusterHealthRequest; +import org.opensearch.common.io.stream.NamedWriteable; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.NamedWriteableRegistry.Entry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.env.Environment; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.transport.MockTransportClient; +import org.opensearch.transport.TransportSettings; import java.io.IOException; import java.util.Arrays; @@ -43,7 +43,7 @@ import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.object.HasToString.hasToString; -public class TransportClientTests extends ESTestCase { +public class TransportClientTests extends OpenSearchTestCase { public void testThatUsingAClosedClientThrowsAnException() throws ExecutionException, InterruptedException { final TransportClient client = new MockTransportClient(Settings.EMPTY); diff --git a/server/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java b/server/src/test/java/org/opensearch/deps/jackson/JacksonLocationTests.java similarity index 93% rename from server/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java rename to server/src/test/java/org/opensearch/deps/jackson/JacksonLocationTests.java index 4c84d7c6722..e9b919bdc9f 100644 --- a/server/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java +++ b/server/src/test/java/org/opensearch/deps/jackson/JacksonLocationTests.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.deps.jackson; +package org.opensearch.deps.jackson; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; -import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.common.io.stream.BytesStreamOutput; +import org.opensearch.test.OpenSearchTestCase; import java.io.IOException; import static org.hamcrest.Matchers.equalTo; -public class JacksonLocationTests extends ESTestCase { +public class JacksonLocationTests extends OpenSearchTestCase { public void testLocationExtraction() throws IOException { // { // "index" : "test", diff --git a/server/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java b/server/src/test/java/org/opensearch/deps/lucene/SimpleLuceneTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java rename to server/src/test/java/org/opensearch/deps/lucene/SimpleLuceneTests.java index b6f11ff77ea..904cbcca8df 100644 --- a/server/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java +++ b/server/src/test/java/org/opensearch/deps/lucene/SimpleLuceneTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.deps.lucene; +package org.opensearch.deps.lucene; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -45,15 +45,15 @@ import org.apache.lucene.search.TopFieldDocs; import org.apache.lucene.store.ByteBuffersDirectory; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.common.lucene.Lucene; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.common.lucene.Lucene; +import org.opensearch.test.OpenSearchTestCase; import java.io.IOException; import java.util.ArrayList; import static org.hamcrest.Matchers.equalTo; -public class SimpleLuceneTests extends ESTestCase { +public class SimpleLuceneTests extends OpenSearchTestCase { public void testSortValues() throws Exception { Directory dir = new ByteBuffersDirectory(); IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.STANDARD_ANALYZER)); diff --git a/server/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java b/server/src/test/java/org/opensearch/deps/lucene/VectorHighlighterTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java rename to server/src/test/java/org/opensearch/deps/lucene/VectorHighlighterTests.java index eb8cedeba82..d3838578da8 100644 --- a/server/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java +++ b/server/src/test/java/org/opensearch/deps/lucene/VectorHighlighterTests.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.deps.lucene; +package org.opensearch.deps.lucene; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -37,14 +37,14 @@ import org.apache.lucene.search.vectorhighlight.CustomFieldQuery; import org.apache.lucene.search.vectorhighlight.FastVectorHighlighter; import org.apache.lucene.store.ByteBuffersDirectory; import org.apache.lucene.store.Directory; -import org.elasticsearch.common.lucene.Lucene; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.common.lucene.Lucene; +import org.opensearch.test.OpenSearchTestCase; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class VectorHighlighterTests extends ESTestCase { +public class VectorHighlighterTests extends OpenSearchTestCase { public void testVectorHighlighter() throws Exception { Directory dir = new ByteBuffersDirectory(); IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.STANDARD_ANALYZER)); diff --git a/server/src/test/java/org/elasticsearch/env/ESFileStoreTests.java b/server/src/test/java/org/opensearch/env/ESFileStoreTests.java similarity index 87% rename from server/src/test/java/org/elasticsearch/env/ESFileStoreTests.java rename to server/src/test/java/org/opensearch/env/ESFileStoreTests.java index d7d3a71a763..b2259366a38 100644 --- a/server/src/test/java/org/elasticsearch/env/ESFileStoreTests.java +++ b/server/src/test/java/org/opensearch/env/ESFileStoreTests.java @@ -16,23 +16,23 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.test.OpenSearchTestCase; import java.nio.file.FileStore; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class ESFileStoreTests extends ESTestCase { +public class OpenSearchFileStoreTests extends OpenSearchTestCase { public void testNegativeSpace() throws Exception { FileStore mocked = mock(FileStore.class); when(mocked.getUsableSpace()).thenReturn(-1L); when(mocked.getTotalSpace()).thenReturn(-1L); when(mocked.getUnallocatedSpace()).thenReturn(-1L); assertEquals(-1, mocked.getUsableSpace()); - FileStore store = new ESFileStore(mocked); + FileStore store = new OpenSearchFileStore(mocked); assertEquals(Long.MAX_VALUE, store.getUsableSpace()); assertEquals(Long.MAX_VALUE, store.getTotalSpace()); assertEquals(Long.MAX_VALUE, store.getUnallocatedSpace()); diff --git a/server/src/test/java/org/elasticsearch/env/EnvironmentTests.java b/server/src/test/java/org/opensearch/env/EnvironmentTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/env/EnvironmentTests.java rename to server/src/test/java/org/opensearch/env/EnvironmentTests.java index ba5020827c9..c69e04c5d04 100644 --- a/server/src/test/java/org/elasticsearch/env/EnvironmentTests.java +++ b/server/src/test/java/org/opensearch/env/EnvironmentTests.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchTestCase; import java.io.FileNotFoundException; import java.io.IOException; @@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.hasToString; /** * Simple unit-tests for Environment.java */ -public class EnvironmentTests extends ESTestCase { +public class EnvironmentTests extends OpenSearchTestCase { public Environment newEnvironment() { return newEnvironment(Settings.EMPTY); } diff --git a/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java b/server/src/test/java/org/opensearch/env/NodeEnvironmentTests.java similarity index 95% rename from server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java rename to server/src/test/java/org/opensearch/env/NodeEnvironmentTests.java index 201968d000b..f2a4fb83c08 100644 --- a/server/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java +++ b/server/src/test/java/org/opensearch/env/NodeEnvironmentTests.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; import org.apache.lucene.index.SegmentInfos; import org.apache.lucene.util.LuceneTestCase; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.AbstractRunnable; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.gateway.MetadataStateFormat; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.node.Node; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.IndexSettingsModule; -import org.elasticsearch.test.NodeRoles; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.common.SuppressForbidden; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.AbstractRunnable; +import org.opensearch.common.util.set.Sets; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.gateway.MetadataStateFormat; +import org.opensearch.index.Index; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.shard.ShardId; +import org.opensearch.node.Node; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.test.IndexSettingsModule; +import org.opensearch.test.NodeRoles; import java.io.IOException; import java.nio.file.Files; @@ -52,8 +52,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonMasterNode; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.arrayWithSize; import static org.hamcrest.Matchers.containsString; @@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; @LuceneTestCase.SuppressFileSystems("ExtrasFS") // TODO: fix test to allow extras -public class NodeEnvironmentTests extends ESTestCase { +public class NodeEnvironmentTests extends OpenSearchTestCase { private final IndexSettings idxSettings = IndexSettingsModule.newIndexSettings("foo", Settings.EMPTY); public void testNodeLockSillySettings() { @@ -79,7 +79,7 @@ public class NodeEnvironmentTests extends ESTestCase { int max = NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.get( Settings.builder().put(NodeEnvironment.MAX_LOCAL_STORAGE_NODES_SETTING.getKey(), value).build()); assertEquals(value, max); - assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " + + assertWarnings("[node.max_local_storage_nodes] setting was deprecated in OpenSearch and will be removed in a future release! " + "See the breaking changes documentation for the next major version."); } @@ -103,7 +103,7 @@ public class NodeEnvironmentTests extends ESTestCase { } env.close(); assertThat(env.lockedShards(), empty()); - assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " + + assertWarnings("[node.max_local_storage_nodes] setting was deprecated in OpenSearch and will be removed in a future release! " + "See the breaking changes documentation for the next major version."); } @@ -139,7 +139,7 @@ public class NodeEnvironmentTests extends ESTestCase { assertEquals(first.nodeDataPaths()[i].getParent(), second.nodeDataPaths()[i].getParent()); } IOUtils.close(first, second); - assertWarnings("[node.max_local_storage_nodes] setting was deprecated in Elasticsearch and will be removed in a future release! " + + assertWarnings("[node.max_local_storage_nodes] setting was deprecated in OpenSearch and will be removed in a future release! " + "See the breaking changes documentation for the next major version."); } diff --git a/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java b/server/src/test/java/org/opensearch/env/NodeMetadataTests.java similarity index 94% rename from server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java rename to server/src/test/java/org/opensearch/env/NodeMetadataTests.java index 730e9c1e787..2802c39e414 100644 --- a/server/src/test/java/org/elasticsearch/env/NodeMetadataTests.java +++ b/server/src/test/java/org/opensearch/env/NodeMetadataTests.java @@ -16,14 +16,14 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; -import org.elasticsearch.Version; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.gateway.MetadataStateFormat; -import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.test.EqualsHashCodeTestUtils; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.common.collect.Tuple; +import org.opensearch.gateway.MetadataStateFormat; +import org.opensearch.test.OpenSearchTestCase; +import org.opensearch.test.EqualsHashCodeTestUtils; +import org.opensearch.test.VersionUtils; import java.io.IOException; import java.io.InputStream; @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.startsWith; -public class NodeMetadataTests extends ESTestCase { +public class NodeMetadataTests extends OpenSearchTestCase { private Version randomVersion() { // VersionUtils.randomVersion() only returns known versions, which are necessarily no later than Version.CURRENT; however we want // also to consider our behaviour with all versions, so occasionally pick up a truly random version. diff --git a/server/src/test/java/org/elasticsearch/env/NodeRepurposeCommandTests.java b/server/src/test/java/org/opensearch/env/NodeRepurposeCommandTests.java similarity index 89% rename from server/src/test/java/org/elasticsearch/env/NodeRepurposeCommandTests.java rename to server/src/test/java/org/opensearch/env/NodeRepurposeCommandTests.java index 02532b8108b..e942aa5a7e8 100644 --- a/server/src/test/java/org/elasticsearch/env/NodeRepurposeCommandTests.java +++ b/server/src/test/java/org/opensearch/env/NodeRepurposeCommandTests.java @@ -16,27 +16,27 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; import joptsimple.OptionSet; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cli.Terminal; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.OpenSearchNodeCommand; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.common.CheckedConsumer; -import org.elasticsearch.common.CheckedRunnable; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.BigArrays; -import org.elasticsearch.gateway.PersistedClusterStateService; -import org.elasticsearch.index.Index; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.Version; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cli.Terminal; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.OpenSearchNodeCommand; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.common.CheckedConsumer; +import org.opensearch.common.CheckedRunnable; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.BigArrays; +import org.opensearch.gateway.PersistedClusterStateService; +import org.opensearch.index.Index; +import org.opensearch.test.OpenSearchTestCase; import org.hamcrest.Matcher; import org.junit.Before; @@ -48,18 +48,18 @@ import java.util.Collections; import java.util.HashSet; import java.util.stream.Stream; -import static org.elasticsearch.env.NodeRepurposeCommand.NO_CLEANUP; -import static org.elasticsearch.env.NodeRepurposeCommand.NO_DATA_TO_CLEAN_UP_FOUND; -import static org.elasticsearch.env.NodeRepurposeCommand.NO_SHARD_DATA_TO_CLEAN_UP_FOUND; -import static org.elasticsearch.test.NodeRoles.masterNode; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; -import static org.elasticsearch.test.NodeRoles.removeRoles; +import static org.opensearch.env.NodeRepurposeCommand.NO_CLEANUP; +import static org.opensearch.env.NodeRepurposeCommand.NO_DATA_TO_CLEAN_UP_FOUND; +import static org.opensearch.env.NodeRepurposeCommand.NO_SHARD_DATA_TO_CLEAN_UP_FOUND; +import static org.opensearch.test.NodeRoles.masterNode; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.NodeRoles.removeRoles; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; -public class NodeRepurposeCommandTests extends ESTestCase { +public class NodeRepurposeCommandTests extends OpenSearchTestCase { private static final Index INDEX = new Index("testIndex", "testUUID"); private Settings dataMasterSettings; diff --git a/server/src/test/java/org/elasticsearch/env/OverrideNodeVersionCommandTests.java b/server/src/test/java/org/opensearch/env/OverrideNodeVersionCommandTests.java similarity index 93% rename from server/src/test/java/org/elasticsearch/env/OverrideNodeVersionCommandTests.java rename to server/src/test/java/org/opensearch/env/OverrideNodeVersionCommandTests.java index a072dae2639..7fd6500b789 100644 --- a/server/src/test/java/org/elasticsearch/env/OverrideNodeVersionCommandTests.java +++ b/server/src/test/java/org/opensearch/env/OverrideNodeVersionCommandTests.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; import joptsimple.OptionParser; import joptsimple.OptionSet; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.BigArrays; -import org.elasticsearch.gateway.PersistedClusterStateService; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.Version; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.BigArrays; +import org.opensearch.gateway.PersistedClusterStateService; +import org.opensearch.test.OpenSearchTestCase; import org.junit.After; import org.junit.Before; @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class OverrideNodeVersionCommandTests extends ESTestCase { +public class OverrideNodeVersionCommandTests extends OpenSearchTestCase { private Environment environment; private Path[] nodePaths;