diff --git a/client/rest-high-level/src/test/java/org/opensearch/client/SyncedFlushResponseTests.java b/client/rest-high-level/src/test/java/org/opensearch/client/SyncedFlushResponseTests.java index d7c2dc2343495..2e19710af28c1 100644 --- a/client/rest-high-level/src/test/java/org/opensearch/client/SyncedFlushResponseTests.java +++ b/client/rest-high-level/src/test/java/org/opensearch/client/SyncedFlushResponseTests.java @@ -20,10 +20,9 @@ import com.carrotsearch.hppc.ObjectIntHashMap; import com.carrotsearch.hppc.ObjectIntMap; -import org.opensearch.client.SyncedFlushResponse; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.xcontent.DeprecationHandler; import org.opensearch.common.xcontent.ToXContent; diff --git a/client/rest-high-level/src/test/java/org/opensearch/client/indices/GetDataStreamResponseTests.java b/client/rest-high-level/src/test/java/org/opensearch/client/indices/GetDataStreamResponseTests.java index cded325b23dcc..784b505cd79e4 100644 --- a/client/rest-high-level/src/test/java/org/opensearch/client/indices/GetDataStreamResponseTests.java +++ b/client/rest-high-level/src/test/java/org/opensearch/client/indices/GetDataStreamResponseTests.java @@ -36,7 +36,7 @@ import java.util.Locale; import java.util.stream.Collectors; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName; public class GetDataStreamResponseTests extends AbstractResponseTestCase { diff --git a/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/JsonLogsFormatAndParseIT.java b/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/JsonLogsFormatAndParseIT.java index 34bd5be42825a..c4663c731bedd 100644 --- a/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/JsonLogsFormatAndParseIT.java +++ b/distribution/archives/integ-test-zip/src/test/java/org/opensearch/test/rest/JsonLogsFormatAndParseIT.java @@ -19,7 +19,7 @@ package org.opensearch.test.rest; -import org.elasticsearch.common.logging.JsonLogsIntegTestCase; +import org.opensearch.common.logging.JsonLogsIntegTestCase; import org.hamcrest.Matcher; import java.io.BufferedReader; diff --git a/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java b/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java index c3fcb59726d94..190739c3a9e71 100644 --- a/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java +++ b/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java @@ -24,7 +24,7 @@ import org.opensearch.common.settings.SecureSettings; import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.Settings; -import org.elasticsearch.env.Environment; +import org.opensearch.env.Environment; import org.elasticsearch.test.ESTestCase; import org.junit.After; import org.junit.Before; diff --git a/distribution/tools/keystore-cli/src/test/java/org/opensearch/common/settings/KeyStoreCommandTestCase.java b/distribution/tools/keystore-cli/src/test/java/org/opensearch/common/settings/KeyStoreCommandTestCase.java index 3c5ba2c547597..50a332a81e3f7 100644 --- a/distribution/tools/keystore-cli/src/test/java/org/opensearch/common/settings/KeyStoreCommandTestCase.java +++ b/distribution/tools/keystore-cli/src/test/java/org/opensearch/common/settings/KeyStoreCommandTestCase.java @@ -31,9 +31,9 @@ import com.google.common.jimfs.Jimfs; import org.opensearch.core.internal.io.IOUtils; import org.apache.lucene.util.LuceneTestCase; -import org.elasticsearch.cli.CommandTestCase; -import org.elasticsearch.common.io.PathUtilsForTesting; -import org.elasticsearch.env.Environment; +import org.opensearch.cli.CommandTestCase; +import org.opensearch.common.io.PathUtilsForTesting; +import org.opensearch.env.Environment; import org.elasticsearch.env.TestEnvironment; import org.junit.After; import org.junit.Before; diff --git a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java index 7380ade65263f..995faed3d1e3f 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/InstallPluginCommandTests.java @@ -44,7 +44,7 @@ import org.opensearch.Build; import org.opensearch.Version; import org.opensearch.cli.ExitCodes; -import org.elasticsearch.cli.MockTerminal; +import org.opensearch.cli.MockTerminal; import org.opensearch.cli.Terminal; import org.opensearch.cli.UserException; import org.opensearch.common.SuppressForbidden; @@ -52,7 +52,7 @@ import org.opensearch.common.hash.MessageDigests; import org.opensearch.common.io.FileSystemUtils; import org.opensearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; +import org.opensearch.common.io.PathUtilsForTesting; import org.opensearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.TestEnvironment; diff --git a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java index 0ed1969254398..2f15974aac2ea 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/ListPluginsCommandTests.java @@ -30,7 +30,7 @@ import org.apache.lucene.util.LuceneTestCase; import org.opensearch.Version; import org.opensearch.cli.ExitCodes; -import org.elasticsearch.cli.MockTerminal; +import org.opensearch.cli.MockTerminal; import org.opensearch.cli.UserException; import org.opensearch.common.settings.Settings; import org.opensearch.env.Environment; diff --git a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/RemovePluginCommandTests.java b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/RemovePluginCommandTests.java index 9797182ab69bb..b7db59be4b6e6 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/RemovePluginCommandTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/opensearch/plugins/RemovePluginCommandTests.java @@ -22,7 +22,7 @@ import org.apache.lucene.util.LuceneTestCase; import org.opensearch.Version; import org.opensearch.cli.ExitCodes; -import org.elasticsearch.cli.MockTerminal; +import org.opensearch.cli.MockTerminal; import org.opensearch.cli.UserException; import org.opensearch.common.settings.Settings; import org.opensearch.env.Environment; diff --git a/libs/ssl-config/src/test/java/org/opensearch/common/ssl/SslConfigurationLoaderTests.java b/libs/ssl-config/src/test/java/org/opensearch/common/ssl/SslConfigurationLoaderTests.java index 920ad9e1e5c6f..db31b3c83fe23 100644 --- a/libs/ssl-config/src/test/java/org/opensearch/common/ssl/SslConfigurationLoaderTests.java +++ b/libs/ssl-config/src/test/java/org/opensearch/common/ssl/SslConfigurationLoaderTests.java @@ -19,7 +19,7 @@ package org.opensearch.common.ssl; -import org.elasticsearch.common.settings.MockSecureSettings; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.Settings; import org.elasticsearch.test.ESTestCase; diff --git a/modules/aggs-matrix-stats/src/test/java/org/opensearch/search/aggregations/matrix/stats/InternalMatrixStatsTests.java b/modules/aggs-matrix-stats/src/test/java/org/opensearch/search/aggregations/matrix/stats/InternalMatrixStatsTests.java index bc2832cb1d69b..f55d73ba78278 100644 --- a/modules/aggs-matrix-stats/src/test/java/org/opensearch/search/aggregations/matrix/stats/InternalMatrixStatsTests.java +++ b/modules/aggs-matrix-stats/src/test/java/org/opensearch/search/aggregations/matrix/stats/InternalMatrixStatsTests.java @@ -20,11 +20,11 @@ import org.opensearch.common.ParseField; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.xcontent.ContextParser; import org.opensearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; +import org.opensearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.plugins.SearchPlugin; import org.opensearch.script.ScriptService; import org.opensearch.search.aggregations.Aggregation; diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteBuildRestClientTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteBuildRestClientTests.java index 6172ab01f3cb4..06c59be5f05d6 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteBuildRestClientTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/ReindexFromRemoteBuildRestClientTests.java @@ -20,7 +20,7 @@ package org.opensearch.index.reindex; import org.opensearch.client.RestClient; -import org.elasticsearch.client.RestClientBuilderTestCase; +import org.opensearch.client.RestClientBuilderTestCase; import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.settings.Settings; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java index f25ad7e2dd1e3..8c67760f9a46a 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4BadRequestTests.java @@ -26,8 +26,8 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.http.HttpServerTransport; import org.opensearch.http.HttpTransportSettings; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java index 3cbeecb488cdf..1b5150494a4f2 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerPipeliningTests.java @@ -33,8 +33,8 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.http.HttpPipelinedRequest; import org.opensearch.http.HttpResponse; import org.opensearch.http.HttpServerTransport; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java index 51f9489600341..560365f340d30 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/http/netty4/Netty4HttpServerTransportTests.java @@ -54,8 +54,8 @@ import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.TimeValue; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.http.BindHttpException; import org.opensearch.http.CorsHandler; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java index 810f1bff7a178..df9dab70aa143 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4SizeHeaderFrameDecoderTests.java @@ -24,7 +24,7 @@ import org.opensearch.common.network.NetworkService; import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.mocksocket.MockSocket; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4UtilsTests.java b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4UtilsTests.java index ea3e4b1654ba6..207595b8a672c 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4UtilsTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/Netty4UtilsTests.java @@ -24,7 +24,7 @@ import io.netty.buffer.Unpooled; import org.apache.lucene.util.BytesRef; import org.opensearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; +import org.opensearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.io.stream.ReleasableBytesStreamOutput; diff --git a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/NettyTransportMultiPortTests.java b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/NettyTransportMultiPortTests.java index 92e52dca2e21a..fe5037e6c604f 100644 --- a/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/NettyTransportMultiPortTests.java +++ b/modules/transport-netty4/src/test/java/org/opensearch/transport/netty4/NettyTransportMultiPortTests.java @@ -24,7 +24,7 @@ import org.opensearch.common.network.NetworkService; import org.opensearch.common.network.NetworkUtils; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java index 61998050251db..b913caff32645 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java +++ b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java @@ -28,16 +28,16 @@ import org.apache.lucene.util.Constants; import org.apache.lucene.util.StringHelper; import org.opensearch.OpenSearchException; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.cli.KeyStoreAwareCommand; import org.opensearch.cli.Terminal; import org.opensearch.cli.UserException; import org.opensearch.common.PidFile; import org.opensearch.common.SuppressForbidden; import org.opensearch.common.inject.CreationException; -import org.elasticsearch.common.logging.DeprecationLogger; -import org.elasticsearch.common.logging.LogConfigurator; -import org.elasticsearch.common.logging.Loggers; +import org.opensearch.common.logging.DeprecationLogger; +import org.opensearch.common.logging.LogConfigurator; +import org.opensearch.common.logging.Loggers; import org.opensearch.common.network.IfConfig; import org.opensearch.common.settings.KeyStoreWrapper; import org.opensearch.common.settings.SecureSettings; @@ -45,10 +45,10 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.BoundTransportAddress; import org.opensearch.core.internal.io.IOUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.monitor.jvm.JvmInfo; -import org.elasticsearch.monitor.os.OsProbe; -import org.elasticsearch.monitor.process.ProcessProbe; +import org.opensearch.env.Environment; +import org.opensearch.monitor.jvm.JvmInfo; +import org.opensearch.monitor.os.OsProbe; +import org.opensearch.monitor.process.ProcessProbe; import org.opensearch.node.InternalSettingsPreparer; import org.opensearch.node.Node; import org.opensearch.node.NodeValidationException; diff --git a/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java index 8bd7d042b1fc1..46d7c6ef50017 100644 --- a/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java +++ b/server/src/main/java/org/opensearch/bootstrap/OpenSearch.java @@ -29,7 +29,7 @@ import org.opensearch.cli.Terminal; import org.opensearch.cli.UserException; import org.opensearch.common.logging.LogConfigurator; -import org.elasticsearch.env.Environment; +import org.opensearch.env.Environment; import org.opensearch.monitor.jvm.JvmInfo; import org.opensearch.node.NodeValidationException; diff --git a/server/src/main/java/org/opensearch/bootstrap/Spawner.java b/server/src/main/java/org/opensearch/bootstrap/Spawner.java index c4a84dc57e8b6..a55df543126b1 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Spawner.java +++ b/server/src/main/java/org/opensearch/bootstrap/Spawner.java @@ -21,10 +21,10 @@ import org.apache.lucene.util.Constants; import org.opensearch.core.internal.io.IOUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.Platforms; -import org.elasticsearch.plugins.PluginInfo; -import org.elasticsearch.plugins.PluginsService; +import org.opensearch.env.Environment; +import org.opensearch.plugins.Platforms; +import org.opensearch.plugins.PluginInfo; +import org.opensearch.plugins.PluginsService; import java.io.Closeable; import java.io.IOException; diff --git a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java index 9c91de61d721e..616c362466a46 100644 --- a/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java +++ b/server/src/main/java/org/opensearch/cli/EnvironmentAwareCommand.java @@ -24,7 +24,7 @@ import joptsimple.util.KeyValuePair; import org.opensearch.common.SuppressForbidden; import org.opensearch.common.settings.Settings; -import org.elasticsearch.env.Environment; +import org.opensearch.env.Environment; import org.opensearch.node.InternalSettingsPreparer; import java.nio.file.Path; @@ -33,7 +33,7 @@ import java.util.Locale; import java.util.Map; -/** A cli command which requires an {@link org.elasticsearch.env.Environment} to use current paths and settings. */ +/** A cli command which requires an {@link org.opensearch.env.Environment} to use current paths and settings. */ public abstract class EnvironmentAwareCommand extends Command { private final OptionSpec settingOption; diff --git a/server/src/main/java/org/opensearch/common/util/BigArrays.java b/server/src/main/java/org/opensearch/common/util/BigArrays.java index c688004994681..1f094c9712a49 100644 --- a/server/src/main/java/org/opensearch/common/util/BigArrays.java +++ b/server/src/main/java/org/opensearch/common/util/BigArrays.java @@ -28,7 +28,7 @@ import org.opensearch.common.lease.Releasable; import org.opensearch.common.lease.Releasables; import org.opensearch.common.recycler.Recycler; -import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.opensearch.indices.breaker.CircuitBreakerService; import java.util.Arrays; diff --git a/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java b/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java index 3ff08c3abd4c8..3282fe602e47e 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java +++ b/server/src/main/java/org/opensearch/search/aggregations/AggregationBuilder.java @@ -24,9 +24,9 @@ import org.opensearch.common.io.stream.NamedWriteable; import org.opensearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryRewriteContext; -import org.elasticsearch.index.query.QueryShardContext; -import org.elasticsearch.index.query.Rewriteable; +import org.opensearch.index.query.QueryRewriteContext; +import org.opensearch.index.query.QueryShardContext; +import org.opensearch.index.query.Rewriteable; import org.opensearch.search.aggregations.pipeline.PipelineAggregator; import org.opensearch.search.aggregations.pipeline.PipelineAggregator.PipelineTree; diff --git a/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java b/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java index dd198018c8f74..2227b9539c777 100644 --- a/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java +++ b/server/src/main/java/org/opensearch/search/aggregations/AggregatorFactories.java @@ -30,9 +30,9 @@ import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentLocation; import org.opensearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryRewriteContext; -import org.elasticsearch.index.query.QueryShardContext; -import org.elasticsearch.index.query.Rewriteable; +import org.opensearch.index.query.QueryRewriteContext; +import org.opensearch.index.query.QueryShardContext; +import org.opensearch.index.query.Rewriteable; import org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder; import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.opensearch.search.aggregations.pipeline.PipelineAggregator; diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterInfoTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterInfoTests.java index f9cdcf5a8f56c..0c0c548cfeab4 100644 --- a/server/src/test/java/org/elasticsearch/cluster/ClusterInfoTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/ClusterInfoTests.java @@ -20,7 +20,7 @@ import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.index.shard.ShardId; diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java index 8b2581eb2d58c..6d277bd544e21 100644 --- a/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/ClusterModuleTests.java @@ -44,7 +44,7 @@ import org.opensearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider; import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; import org.opensearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.ModuleTestCase; +import org.opensearch.common.inject.ModuleTestCase; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.IndexScopedSettings; import org.opensearch.common.settings.Setting; diff --git a/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java b/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java index 50c1d74e2ada5..5a1308e2a8e17 100644 --- a/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java @@ -35,7 +35,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.Strings; import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java b/server/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java index b83049ace0422..143c6d2fb317d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java @@ -26,7 +26,7 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RecoverySource.PeerRecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.common.collect.ImmutableOpenMap; import org.elasticsearch.index.Index; diff --git a/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java b/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java index 11a5bcc894a41..aad5c445e56d2 100644 --- a/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/InternalClusterInfoServiceSchedulingTests.java @@ -27,15 +27,15 @@ import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; import org.opensearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; -import org.elasticsearch.cluster.coordination.MockSinglePrioritizingExecutor; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.MockSinglePrioritizingExecutor; import org.opensearch.cluster.coordination.NoMasterBlockService; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterApplier; import org.opensearch.cluster.service.ClusterApplierService; import org.opensearch.cluster.service.ClusterService; -import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; +import org.opensearch.cluster.service.FakeThreadPoolMasterService; import org.elasticsearch.cluster.service.MasterService; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/elasticsearch/cluster/NodeConnectionsServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/NodeConnectionsServiceTests.java index 50aec23c08e22..cb245226b2fcb 100644 --- a/server/src/test/java/org/elasticsearch/cluster/NodeConnectionsServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/NodeConnectionsServiceTests.java @@ -25,7 +25,7 @@ import org.opensearch.Version; import org.opensearch.action.ActionListener; import org.opensearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodes; diff --git a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardFailedClusterStateTaskExecutorTests.java b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardFailedClusterStateTaskExecutorTests.java index 7047bdc6f6c9f..c98d1d94b0e8e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardFailedClusterStateTaskExecutorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardFailedClusterStateTaskExecutorTests.java @@ -25,7 +25,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateTaskExecutor; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry; import org.opensearch.cluster.metadata.IndexMetadata; @@ -37,7 +37,7 @@ import org.opensearch.cluster.routing.ShardIterator; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.FailedShard; import org.opensearch.cluster.routing.allocation.StaleShard; @@ -61,7 +61,7 @@ import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.Matchers.contains; -public class ShardFailedClusterStateTaskExecutorTests extends ESAllocationTestCase { +public class ShardFailedClusterStateTaskExecutorTests extends OpenSearchAllocationTestCase { private static final String INDEX = "INDEX"; private AllocationService allocationService; @@ -193,7 +193,7 @@ private ClusterState createClusterStateWithStartedShards(String reason) { ClusterState.builder(clusterState).nodes(nodes).build(); RoutingTable afterReroute = allocationService.reroute(stateAfterAddingNode, reason).routingTable(); ClusterState stateAfterReroute = ClusterState.builder(stateAfterAddingNode).routingTable(afterReroute).build(); - return ESAllocationTestCase.startInitializingShardsAndReroute(allocationService, stateAfterReroute); + return OpenSearchAllocationTestCase.startInitializingShardsAndReroute(allocationService, stateAfterReroute); } private List createExistingShards(ClusterState currentState, String reason) { diff --git a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStartedClusterStateTaskExecutorTests.java b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStartedClusterStateTaskExecutorTests.java index 4f6869f6fc77b..34ab944e7de6e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStartedClusterStateTaskExecutorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStartedClusterStateTaskExecutorTests.java @@ -22,7 +22,7 @@ import org.opensearch.action.ActionListener; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateTaskExecutor; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction.StartedShardEntry; import org.opensearch.cluster.metadata.IndexMetadata; @@ -43,16 +43,16 @@ import java.util.stream.Stream; import static java.util.Collections.singletonList; -import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.state; -import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithActivePrimary; -import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithAssignedPrimariesAndReplicas; -import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithNoShard; +import static org.opensearch.action.support.replication.ClusterStateCreationUtils.state; +import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithActivePrimary; +import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithAssignedPrimariesAndReplicas; +import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithNoShard; import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -public class ShardStartedClusterStateTaskExecutorTests extends ESAllocationTestCase { +public class ShardStartedClusterStateTaskExecutorTests extends OpenSearchAllocationTestCase { private ShardStateAction.ShardStartedClusterStateTaskExecutor executor; diff --git a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionTests.java b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionTests.java index 7a9a827ab2ac9..056fe3628f641 100644 --- a/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/action/shard/ShardStateActionTests.java @@ -23,7 +23,7 @@ import org.apache.lucene.util.SetOnce; import org.opensearch.Version; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateObserver; import org.opensearch.cluster.NotMasterException; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterBootstrapServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterBootstrapServiceTests.java index 8ddc6177270f2..ea9104aadf38d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterBootstrapServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterBootstrapServiceTests.java @@ -20,6 +20,7 @@ import org.opensearch.OpenSearchException; import org.opensearch.Version; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterFormationFailureHelperTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterFormationFailureHelperTests.java index aeea399644a62..c92e9ee847d14 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterFormationFailureHelperTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/ClusterFormationFailureHelperTests.java @@ -25,6 +25,7 @@ import org.opensearch.cluster.coordination.ClusterFormationFailureHelper.ClusterFormationState; import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinationStateTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinationStateTests.java index 808fd42cf4308..5d171ae7b9acc 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinationStateTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinationStateTests.java @@ -27,6 +27,7 @@ import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationState; import org.opensearch.cluster.coordination.CoordinationState.PersistedState; +import org.opensearch.cluster.coordination.CoordinationStateTestCluster; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java index 4b6a24eb0aa8d..4e2a625056b95 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/CoordinatorTests.java @@ -27,7 +27,8 @@ import org.opensearch.cluster.AbstractDiffable; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.block.ClusterBlock; -import org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode; +import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase; +import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode; import org.opensearch.cluster.coordination.ClusterFormationFailureHelper; import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; @@ -70,8 +71,8 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.singleton; -import static org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY; -import static org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.EXTREME_DELAY_VARIABILITY; +import static org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY; +import static org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.EXTREME_DELAY_VARIABILITY; import static org.opensearch.cluster.coordination.Coordinator.PUBLISH_TIMEOUT_SETTING; import static org.opensearch.cluster.coordination.Coordinator.Mode.CANDIDATE; import static org.opensearch.cluster.coordination.ElectionSchedulerFactory.ELECTION_INITIAL_TIMEOUT_SETTING; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/ElectionSchedulerFactoryTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/ElectionSchedulerFactoryTests.java index 77343f10c5c60..bd506c82c7a8c 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/ElectionSchedulerFactoryTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/ElectionSchedulerFactoryTests.java @@ -19,6 +19,7 @@ package org.elasticsearch.cluster.coordination; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.common.lease.Releasable; import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings.Builder; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/FollowersCheckerTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/FollowersCheckerTests.java index e31c97a9c945e..fa44593eb9770 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/FollowersCheckerTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/FollowersCheckerTests.java @@ -22,6 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.coordination.Coordinator.Mode; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.coordination.FollowersChecker; import org.opensearch.cluster.coordination.FollowersChecker.FollowerCheckRequest; import org.opensearch.cluster.node.DiscoveryNode; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/JoinHelperTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/JoinHelperTests.java index 061a8b84380c0..976106f23dc01 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/JoinHelperTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/JoinHelperTests.java @@ -25,6 +25,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.NotMasterException; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/LagDetectorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/LagDetectorTests.java index 7526546c12910..bbdd02565a0aa 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/LagDetectorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/LagDetectorTests.java @@ -18,6 +18,7 @@ */ package org.elasticsearch.cluster.coordination; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/LeaderCheckerTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/LeaderCheckerTests.java index 3683208fe4865..a560ea6c71a50 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/LeaderCheckerTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/LeaderCheckerTests.java @@ -23,6 +23,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.coordination.CoordinationStateRejectedException; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.coordination.LeaderChecker; import org.opensearch.cluster.coordination.LeaderChecker.LeaderCheckRequest; import org.opensearch.cluster.node.DiscoveryNode; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/LinearizabilityCheckerTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/LinearizabilityCheckerTests.java index 89de998d00602..5bc934e6209d4 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/LinearizabilityCheckerTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/LinearizabilityCheckerTests.java @@ -18,9 +18,10 @@ */ package org.elasticsearch.cluster.coordination; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker.History; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker.KeyedSpec; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker.SequentialSpec; +import org.opensearch.cluster.coordination.LinearizabilityChecker; +import org.opensearch.cluster.coordination.LinearizabilityChecker.History; +import org.opensearch.cluster.coordination.LinearizabilityChecker.KeyedSpec; +import org.opensearch.cluster.coordination.LinearizabilityChecker.SequentialSpec; import org.opensearch.common.collect.Tuple; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/NodeJoinTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/NodeJoinTests.java index 88db1c4cb7df6..e3ff9fb980871 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/NodeJoinTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/NodeJoinTests.java @@ -23,15 +23,16 @@ import org.opensearch.action.ActionListener; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; +import org.opensearch.cluster.service.FakeThreadPoolMasterService; import org.opensearch.cluster.service.MasterService; import org.elasticsearch.cluster.service.MasterServiceTests; import org.opensearch.common.Randomness; @@ -189,7 +190,7 @@ protected void onSendRequest(long requestId, String action, TransportRequest req clusterSettings, Collections.emptySet()); coordinator = new Coordinator("test_node", Settings.EMPTY, clusterSettings, transportService, writableRegistry(), - ESAllocationTestCase.createAllocationService(Settings.EMPTY), + OpenSearchAllocationTestCase.createAllocationService(Settings.EMPTY), masterService, () -> new InMemoryPersistedState(term, initialState), r -> emptyList(), new NoOpClusterApplier(), diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/OpenSearchNodeCommandTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/OpenSearchNodeCommandTests.java index 2e823cb99c932..f7a88076f669e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/OpenSearchNodeCommandTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/OpenSearchNodeCommandTests.java @@ -42,8 +42,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.not; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/PreVoteCollectorTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/PreVoteCollectorTests.java index 75c873ea80ee3..c77f19a3f3ed6 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/PreVoteCollectorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/PreVoteCollectorTests.java @@ -22,6 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.lease.Releasable; diff --git a/server/src/test/java/org/elasticsearch/cluster/coordination/PublicationTransportHandlerTests.java b/server/src/test/java/org/elasticsearch/cluster/coordination/PublicationTransportHandlerTests.java index 46c17d92b4073..1ff166ae8ffdb 100644 --- a/server/src/test/java/org/elasticsearch/cluster/coordination/PublicationTransportHandlerTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/coordination/PublicationTransportHandlerTests.java @@ -24,6 +24,7 @@ import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.Diff; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.common.io.stream.StreamOutput; diff --git a/server/src/test/java/org/elasticsearch/cluster/health/ClusterHealthAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/health/ClusterHealthAllocationTests.java index 7ef1e617feb46..0b82d011eaf65 100644 --- a/server/src/test/java/org/elasticsearch/cluster/health/ClusterHealthAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/health/ClusterHealthAllocationTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.health.ClusterHealthStatus; import org.opensearch.cluster.health.ClusterStateHealth; import org.opensearch.cluster.metadata.IndexMetadata; @@ -33,7 +33,7 @@ import java.util.Collections; -public class ClusterHealthAllocationTests extends ESAllocationTestCase { +public class ClusterHealthAllocationTests extends OpenSearchAllocationTestCase { public void testClusterHealth() { ClusterState clusterState = ClusterState.builder(ClusterName.DEFAULT).build(); diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/AutoExpandReplicasTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/AutoExpandReplicasTests.java index 4c5da0f2a8936..2e63cade6aa43 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/AutoExpandReplicasTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/AutoExpandReplicasTests.java @@ -23,7 +23,7 @@ import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest; import org.opensearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.metadata.AutoExpandReplicas; import org.opensearch.cluster.metadata.IndexMetadata; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java index 85f93442f5b7b..d1f7b9f3b7dcc 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/DataStreamTests.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Locale; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java index 26e3a6486a2de..57b78e20be9c9 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java @@ -57,8 +57,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_HIDDEN_SETTING; import static org.opensearch.cluster.metadata.IndexNameExpressionResolver.SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY; import static org.opensearch.common.util.set.Sets.newHashSet; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamServiceTests.java index 4e7c88795297d..6c528a0fc13f2 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateDataStreamServiceTests.java @@ -36,9 +36,9 @@ import java.util.Collections; -import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; -import static org.elasticsearch.cluster.DataStreamTestHelper.generateMapping; +import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.generateMapping; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java index d92a01c37f53c..74c96f753807f 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataCreateIndexServiceTests.java @@ -28,7 +28,7 @@ import org.opensearch.action.admin.indices.shrink.ResizeType; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.metadata.AliasMetadata; @@ -246,7 +246,7 @@ public void testValidateShrinkIndex() { RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); // now we start the shard - routingTable = ESAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); + routingTable = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); int targetShards; do { @@ -309,7 +309,7 @@ public void testValidateSplitIndex() { RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); // now we start the shard - routingTable = ESAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); + routingTable = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); MetadataCreateIndexService.validateSplitIndex(clusterState, "source", "target", @@ -448,7 +448,7 @@ private void runPrepareResizeIndexSettingsTest( // now we start the shard final RoutingTable routingTable - = ESAllocationTestCase.startInitializingShardsAndReroute(service, routingTableClusterState, indexName).routingTable(); + = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, routingTableClusterState, indexName).routingTable(); final ClusterState clusterState = ClusterState.builder(routingTableClusterState).routingTable(routingTable).build(); final Settings.Builder indexSettingsBuilder = Settings.builder().put("index.number_of_shards", 1).put(requestSettings); diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDeleteIndexServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDeleteIndexServiceTests.java index 2bf5b16a65aaa..5f6af05984b32 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDeleteIndexServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDeleteIndexServiceTests.java @@ -21,7 +21,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.DataStreamTestHelper; +import org.opensearch.cluster.DataStreamTestHelper; import org.opensearch.cluster.SnapshotsInProgress; import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.routing.RoutingTable; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexAliasesServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexAliasesServiceTests.java index 94a076e3ef48c..a546e3a562fca 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexAliasesServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexAliasesServiceTests.java @@ -47,7 +47,7 @@ import java.util.Set; import static java.util.Collections.singletonList; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java index 26fac6c2fbea8..fbc6c74255a9f 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexStateServiceTests.java @@ -81,7 +81,7 @@ import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED; import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK; import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID; -import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; +import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java index 4d425bcc8b77d..35c9e565282af 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetadataTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.cluster.ClusterModule; -import org.elasticsearch.cluster.DataStreamTestHelper; +import org.opensearch.cluster.DataStreamTestHelper; import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion; import org.opensearch.common.Strings; @@ -64,9 +64,9 @@ import java.util.TreeMap; import java.util.stream.Collectors; -import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.metadata.Metadata.Builder.validateDataStreams; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java index 8f6735acf8ca2..4f8d79c093d14 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java @@ -49,8 +49,8 @@ import java.util.HashSet; import java.util.Map; -import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED; import static org.opensearch.cluster.metadata.Metadata.CONTEXT_MODE_API; diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java index 5d924346af6b5..0d61f599aa1dd 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java @@ -37,8 +37,8 @@ import java.util.List; import java.util.Set; -import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.common.util.set.Sets.newHashSet; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationServiceTests.java index 6da4db248a6e4..2d688daba41af 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationServiceTests.java @@ -24,7 +24,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodeRole; @@ -64,7 +64,7 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -public class DelayedAllocationServiceTests extends ESAllocationTestCase { +public class DelayedAllocationServiceTests extends OpenSearchAllocationTestCase { private TestDelayAllocationService delayedAllocationService; private MockAllocationService allocationService; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/GroupShardsIteratorTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/GroupShardsIteratorTests.java index 417e0f5ab30eb..530c3995dd3e6 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/GroupShardsIteratorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/GroupShardsIteratorTests.java @@ -29,6 +29,7 @@ import org.opensearch.cluster.routing.PlainShardIterator; import org.opensearch.cluster.routing.ShardIterator; import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import java.util.ArrayList; import java.util.Arrays; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/OperationRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/OperationRoutingTests.java index 9796f693cbf06..a45fbf3d93df4 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/OperationRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/OperationRoutingTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.cluster.routing; import org.opensearch.Version; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.routing.GroupShardsIterator; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryTermsTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryTermsTests.java index c71cd4cfc48ce..6b4ec175c6862 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryTermsTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/PrimaryTermsTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.health.ClusterStateHealth; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class PrimaryTermsTests extends ESAllocationTestCase { +public class PrimaryTermsTests extends OpenSearchAllocationTestCase { private static final String TEST_INDEX_1 = "test1"; private static final String TEST_INDEX_2 = "test2"; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/RecoverySourceTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/RecoverySourceTests.java index 30393e5375d8e..a44f3fa1bdaf1 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/RecoverySourceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/RecoverySourceTests.java @@ -19,6 +19,7 @@ package org.elasticsearch.cluster.routing; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.test.ESTestCase; import org.opensearch.cluster.routing.RecoverySource; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingNodeTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingNodeTests.java index 35c4cfdae0a64..3fecebb6db9c1 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingNodeTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingNodeTests.java @@ -22,6 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.transport.TransportAddress; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableGenerator.java b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableGenerator.java index 03409832f300b..942d636344099 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableGenerator.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableGenerator.java @@ -27,6 +27,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.TestShardRouting; import static org.opensearch.cluster.health.ClusterShardHealth.getInactivePrimaryHealth; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTests.java index cdfe507f4f718..d50b015b4f826 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.MetadataIndexStateService; @@ -33,6 +33,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.common.settings.Settings; import org.elasticsearch.index.Index; @@ -51,7 +52,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class RoutingTableTests extends ESAllocationTestCase { +public class RoutingTableTests extends OpenSearchAllocationTestCase { private static final String TEST_INDEX_1 = "test1"; private static final String TEST_INDEX_2 = "test2"; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java index 056153c5f724a..173c2ff449e4e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java @@ -20,6 +20,8 @@ package org.elasticsearch.cluster.routing; import org.opensearch.Version; +import org.opensearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.UUIDs; import org.elasticsearch.index.Index; import org.elasticsearch.index.shard.ShardId; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java index b24884510209d..17e7f4c056c85 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java @@ -24,7 +24,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -34,6 +34,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus; import org.opensearch.cluster.routing.allocation.AllocationService; @@ -64,7 +65,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class UnassignedInfoTests extends ESAllocationTestCase { +public class UnassignedInfoTests extends OpenSearchAllocationTestCase { public void testReasonOrdinalOrder() { UnassignedInfo.Reason[] order = new UnassignedInfo.Reason[]{ diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java index 5b04651bc6f2e..898dfffdb0c93 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java @@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class AddIncrementallyTests extends ESAllocationTestCase { +public class AddIncrementallyTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(AddIncrementallyTests.class); public void testAddNodesAndIndices() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java index 9560a7184ac5c..24ac500b525e3 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java @@ -24,7 +24,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -80,7 +80,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class AllocationCommandsTests extends ESAllocationTestCase { +public class AllocationCommandsTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(AllocationCommandsTests.class); public void testMoveShardCommand() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationPriorityTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationPriorityTests.java index a98febb658154..7861417bdd83d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationPriorityTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationPriorityTests.java @@ -20,7 +20,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -31,7 +31,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; -public class AllocationPriorityTests extends ESAllocationTestCase { +public class AllocationPriorityTests extends OpenSearchAllocationTestCase { /** * Tests that higher prioritized primaries and replicas are allocated first even on the balanced shard allocator diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java index e3ac0b65a3b37..455e379d86bb9 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.sameInstance; -public class AwarenessAllocationTests extends ESAllocationTestCase { +public class AwarenessAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(AwarenessAllocationTests.class); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java index 0a1d61a18c254..4dfb03ac420c3 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java @@ -25,7 +25,7 @@ import org.apache.lucene.util.ArrayUtil; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -53,7 +53,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; -public class BalanceConfigurationTests extends ESAllocationTestCase { +public class BalanceConfigurationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(BalanceConfigurationTests.class); // TODO maybe we can randomize these numbers somehow diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTests.java index 8895bf494bb79..c7fa9daf528c0 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTests.java @@ -21,7 +21,7 @@ import org.apache.lucene.util.TestUtil; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.routing.IndexShardRoutingTable; @@ -69,7 +69,7 @@ protected ClusterState allocateNew(ClusterState state) { ClusterState clusterState = ClusterState.builder(state).metadata(metadata).routingTable(initialRoutingTable).build(); clusterState = strategy.reroute(clusterState, "reroute"); while (clusterState.routingTable().shardsWithState(INITIALIZING).isEmpty() == false) { - clusterState = ESAllocationTestCase.startInitializingShardsAndReroute(strategy, clusterState); + clusterState = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(strategy, clusterState); } Map counts = new HashMap<>(); for (IndexShardRoutingTable table : clusterState.routingTable().index(index)) { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalancedSingleShardTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalancedSingleShardTests.java index d02b13f5a09f2..8f9859eff07cd 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalancedSingleShardTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/BalancedSingleShardTests.java @@ -19,10 +19,10 @@ package org.elasticsearch.cluster.routing.allocation; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.routing.RoutingNode; @@ -58,7 +58,7 @@ /** * Tests for balancing a single shard, see {@link Balancer#decideRebalance(ShardRouting)}. */ -public class BalancedSingleShardTests extends ESAllocationTestCase { +public class BalancedSingleShardTests extends OpenSearchAllocationTestCase { public void testRebalanceNonStartedShardNotAllowed() { BalancedShardsAllocator allocator = new BalancedShardsAllocator(Settings.EMPTY); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java index 72cf51b2a2b10..1ff9448b299eb 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -30,7 +30,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.settings.Settings; import org.opensearch.cluster.routing.allocation.AllocationService; @@ -58,7 +58,7 @@ * the test builds up a clusterstate from the cat input and optionally runs a full balance on it. * This can be used to debug cluster allocation decisions. */ -public abstract class CatAllocationTestCase extends ESAllocationTestCase { +public abstract class CatAllocationTestCase extends OpenSearchAllocationTestCase { protected abstract Path getCatPath() throws IOException; public void testRun() throws IOException { @@ -161,7 +161,7 @@ private ClusterState rebalance(ClusterState clusterState) { } logger.debug("Initializing shards: {}", initializing); numRelocations += initializing.size(); - clusterState = ESAllocationTestCase.startShardsAndReroute(strategy, clusterState, initializing); + clusterState = OpenSearchAllocationTestCase.startShardsAndReroute(strategy, clusterState, initializing); } logger.debug("--> num relocations to get balance: {}", numRelocations); return clusterState; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java index 84b79346b0fd0..ea4786f17b7e6 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class ClusterRebalanceRoutingTests extends ESAllocationTestCase { +public class ClusterRebalanceRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ClusterRebalanceRoutingTests.class); public void testAlways() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java index dd8c6932059ce..8e86c3ed3405b 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -public class ConcurrentRebalanceRoutingTests extends ESAllocationTestCase { +public class ConcurrentRebalanceRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ConcurrentRebalanceRoutingTests.class); public void testClusterConcurrentRebalance() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java index 31e4b4c5d660b..fee22e6fadfab 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class DeadNodesAllocationTests extends ESAllocationTestCase { +public class DeadNodesAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(DeadNodesAllocationTests.class); public void testSimpleDeadNodeOnStartedPrimaryShard() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DecisionsImpactOnClusterHealthTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DecisionsImpactOnClusterHealthTests.java index 951f164eac842..4ee35bd3cde88 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DecisionsImpactOnClusterHealthTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DecisionsImpactOnClusterHealthTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.health.ClusterHealthStatus; import org.opensearch.cluster.health.ClusterStateHealth; @@ -55,7 +55,7 @@ * primary shard allocation and assert the cluster health * has the correct status based on those allocation decisions. */ -public class DecisionsImpactOnClusterHealthTests extends ESAllocationTestCase { +public class DecisionsImpactOnClusterHealthTests extends OpenSearchAllocationTestCase { public void testPrimaryShardNoDecisionOnIndexCreation() throws IOException { final String indexName = "test-idx"; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdMonitorTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdMonitorTests.java index ddc0e1b585e0d..782612a63b225 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdMonitorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdMonitorTests.java @@ -27,7 +27,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.DiskUsage; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.block.ClusterBlockLevel; import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.metadata.IndexMetadata; @@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.equalTo; -public class DiskThresholdMonitorTests extends ESAllocationTestCase { +public class DiskThresholdMonitorTests extends OpenSearchAllocationTestCase { public void testMarkFloodStageIndicesReadOnly() { AllocationService allocation = createAllocationService(Settings.builder() diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java index e9b8d2d2cdd9e..9f994ad591a03 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class ElectReplicaAsPrimaryDuringRelocationTests extends ESAllocationTestCase { +public class ElectReplicaAsPrimaryDuringRelocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ElectReplicaAsPrimaryDuringRelocationTests.class); public void testElectReplicaAsPrimaryDuringRelocation() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ExpectedShardSizeAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ExpectedShardSizeAllocationTests.java index cd253a5f22beb..04e4735311544 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ExpectedShardSizeAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ExpectedShardSizeAllocationTests.java @@ -24,7 +24,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class ExpectedShardSizeAllocationTests extends ESAllocationTestCase { +public class ExpectedShardSizeAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ExpectedShardSizeAllocationTests.class); public void testInitializingHasExpectedSize() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java index 7a7d7515d5ee1..acff5e481b5a8 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java @@ -26,9 +26,9 @@ import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest; import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -63,7 +63,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.hamcrest.Matchers.equalTo; -public class FailedNodeRoutingTests extends ESAllocationTestCase { +public class FailedNodeRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(FailedNodeRoutingTests.class); public void testSimpleFailedNodeTest() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java index bdd6696f2d90b..10709375a5b86 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java @@ -24,7 +24,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class FailedShardsRoutingTests extends ESAllocationTestCase { +public class FailedShardsRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(FailedShardsRoutingTests.class); public void testFailedShardPrimaryRelocatingToAndFrom() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java index e1f1fde858ae8..e9a1856a5f37c 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -52,7 +52,7 @@ import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING; import static org.hamcrest.Matchers.equalTo; -public class FilterRoutingTests extends ESAllocationTestCase { +public class FilterRoutingTests extends OpenSearchAllocationTestCase { public void testClusterIncludeFiltersSingleAttribute() { testClusterFilters(Settings.builder().put(CLUSTER_ROUTING_INCLUDE_GROUP_SETTING.getKey() + "tag1", "value1,value2"), diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/InSyncAllocationIdTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/InSyncAllocationIdTests.java index e815385151cc3..c197c66796fe6 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/InSyncAllocationIdTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/InSyncAllocationIdTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry; import org.opensearch.cluster.metadata.IndexMetadata; @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; -public class InSyncAllocationIdTests extends ESAllocationTestCase { +public class InSyncAllocationIdTests extends OpenSearchAllocationTestCase { private AllocationService allocation; private ShardStateAction.ShardFailedClusterStateTaskExecutor failedClusterStateTaskExecutor; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java index 3e8c1c9356b5e..714a6fca27853 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class IndexBalanceTests extends ESAllocationTestCase { +public class IndexBalanceTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(IndexBalanceTests.class); public void testBalanceAllNodesStarted() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/MaxRetryAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/MaxRetryAllocationDeciderTests.java index 7e89d4d493a6b..52a0203bf0707 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/MaxRetryAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/MaxRetryAllocationDeciderTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class MaxRetryAllocationDeciderTests extends ESAllocationTestCase { +public class MaxRetryAllocationDeciderTests extends OpenSearchAllocationTestCase { private AllocationService strategy; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java index 32134da6413a7..c81fc389a4bc3 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -38,9 +38,9 @@ import org.opensearch.cluster.routing.RoutingNodes; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; @@ -81,7 +81,7 @@ import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; -public class NodeVersionAllocationDeciderTests extends ESAllocationTestCase { +public class NodeVersionAllocationDeciderTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(NodeVersionAllocationDeciderTests.class); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java index 866b6283f5ccc..4378e3e069e6d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java @@ -20,7 +20,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -36,7 +36,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.hamcrest.Matchers.equalTo; -public class PreferLocalPrimariesToRelocatingPrimariesTests extends ESAllocationTestCase { +public class PreferLocalPrimariesToRelocatingPrimariesTests extends OpenSearchAllocationTestCase { public void testPreferLocalPrimaryAllocationOverFiltered() { int concurrentRecoveries = randomIntBetween(1, 10); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java index 0b2bd0e1bdc05..1259bccc15f34 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -35,7 +35,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.hamcrest.Matchers.equalTo; -public class PreferPrimaryAllocationTests extends ESAllocationTestCase { +public class PreferPrimaryAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(PreferPrimaryAllocationTests.class); public void testPreferPrimaryAllocationOverReplicas() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java index 6bb75b95384dc..f4ef73f1f7124 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -public class PrimaryElectionRoutingTests extends ESAllocationTestCase { +public class PrimaryElectionRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(PrimaryElectionRoutingTests.class); public void testBackupElectionToPrimaryWhenPrimaryCanBeAllocatedToAnotherNode() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java index f2ec06ced2291..7898badeb876b 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -36,7 +36,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.hamcrest.Matchers.equalTo; -public class PrimaryNotRelocatedWhileBeingRecoveredTests extends ESAllocationTestCase { +public class PrimaryNotRelocatedWhileBeingRecoveredTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(PrimaryNotRelocatedWhileBeingRecoveredTests.class); public void testPrimaryNotRelocatedWhileBeingRecoveredFrom() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java index c66b8448d5b3c..05eadf5bac8f7 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -53,7 +53,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.hamcrest.Matchers.equalTo; -public class RandomAllocationDeciderTests extends ESAllocationTestCase { +public class RandomAllocationDeciderTests extends OpenSearchAllocationTestCase { /* This test will make random allocation decision on a growing and shrinking * cluster leading to a random distribution of the shards. After a certain * amount of iterations the test allows allocation unless the same shard is diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java index 8e9a7377a2d55..5e0a7c29448c6 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java @@ -24,7 +24,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -public class RebalanceAfterActiveTests extends ESAllocationTestCase { +public class RebalanceAfterActiveTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(RebalanceAfterActiveTests.class); public void testRebalanceOnlyAfterAllShardsAreActive() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java index 41af4818acc5e..101dd739812d0 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java @@ -29,7 +29,7 @@ import org.opensearch.cluster.routing.RoutingNodes; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.common.settings.Settings; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.routing.allocation.AllocationService; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class ReplicaAllocatedAfterPrimaryTests extends ESAllocationTestCase { +public class ReplicaAllocatedAfterPrimaryTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ReplicaAllocatedAfterPrimaryTests.class); public void testBackupIsAllocatedAfterPrimary() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ResizeAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ResizeAllocationDeciderTests.java index 138142c0f3afa..0d09093cbebcc 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ResizeAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ResizeAllocationDeciderTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -30,7 +30,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; @@ -50,7 +50,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; -public class ResizeAllocationDeciderTests extends ESAllocationTestCase { +public class ResizeAllocationDeciderTests extends OpenSearchAllocationTestCase { private AllocationService strategy; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RetryFailedAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RetryFailedAllocationTests.java index 934f2ae6bb1c8..f6fcc41059144 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RetryFailedAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RetryFailedAllocationTests.java @@ -23,7 +23,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.sameInstance; -public class RetryFailedAllocationTests extends ESAllocationTestCase { +public class RetryFailedAllocationTests extends OpenSearchAllocationTestCase { private MockAllocationService strategy; private ClusterState clusterState; diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java index af28d3813efdb..6aa1f6b297c2d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class RoutingNodesIntegrityTests extends ESAllocationTestCase { +public class RoutingNodesIntegrityTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(IndexBalanceTests.class); public void testBalanceAllNodesStarted() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java index 3d6f7ec1320ad..998071d0f81a8 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java @@ -22,11 +22,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.Version; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; @@ -36,7 +36,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.cluster.routing.allocation.decider.AllocationDeciders; @@ -54,7 +54,7 @@ import static org.elasticsearch.cluster.routing.allocation.RoutingNodesUtils.numberOfShardsOfType; import static org.hamcrest.Matchers.equalTo; -public class SameShardRoutingTests extends ESAllocationTestCase { +public class SameShardRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(SameShardRoutingTests.class); public void testSameHost() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java index 2fd05b33b1454..f919d739cc2e7 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -37,7 +37,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.hamcrest.Matchers.equalTo; -public class ShardVersioningTests extends ESAllocationTestCase { +public class ShardVersioningTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ShardVersioningTests.class); public void testSimple() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java index 6a389ef672d45..5004a452e5464 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -39,7 +39,7 @@ import static org.elasticsearch.cluster.routing.allocation.RoutingNodesUtils.numberOfShardsOfType; import static org.hamcrest.Matchers.equalTo; -public class ShardsLimitAllocationTests extends ESAllocationTestCase { +public class ShardsLimitAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ShardsLimitAllocationTests.class); public void testIndexLevelShardsLimitAllocate() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java index 3fd09f5a9b25e..fd10f323a581e 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class SingleShardNoReplicasRoutingTests extends ESAllocationTestCase { +public class SingleShardNoReplicasRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(SingleShardNoReplicasRoutingTests.class); public void testSingleIndexStartedShard() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java index d30be6081cd83..934a87e8e80bf 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class SingleShardOneReplicaRoutingTests extends ESAllocationTestCase { +public class SingleShardOneReplicaRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(SingleShardOneReplicaRoutingTests.class); public void testSingleIndexFirstStartPrimaryThenBackups() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java index cc463b209bc3d..8b81339794749 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -31,7 +31,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.set.Sets; import org.opensearch.index.Index; @@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class StartedShardsRoutingTests extends ESAllocationTestCase { +public class StartedShardsRoutingTests extends OpenSearchAllocationTestCase { public void testStartedShardsMatching() { AllocationService allocation = createAllocationService(); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java index 0172b671c2fa2..59ae55e9b9ab3 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class TenShardsOneReplicaRoutingTests extends ESAllocationTestCase { +public class TenShardsOneReplicaRoutingTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(TenShardsOneReplicaRoutingTests.class); public void testSingleIndexFirstStartPrimaryThenBackups() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java index c5316fa66bf6b..d6a58b1265510 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java @@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.RestoreInProgress; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -35,7 +35,7 @@ import org.opensearch.cluster.routing.RecoverySource.SnapshotRecoverySource; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.command.AllocationCommands; @@ -67,7 +67,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.hamcrest.Matchers.equalTo; -public class ThrottlingAllocationTests extends ESAllocationTestCase { +public class ThrottlingAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(ThrottlingAllocationTests.class); public void testPrimaryRecoveryThrottling() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TrackFailedAllocationNodesTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TrackFailedAllocationNodesTests.java index 5d3d4bcc12016..89bc154ba2125 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TrackFailedAllocationNodesTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/TrackFailedAllocationNodesTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; -public class TrackFailedAllocationNodesTests extends ESAllocationTestCase { +public class TrackFailedAllocationNodesTests extends OpenSearchAllocationTestCase { public void testTrackFailedNodes() { int maxRetries = MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY.get(Settings.EMPTY); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java index 8a3f73f239aa6..0b3bed67ff528 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java @@ -24,7 +24,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class UpdateNumberOfReplicasTests extends ESAllocationTestCase { +public class UpdateNumberOfReplicasTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(UpdateNumberOfReplicasTests.class); public void testUpdateNumberOfReplicas() { diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java index 0ff4c6a3b1ae1..b16ad31882fc9 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java @@ -26,7 +26,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.DiskUsage; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.RestoreInProgress; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -42,7 +42,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus; import org.opensearch.cluster.routing.UnassignedInfo.Reason; import org.opensearch.cluster.routing.allocation.AllocationService; @@ -93,7 +93,7 @@ import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.oneOf; -public class DiskThresholdDeciderTests extends ESAllocationTestCase { +public class DiskThresholdDeciderTests extends OpenSearchAllocationTestCase { DiskThresholdDecider makeDecider(Settings settings) { return new DiskThresholdDecider(settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS)); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java index c598873ed5bc1..7261a16d75a03 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java @@ -24,7 +24,7 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.DiskUsage; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDeciderTests.DevNullClusterInfo; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -37,7 +37,7 @@ import org.opensearch.cluster.routing.RoutingNode; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.allocation.AllocationService; @@ -62,7 +62,7 @@ /** * Unit tests for the DiskThresholdDecider */ -public class DiskThresholdDeciderUnitTests extends ESAllocationTestCase { +public class DiskThresholdDeciderUnitTests extends OpenSearchAllocationTestCase { public void testCanAllocateUsesMaxAvailableSpace() { ClusterSettings nss = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationShortCircuitTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationShortCircuitTests.java index 5e653dc1f8a26..db375d9171388 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationShortCircuitTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationShortCircuitTests.java @@ -22,7 +22,7 @@ import org.opensearch.cluster.ClusterModule; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -public class EnableAllocationShortCircuitTests extends ESAllocationTestCase { +public class EnableAllocationShortCircuitTests extends OpenSearchAllocationTestCase { private static ClusterState createClusterStateWithAllShardsAssigned() { AllocationService allocationService = createAllocationService(Settings.EMPTY); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java index 0af086244049c..9e06bf9bfc41f 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java @@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -51,7 +51,7 @@ import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING; import static org.hamcrest.Matchers.equalTo; -public class EnableAllocationTests extends ESAllocationTestCase { +public class EnableAllocationTests extends OpenSearchAllocationTestCase { private final Logger logger = LogManager.getLogger(EnableAllocationTests.class); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDeciderTests.java index 8f84a692b6d34..9fa6b9f49276d 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/FilterAllocationDeciderTests.java @@ -20,7 +20,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -54,7 +54,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; -public class FilterAllocationDeciderTests extends ESAllocationTestCase { +public class FilterAllocationDeciderTests extends OpenSearchAllocationTestCase { public void testFilterInitialRecovery() { ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/RestoreInProgressAllocationDeciderTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/RestoreInProgressAllocationDeciderTests.java index 861ef2b4fd268..1520beb39afdc 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/RestoreInProgressAllocationDeciderTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/RestoreInProgressAllocationDeciderTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.RestoreInProgress; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -57,7 +57,7 @@ /** * Test {@link RestoreInProgressAllocationDecider} */ -public class RestoreInProgressAllocationDeciderTests extends ESAllocationTestCase { +public class RestoreInProgressAllocationDeciderTests extends OpenSearchAllocationTestCase { public void testCanAllocatePrimary() { ClusterState clusterState = createInitialClusterState(); diff --git a/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java b/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java index b4b417d3f9bb7..5c9f44cf871d5 100644 --- a/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java @@ -26,7 +26,7 @@ import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState.Custom; import org.opensearch.cluster.Diff; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.NamedDiff; import org.opensearch.cluster.RestoreInProgress; import org.opensearch.cluster.SnapshotDeletionsInProgress; @@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class ClusterSerializationTests extends ESAllocationTestCase { +public class ClusterSerializationTests extends OpenSearchAllocationTestCase { public void testClusterStateSerialization() throws Exception { Metadata metadata = Metadata.builder() diff --git a/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java b/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java index 97344cbf09bdd..b1b982419d7c1 100644 --- a/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexTemplateMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -38,7 +38,7 @@ import static java.util.Collections.emptySet; import static org.hamcrest.Matchers.containsString; -public class ClusterStateToStringTests extends ESAllocationTestCase { +public class ClusterStateToStringTests extends OpenSearchAllocationTestCase { public void testClusterStateSerialization() throws Exception { Metadata metadata = Metadata.builder() .put(IndexMetadata.builder("test_idx").settings(settings(Version.CURRENT)).numberOfShards(10).numberOfReplicas(1)) diff --git a/server/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java b/server/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java index 20cdccdbec5ab..122dbb4ad1d45 100644 --- a/server/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNodes; @@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.sameInstance; -public class RoutingIteratorTests extends ESAllocationTestCase { +public class RoutingIteratorTests extends OpenSearchAllocationTestCase { public void testEmptyIterator() { ShardShuffler shuffler = new RotationShardShuffler(0); ShardIterator shardIterator = new PlainShardIterator( diff --git a/server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java b/server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java index 7ddae76ca2911..3b8389fd6455b 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java @@ -78,7 +78,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.CheckedBiConsumer; import org.opensearch.common.CheckedRunnable; import org.opensearch.common.Randomness; diff --git a/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineRecoveryTests.java b/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineRecoveryTests.java index aa536ff1f5a3e..ef81095691fca 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineRecoveryTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineRecoveryTests.java @@ -26,7 +26,7 @@ import java.io.IOException; -import static org.elasticsearch.cluster.routing.ShardRoutingHelper.initWithSameId; +import static org.opensearch.cluster.routing.ShardRoutingHelper.initWithSameId; public class NoOpEngineRecoveryTests extends IndexShardTestCase { diff --git a/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineTests.java b/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineTests.java index 2a39a85235052..a394356fa3b0e 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/NoOpEngineTests.java @@ -27,7 +27,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.TimeValue; diff --git a/server/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreEquivalenceTests.java b/server/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreEquivalenceTests.java index 0a50a91c2a184..7b77c5c8e6f51 100644 --- a/server/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreEquivalenceTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/functionscore/FunctionScoreEquivalenceTests.java @@ -24,7 +24,7 @@ import org.apache.lucene.search.RandomApproximationQuery; import org.apache.lucene.search.SearchEquivalenceTestBase; import org.apache.lucene.search.TermQuery; -import org.elasticsearch.bootstrap.BootstrapForTesting; +import org.opensearch.bootstrap.BootstrapForTesting; import org.opensearch.common.lucene.search.function.FunctionScoreQuery; public class FunctionScoreEquivalenceTests extends SearchEquivalenceTestBase { diff --git a/server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncActionTests.java b/server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncActionTests.java index 7ffd9d1324c53..73df7909e0382 100644 --- a/server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncActionTests.java +++ b/server/src/test/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncActionTests.java @@ -20,7 +20,7 @@ package org.elasticsearch.index.seqno; import org.opensearch.action.support.ActionFilters; -import org.elasticsearch.action.support.ActionTestUtils; +import org.opensearch.action.support.ActionTestUtils; import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTestCase.java b/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTestCase.java index 467c1b8218986..656f51b13b1ed 100644 --- a/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTestCase.java +++ b/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTestCase.java @@ -23,7 +23,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.settings.Settings; import org.elasticsearch.index.engine.SafeCommitInfo; import org.elasticsearch.index.shard.ShardId; diff --git a/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTests.java b/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTests.java index 813ded10358a5..31bd2a2218242 100644 --- a/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTests.java +++ b/server/src/test/java/org/elasticsearch/index/seqno/ReplicationTrackerTests.java @@ -25,7 +25,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.Randomness; import org.opensearch.common.collect.Tuple; import org.opensearch.common.io.stream.BytesStreamOutput; diff --git a/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseBackgroundSyncActionTests.java b/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseBackgroundSyncActionTests.java index 458a79c6079b0..b5217a5469d57 100644 --- a/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseBackgroundSyncActionTests.java +++ b/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseBackgroundSyncActionTests.java @@ -22,7 +22,7 @@ import org.opensearch.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.support.ActionFilters; -import org.elasticsearch.action.support.ActionTestUtils; +import org.opensearch.action.support.ActionTestUtils; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.action.support.replication.TransportReplicationAction; import org.opensearch.cluster.action.shard.ShardStateAction; diff --git a/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseSyncActionTests.java b/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseSyncActionTests.java index ce68de4083f71..b252bd6bc2608 100644 --- a/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseSyncActionTests.java +++ b/server/src/test/java/org/elasticsearch/index/seqno/RetentionLeaseSyncActionTests.java @@ -22,7 +22,7 @@ import org.opensearch.action.ActionListener; import org.elasticsearch.index.IndexingPressure; import org.opensearch.action.support.ActionFilters; -import org.elasticsearch.action.support.ActionTestUtils; +import org.opensearch.action.support.ActionTestUtils; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.action.support.replication.TransportReplicationAction; import org.opensearch.cluster.action.shard.ShardStateAction; diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardRetentionLeaseTests.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardRetentionLeaseTests.java index 58c2ddec31f1b..de51c570c74cc 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardRetentionLeaseTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardRetentionLeaseTests.java @@ -21,7 +21,7 @@ import org.opensearch.action.ActionListener; import org.opensearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.common.collect.Tuple; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; diff --git a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java index 4d11ac22e5227..e4e26ad283497 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java @@ -49,9 +49,9 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.common.CheckedFunction; import org.opensearch.common.Randomness; @@ -169,7 +169,7 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; -import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; +import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting; import static org.opensearch.common.lucene.Lucene.cleanLuceneIndex; import static org.opensearch.common.xcontent.ToXContent.EMPTY_PARAMS; import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; diff --git a/server/src/test/java/org/elasticsearch/index/shard/NewPathForShardTests.java b/server/src/test/java/org/elasticsearch/index/shard/NewPathForShardTests.java index ca2ee9fdc80a6..59723c6dc3154 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/NewPathForShardTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/NewPathForShardTests.java @@ -22,7 +22,7 @@ import org.apache.lucene.mockfile.FilterFileSystemProvider; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; +import org.opensearch.common.io.PathUtilsForTesting; import org.opensearch.common.settings.Settings; import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; diff --git a/server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandTests.java b/server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandTests.java index d81b10abb1adc..26aa33ca81c84 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandTests.java @@ -23,7 +23,7 @@ import org.apache.lucene.store.BaseDirectoryWrapper; import org.opensearch.OpenSearchException; import org.opensearch.Version; -import org.elasticsearch.cli.MockTerminal; +import org.opensearch.cli.MockTerminal; import org.opensearch.cli.Terminal; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; @@ -31,9 +31,9 @@ import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.CheckedFunction; import org.opensearch.common.UUIDs; import org.opensearch.common.settings.ClusterSettings; diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java index dbd8a2cea74d4..844a579781deb 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java @@ -23,7 +23,7 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.common.settings.Settings; import org.elasticsearch.index.Index; diff --git a/server/src/test/java/org/elasticsearch/indices/cluster/IndicesClusterStateServiceRandomUpdatesTests.java b/server/src/test/java/org/elasticsearch/indices/cluster/IndicesClusterStateServiceRandomUpdatesTests.java index 1059dc8a1e00f..65699364ab4c8 100644 --- a/server/src/test/java/org/elasticsearch/indices/cluster/IndicesClusterStateServiceRandomUpdatesTests.java +++ b/server/src/test/java/org/elasticsearch/indices/cluster/IndicesClusterStateServiceRandomUpdatesTests.java @@ -28,7 +28,7 @@ import org.opensearch.action.admin.indices.open.OpenIndexRequest; import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest; import org.opensearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterChangedEvent; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.action.shard.ShardStateAction; diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetServiceTests.java b/server/src/test/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetServiceTests.java index b3163fdf99b1c..98a27c8eb6e4a 100644 --- a/server/src/test/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetServiceTests.java +++ b/server/src/test/java/org/elasticsearch/indices/recovery/PeerRecoveryTargetServiceTests.java @@ -29,7 +29,7 @@ import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.common.Randomness; import org.opensearch.common.UUIDs; import org.opensearch.common.bytes.BytesArray; diff --git a/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTargetTests.java b/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTargetTests.java index 0da8dde3e35a7..ffb5e111387da 100644 --- a/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTargetTests.java +++ b/server/src/test/java/org/elasticsearch/indices/recovery/RecoveryTargetTests.java @@ -23,7 +23,7 @@ import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.Writeable; diff --git a/server/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java b/server/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java index 268b19a7c8593..03d760f5769a5 100644 --- a/server/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java +++ b/server/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java @@ -23,7 +23,7 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.UnassignedInfo; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/monitor/fs/FsHealthServiceTests.java b/server/src/test/java/org/elasticsearch/monitor/fs/FsHealthServiceTests.java index 7b0459ab7f29f..72d4afe0d8b3f 100644 --- a/server/src/test/java/org/elasticsearch/monitor/fs/FsHealthServiceTests.java +++ b/server/src/test/java/org/elasticsearch/monitor/fs/FsHealthServiceTests.java @@ -24,9 +24,9 @@ import org.apache.logging.log4j.Logger; import org.apache.lucene.mockfile.FilterFileChannel; import org.apache.lucene.mockfile.FilterFileSystemProvider; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; +import org.opensearch.common.io.PathUtilsForTesting; import org.opensearch.common.logging.Loggers; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteTests.java b/server/src/test/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteTests.java index c67fe09340347..f9e137d7f6e6e 100644 --- a/server/src/test/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteTests.java +++ b/server/src/test/java/org/opensearch/action/admin/cluster/reroute/ClusterRerouteTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.action.ActionListener; import org.opensearch.cluster.ClusterState; -import org.opensearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -43,9 +43,6 @@ import org.opensearch.common.unit.TimeValue; import org.opensearch.snapshots.EmptySnapshotsInfoService; import org.opensearch.test.gateway.TestGatewayAllocator; -import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest; -import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse; -import org.opensearch.action.admin.cluster.reroute.TransportClusterRerouteAction; import java.io.IOException; import java.util.Collections; @@ -57,7 +54,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class ClusterRerouteTests extends ESAllocationTestCase { +public class ClusterRerouteTests extends OpenSearchAllocationTestCase { public void testSerializeRequest() throws IOException { ClusterRerouteRequest req = new ClusterRerouteRequest(); diff --git a/server/src/test/java/org/opensearch/common/blobstore/fs/FsBlobContainerTests.java b/server/src/test/java/org/opensearch/common/blobstore/fs/FsBlobContainerTests.java index 8d522614b8793..f2876976259d2 100644 --- a/server/src/test/java/org/opensearch/common/blobstore/fs/FsBlobContainerTests.java +++ b/server/src/test/java/org/opensearch/common/blobstore/fs/FsBlobContainerTests.java @@ -23,7 +23,7 @@ import org.apache.lucene.util.LuceneTestCase; import org.opensearch.common.blobstore.BlobPath; import org.opensearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; +import org.opensearch.common.io.PathUtilsForTesting; import org.opensearch.common.io.Streams; import org.opensearch.core.internal.io.IOUtils; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/common/bytes/BytesArrayTests.java b/server/src/test/java/org/opensearch/common/bytes/BytesArrayTests.java index 4c1569b4f9e1c..83cd2c3cf52de 100644 --- a/server/src/test/java/org/opensearch/common/bytes/BytesArrayTests.java +++ b/server/src/test/java/org/opensearch/common/bytes/BytesArrayTests.java @@ -18,11 +18,8 @@ */ package org.opensearch.common.bytes; -import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.io.stream.BytesStreamOutput; import org.hamcrest.Matchers; -import org.opensearch.common.bytes.BytesArray; -import org.opensearch.common.bytes.BytesReference; import java.io.IOException; diff --git a/server/src/test/java/org/opensearch/common/bytes/CompositeBytesReferenceTests.java b/server/src/test/java/org/opensearch/common/bytes/CompositeBytesReferenceTests.java index 5c1c0ab5acaf7..40af11746c3d3 100644 --- a/server/src/test/java/org/opensearch/common/bytes/CompositeBytesReferenceTests.java +++ b/server/src/test/java/org/opensearch/common/bytes/CompositeBytesReferenceTests.java @@ -21,13 +21,9 @@ import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.BytesRefIterator; -import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.ReleasableBytesStreamOutput; import org.hamcrest.Matchers; -import org.opensearch.common.bytes.BytesArray; -import org.opensearch.common.bytes.BytesReference; -import org.opensearch.common.bytes.CompositeBytesReference; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/opensearch/common/bytes/PagedBytesReferenceTests.java b/server/src/test/java/org/opensearch/common/bytes/PagedBytesReferenceTests.java index 5fce9485c6e6c..3572eb2269485 100644 --- a/server/src/test/java/org/opensearch/common/bytes/PagedBytesReferenceTests.java +++ b/server/src/test/java/org/opensearch/common/bytes/PagedBytesReferenceTests.java @@ -20,12 +20,8 @@ package org.opensearch.common.bytes; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.util.ByteArray; import org.hamcrest.Matchers; -import org.opensearch.common.bytes.BytesArray; -import org.opensearch.common.bytes.BytesReference; -import org.opensearch.common.bytes.PagedBytesReference; import java.io.IOException; diff --git a/server/src/test/java/org/opensearch/common/bytes/RecyclingBytesStreamOutputTests.java b/server/src/test/java/org/opensearch/common/bytes/RecyclingBytesStreamOutputTests.java index 891046542165e..d24326868bf7e 100644 --- a/server/src/test/java/org/opensearch/common/bytes/RecyclingBytesStreamOutputTests.java +++ b/server/src/test/java/org/opensearch/common/bytes/RecyclingBytesStreamOutputTests.java @@ -21,11 +21,10 @@ import org.apache.lucene.util.BytesRef; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; -import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; +import org.opensearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.test.ESTestCase; -import org.opensearch.common.bytes.RecyclingBytesStreamOutput; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/server/src/test/java/org/opensearch/common/bytes/ReleasableBytesReferenceTests.java b/server/src/test/java/org/opensearch/common/bytes/ReleasableBytesReferenceTests.java index c893fc5bbad29..c91bf49fa64d2 100644 --- a/server/src/test/java/org/opensearch/common/bytes/ReleasableBytesReferenceTests.java +++ b/server/src/test/java/org/opensearch/common/bytes/ReleasableBytesReferenceTests.java @@ -19,15 +19,10 @@ package org.opensearch.common.bytes; -import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.ReleasableBytesStreamOutput; import org.opensearch.common.util.ByteArray; import org.hamcrest.Matchers; -import org.opensearch.common.bytes.BytesArray; -import org.opensearch.common.bytes.BytesReference; -import org.opensearch.common.bytes.CompositeBytesReference; -import org.opensearch.common.bytes.ReleasableBytesReference; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutputTests.java b/server/src/test/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutputTests.java index 76b15ae961d14..1a7d3167ed93f 100644 --- a/server/src/test/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutputTests.java +++ b/server/src/test/java/org/opensearch/common/io/stream/ReleasableBytesStreamOutputTests.java @@ -20,8 +20,8 @@ package org.opensearch.common.io.stream; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.test.ESTestCase; import org.opensearch.common.io.stream.ReleasableBytesStreamOutput; diff --git a/server/src/test/java/org/opensearch/common/logging/JsonThrowablePatternConverterTests.java b/server/src/test/java/org/opensearch/common/logging/JsonThrowablePatternConverterTests.java index 0fdfc6fe40dc7..6698bc7d8f73b 100644 --- a/server/src/test/java/org/opensearch/common/logging/JsonThrowablePatternConverterTests.java +++ b/server/src/test/java/org/opensearch/common/logging/JsonThrowablePatternConverterTests.java @@ -27,6 +27,8 @@ import org.elasticsearch.common.logging.JsonLogsStream; import org.elasticsearch.test.ESTestCase; import org.hamcrest.Matchers; +import org.opensearch.common.logging.JsonLogLine; +import org.opensearch.common.logging.JsonLogsStream; import org.opensearch.common.logging.JsonThrowablePatternConverter; import java.io.BufferedReader; diff --git a/server/src/test/java/org/opensearch/common/lucene/store/ByteArrayIndexInputTests.java b/server/src/test/java/org/opensearch/common/lucene/store/ByteArrayIndexInputTests.java index fa9120fcd92a3..1046155726ac1 100644 --- a/server/src/test/java/org/opensearch/common/lucene/store/ByteArrayIndexInputTests.java +++ b/server/src/test/java/org/opensearch/common/lucene/store/ByteArrayIndexInputTests.java @@ -20,14 +20,13 @@ package org.opensearch.common.lucene.store; import org.elasticsearch.common.lucene.store.ESIndexInputTestCase; -import org.opensearch.common.lucene.store.ByteArrayIndexInput; import java.io.IOException; import java.nio.charset.StandardCharsets; import static org.hamcrest.Matchers.containsString; -public class ByteArrayIndexInputTests extends ESIndexInputTestCase { +public class ByteArrayIndexInputTests extends OpenSearchIndexInputTestCase { public void testRandomReads() throws IOException { for (int i = 0; i < 100; i++) { byte[] input = randomUnicodeOfLength(randomIntBetween(1, 1000)).getBytes(StandardCharsets.UTF_8); diff --git a/server/src/test/java/org/opensearch/common/settings/ConsistentSettingsServiceTests.java b/server/src/test/java/org/opensearch/common/settings/ConsistentSettingsServiceTests.java index 4dd3e684b237c..aac73635ed273 100644 --- a/server/src/test/java/org/opensearch/common/settings/ConsistentSettingsServiceTests.java +++ b/server/src/test/java/org/opensearch/common/settings/ConsistentSettingsServiceTests.java @@ -28,6 +28,7 @@ import org.junit.Before; import org.mockito.stubbing.Answer; import org.opensearch.common.settings.ConsistentSettingsService; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.SecureSetting; import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/opensearch/common/settings/ScopedSettingsTests.java b/server/src/test/java/org/opensearch/common/settings/ScopedSettingsTests.java index b6a068cdbb4e3..ffc3bf6caa53d 100644 --- a/server/src/test/java/org/opensearch/common/settings/ScopedSettingsTests.java +++ b/server/src/test/java/org/opensearch/common/settings/ScopedSettingsTests.java @@ -27,6 +27,7 @@ import org.opensearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider; import org.opensearch.common.collect.Tuple; import org.opensearch.common.logging.Loggers; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.Setting.Property; import org.opensearch.index.IndexModule; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/common/settings/SettingTests.java b/server/src/test/java/org/opensearch/common/settings/SettingTests.java index d3f61d1beb772..268328c977dae 100644 --- a/server/src/test/java/org/opensearch/common/settings/SettingTests.java +++ b/server/src/test/java/org/opensearch/common/settings/SettingTests.java @@ -29,6 +29,7 @@ import org.opensearch.common.settings.AbstractScopedSettings; import org.opensearch.common.settings.AbstractScopedSettings.SettingUpdater; import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Setting.Property; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/opensearch/common/settings/SettingsModuleTests.java b/server/src/test/java/org/opensearch/common/settings/SettingsModuleTests.java index a49c338e0c262..ade56b272d6c6 100644 --- a/server/src/test/java/org/opensearch/common/settings/SettingsModuleTests.java +++ b/server/src/test/java/org/opensearch/common/settings/SettingsModuleTests.java @@ -19,15 +19,9 @@ package org.opensearch.common.settings; -import org.elasticsearch.common.inject.ModuleTestCase; -import org.elasticsearch.common.settings.MockSecureSettings; -import org.opensearch.common.settings.SecureSetting; -import org.opensearch.common.settings.Setting; +import org.opensearch.common.inject.ModuleTestCase; import org.opensearch.common.settings.Setting.Property; import org.hamcrest.Matchers; -import org.opensearch.common.settings.Settings; -import org.opensearch.common.settings.SettingsFilter; -import org.opensearch.common.settings.SettingsModule; import java.util.Arrays; diff --git a/server/src/test/java/org/opensearch/common/settings/SettingsTests.java b/server/src/test/java/org/opensearch/common/settings/SettingsTests.java index 913686fceb47c..0bb3949b9769a 100644 --- a/server/src/test/java/org/opensearch/common/settings/SettingsTests.java +++ b/server/src/test/java/org/opensearch/common/settings/SettingsTests.java @@ -26,6 +26,7 @@ import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.SecureSetting; import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.Setting; diff --git a/server/src/test/java/org/opensearch/common/util/BigArraysTests.java b/server/src/test/java/org/opensearch/common/util/BigArraysTests.java index 98145c0970ea9..eb5b9ba0d2168 100644 --- a/server/src/test/java/org/opensearch/common/util/BigArraysTests.java +++ b/server/src/test/java/org/opensearch/common/util/BigArraysTests.java @@ -44,6 +44,8 @@ import org.opensearch.common.util.FloatArray; import org.opensearch.common.util.IntArray; import org.opensearch.common.util.LongArray; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.ObjectArray; import org.opensearch.common.util.PageCacheRecycler; diff --git a/server/src/test/java/org/opensearch/common/util/BinarySearcherTests.java b/server/src/test/java/org/opensearch/common/util/BinarySearcherTests.java index ed972773112e7..980f8ab747059 100644 --- a/server/src/test/java/org/opensearch/common/util/BinarySearcherTests.java +++ b/server/src/test/java/org/opensearch/common/util/BinarySearcherTests.java @@ -30,6 +30,8 @@ import org.opensearch.common.util.BigDoubleArray; import org.opensearch.common.util.BinarySearcher; import org.opensearch.common.util.DoubleArray; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import java.util.Arrays; diff --git a/server/src/test/java/org/opensearch/common/util/BytesRefHashTests.java b/server/src/test/java/org/opensearch/common/util/BytesRefHashTests.java index c4f514e376a98..e3b6e17348bf8 100644 --- a/server/src/test/java/org/opensearch/common/util/BytesRefHashTests.java +++ b/server/src/test/java/org/opensearch/common/util/BytesRefHashTests.java @@ -32,6 +32,8 @@ import org.elasticsearch.test.ESTestCase; import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.BytesRefHash; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import java.util.HashMap; import java.util.HashSet; diff --git a/server/src/test/java/org/opensearch/common/util/LongHashTests.java b/server/src/test/java/org/opensearch/common/util/LongHashTests.java index 5cf73648e967c..c7101a041ba5d 100644 --- a/server/src/test/java/org/opensearch/common/util/LongHashTests.java +++ b/server/src/test/java/org/opensearch/common/util/LongHashTests.java @@ -30,6 +30,8 @@ import org.elasticsearch.test.ESTestCase; import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.LongHash; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import java.util.HashMap; import java.util.HashSet; diff --git a/server/src/test/java/org/opensearch/common/util/LongLongHashTests.java b/server/src/test/java/org/opensearch/common/util/LongLongHashTests.java index 26bbd6cf2bd5e..3edb7c4d746dd 100644 --- a/server/src/test/java/org/opensearch/common/util/LongLongHashTests.java +++ b/server/src/test/java/org/opensearch/common/util/LongLongHashTests.java @@ -26,6 +26,8 @@ import org.elasticsearch.test.ESTestCase; import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.LongLongHash; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import java.util.ArrayList; import java.util.HashMap; diff --git a/server/src/test/java/org/opensearch/common/util/LongObjectHashMapTests.java b/server/src/test/java/org/opensearch/common/util/LongObjectHashMapTests.java index 74c18b7290519..724432c1421b8 100644 --- a/server/src/test/java/org/opensearch/common/util/LongObjectHashMapTests.java +++ b/server/src/test/java/org/opensearch/common/util/LongObjectHashMapTests.java @@ -27,6 +27,8 @@ import org.elasticsearch.test.ESTestCase; import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.LongObjectPagedHashMap; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; public class LongObjectHashMapTests extends ESTestCase { diff --git a/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java b/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java index badc84040aa2b..abc7a022e53f3 100644 --- a/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java +++ b/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java @@ -20,7 +20,7 @@ package org.opensearch.node; import org.opensearch.cluster.ClusterName; -import org.elasticsearch.common.settings.MockSecureSettings; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.SecureSetting; import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.Setting; diff --git a/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryRestoreTests.java b/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryRestoreTests.java index 0427492ffb721..749dd7257f6e0 100644 --- a/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryRestoreTests.java +++ b/server/src/test/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryRestoreTests.java @@ -27,7 +27,7 @@ import org.opensearch.cluster.metadata.RepositoryMetadata; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.UUIDs; import org.opensearch.common.settings.ClusterSettings; diff --git a/server/src/test/java/org/opensearch/repositories/fs/FsRepositoryTests.java b/server/src/test/java/org/opensearch/repositories/fs/FsRepositoryTests.java index 47cc9cdb23e54..e2a13e843c199 100644 --- a/server/src/test/java/org/opensearch/repositories/fs/FsRepositoryTests.java +++ b/server/src/test/java/org/opensearch/repositories/fs/FsRepositoryTests.java @@ -41,7 +41,7 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.common.lucene.Lucene; import org.opensearch.common.settings.ClusterSettings; diff --git a/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java index ea9586f9dc0dc..5c8537977e6d6 100644 --- a/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java +++ b/server/src/test/java/org/opensearch/rest/action/cat/RestIndicesActionTests.java @@ -27,7 +27,7 @@ import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.routing.IndexRoutingTable; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.Table; import org.opensearch.common.UUIDs; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java index 442c06b2016f6..02b9fc7e1c0a2 100644 --- a/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java +++ b/server/src/test/java/org/opensearch/rest/action/cat/RestRecoveryActionTests.java @@ -24,7 +24,7 @@ import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.RecoverySource.SnapshotRecoverySource; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.Randomness; import org.opensearch.common.Table; import org.opensearch.common.unit.TimeValue; diff --git a/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java b/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java index c200e1c066ead..54306fade126e 100644 --- a/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java +++ b/server/src/test/java/org/opensearch/rest/action/cat/RestShardsActionTests.java @@ -31,7 +31,7 @@ import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.Table; import org.elasticsearch.index.shard.ShardPath; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/search/DefaultSearchContextTests.java b/server/src/test/java/org/opensearch/search/DefaultSearchContextTests.java index 636332b20125b..272fac72a77da 100644 --- a/server/src/test/java/org/opensearch/search/DefaultSearchContextTests.java +++ b/server/src/test/java/org/opensearch/search/DefaultSearchContextTests.java @@ -35,8 +35,8 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.index.IndexService; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.cache.IndexCache; diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/histogram/InternalVariableWidthHistogramTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/histogram/InternalVariableWidthHistogramTests.java index 98a44daed01cb..fb1db73869cce 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/histogram/InternalVariableWidthHistogramTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/histogram/InternalVariableWidthHistogramTests.java @@ -22,8 +22,8 @@ import org.apache.lucene.util.TestUtil; import org.opensearch.common.breaker.CircuitBreaker; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.script.ScriptService; import org.opensearch.search.DocValueFormat; diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/sampler/BestDocsDeferringCollectorTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/sampler/BestDocsDeferringCollectorTests.java index 4482d8b8e2311..9f2065cb464d0 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/sampler/BestDocsDeferringCollectorTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/sampler/BestDocsDeferringCollectorTests.java @@ -33,8 +33,8 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.search.aggregations.AggregatorTestCase; import org.opensearch.search.aggregations.BucketCollector; diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrdsTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrdsTests.java index 43de51819bfcf..267bda291a8ea 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrdsTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/BytesKeyedBucketOrdsTests.java @@ -21,8 +21,8 @@ import org.apache.lucene.util.BytesRef; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.search.aggregations.CardinalityUpperBound; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrdsTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrdsTests.java index 71524e0f6fae7..c696f7347b1f7 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrdsTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/LongKeyedBucketOrdsTests.java @@ -20,8 +20,8 @@ package org.opensearch.search.aggregations.bucket.terms; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.search.aggregations.CardinalityUpperBound; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorTests.java b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorTests.java index dbce0f72714bf..e7a8adf811221 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/bucket/terms/TermsAggregatorTests.java @@ -44,8 +44,8 @@ import org.opensearch.common.network.InetAddresses; import org.opensearch.common.settings.Settings; import org.opensearch.common.text.Text; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.index.mapper.DocumentMapper; import org.elasticsearch.index.mapper.GeoPointFieldMapper; import org.elasticsearch.index.mapper.IdFieldMapper; diff --git a/server/src/test/java/org/opensearch/search/aggregations/metrics/InternalCardinalityTests.java b/server/src/test/java/org/opensearch/search/aggregations/metrics/InternalCardinalityTests.java index 1e80869bcf671..5ab873abd6cd0 100644 --- a/server/src/test/java/org/opensearch/search/aggregations/metrics/InternalCardinalityTests.java +++ b/server/src/test/java/org/opensearch/search/aggregations/metrics/InternalCardinalityTests.java @@ -22,8 +22,8 @@ import com.carrotsearch.hppc.BitMixer; import org.opensearch.common.lease.Releasables; import org.opensearch.common.settings.Settings; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.search.aggregations.ParsedAggregation; import org.elasticsearch.test.InternalAggregationTestCase; diff --git a/server/src/test/java/org/opensearch/search/sort/BucketedSortTestCase.java b/server/src/test/java/org/opensearch/search/sort/BucketedSortTestCase.java index cec21ac6681e3..cb3437f5378de 100644 --- a/server/src/test/java/org/opensearch/search/sort/BucketedSortTestCase.java +++ b/server/src/test/java/org/opensearch/search/sort/BucketedSortTestCase.java @@ -25,8 +25,8 @@ import org.opensearch.common.util.BigArrays; import org.opensearch.common.util.BitArray; import org.opensearch.common.util.IntArray; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.search.DocValueFormat; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/opensearch/snapshots/InternalSnapshotsInfoServiceTests.java b/server/src/test/java/org/opensearch/snapshots/InternalSnapshotsInfoServiceTests.java index 3a81739cc0be8..408815e9110bc 100644 --- a/server/src/test/java/org/opensearch/snapshots/InternalSnapshotsInfoServiceTests.java +++ b/server/src/test/java/org/opensearch/snapshots/InternalSnapshotsInfoServiceTests.java @@ -23,7 +23,7 @@ import org.opensearch.Version; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.RestoreInProgress; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; @@ -319,12 +319,12 @@ public IndexShardSnapshotStatus getShardSnapshotStatus(SnapshotId snapshotId, In if (randomBoolean()) { // simulate initialization and start of the shards - final AllocationService allocationService = ESAllocationTestCase.createAllocationService(Settings.builder() + final AllocationService allocationService = OpenSearchAllocationTestCase.createAllocationService(Settings.builder() .put(CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING.getKey(), nbShards) .put(CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING.getKey(), nbShards) .build(), snapshotsInfoService); applyClusterState("starting shards for " + indexName, clusterState -> - ESAllocationTestCase.startInitializingShardsAndReroute(allocationService, clusterState, indexName)); + OpenSearchAllocationTestCase.startInitializingShardsAndReroute(allocationService, clusterState, indexName)); assertTrue(clusterService.state().routingTable().shardsWithState(ShardRoutingState.UNASSIGNED).isEmpty()); } else { diff --git a/server/src/test/java/org/opensearch/snapshots/RestoreServiceTests.java b/server/src/test/java/org/opensearch/snapshots/RestoreServiceTests.java index c3fcf69f18a27..91efaef401cc2 100644 --- a/server/src/test/java/org/opensearch/snapshots/RestoreServiceTests.java +++ b/server/src/test/java/org/opensearch/snapshots/RestoreServiceTests.java @@ -29,7 +29,7 @@ import java.util.Collections; import java.util.List; -import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; +import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java b/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java index 1d15b10897159..22433dedd0425 100644 --- a/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java +++ b/server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java @@ -79,7 +79,7 @@ import org.opensearch.action.search.SearchTransportService; import org.opensearch.action.search.TransportSearchAction; import org.opensearch.action.support.ActionFilters; -import org.elasticsearch.action.support.ActionTestUtils; +import org.opensearch.action.support.ActionTestUtils; import org.opensearch.action.support.ActiveShardCount; import org.opensearch.action.support.AutoCreateIndex; import org.opensearch.action.support.DestructiveOperations; @@ -96,23 +96,23 @@ import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateListener; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.NodeConnectionsService; import org.opensearch.cluster.SnapshotDeletionsInProgress; import org.opensearch.cluster.SnapshotsInProgress; import org.opensearch.cluster.action.index.MappingUpdatedAction; import org.opensearch.cluster.action.index.NodeMappingRefreshAction; import org.opensearch.cluster.action.shard.ShardStateAction; -import org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase; +import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase; import org.opensearch.cluster.coordination.ClusterBootstrapService; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationState; import org.opensearch.cluster.coordination.Coordinator; import org.elasticsearch.cluster.coordination.CoordinatorTests; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.coordination.ElectionStrategy; import org.opensearch.cluster.coordination.InMemoryPersistedState; -import org.elasticsearch.cluster.coordination.MockSinglePrioritizingExecutor; +import org.opensearch.cluster.coordination.MockSinglePrioritizingExecutor; import org.opensearch.cluster.metadata.AliasValidator; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; @@ -131,7 +131,7 @@ import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; import org.opensearch.cluster.service.ClusterApplierService; import org.opensearch.cluster.service.ClusterService; -import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; +import org.opensearch.cluster.service.FakeThreadPoolMasterService; import org.elasticsearch.cluster.service.MasterService; import org.opensearch.common.CheckedConsumer; import org.opensearch.common.Nullable; @@ -220,7 +220,7 @@ import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; -import static org.elasticsearch.action.support.ActionTestUtils.assertNoFailureListener; +import static org.opensearch.action.support.ActionTestUtils.assertNoFailureListener; import static org.opensearch.env.Environment.PATH_HOME_SETTING; import static org.opensearch.monitor.StatusInfo.Status.HEALTHY; import static org.opensearch.node.Node.NODE_NAME_SETTING; @@ -1498,7 +1498,7 @@ public void onFailure(final Exception e) { final SetOnce rerouteServiceSetOnce = new SetOnce<>(); final SnapshotsInfoService snapshotsInfoService = new InternalSnapshotsInfoService(settings, clusterService, () -> repositoriesService, rerouteServiceSetOnce::get); - allocationService = ESAllocationTestCase.createAllocationService(settings, snapshotsInfoService); + allocationService = OpenSearchAllocationTestCase.createAllocationService(settings, snapshotsInfoService); rerouteService = new BatchedRerouteService(clusterService, allocationService::reroute); rerouteServiceSetOnce.set(rerouteService); final IndexScopedSettings indexScopedSettings = diff --git a/server/src/test/java/org/opensearch/snapshots/SnapshotsServiceTests.java b/server/src/test/java/org/opensearch/snapshots/SnapshotsServiceTests.java index cb4d43336ce65..f1f5ca7f8ac88 100644 --- a/server/src/test/java/org/opensearch/snapshots/SnapshotsServiceTests.java +++ b/server/src/test/java/org/opensearch/snapshots/SnapshotsServiceTests.java @@ -29,7 +29,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.UUIDs; import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.settings.Settings; diff --git a/server/src/test/java/org/opensearch/transport/InboundAggregatorTests.java b/server/src/test/java/org/opensearch/transport/InboundAggregatorTests.java index 454f7a786402c..255d00892a684 100644 --- a/server/src/test/java/org/opensearch/transport/InboundAggregatorTests.java +++ b/server/src/test/java/org/opensearch/transport/InboundAggregatorTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.common.breaker.CircuitBreakingException; -import org.elasticsearch.common.breaker.TestCircuitBreaker; +import org.opensearch.common.breaker.TestCircuitBreaker; import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.ReleasableBytesReference; import org.opensearch.common.collect.Tuple; diff --git a/server/src/test/java/org/opensearch/transport/InboundPipelineTests.java b/server/src/test/java/org/opensearch/transport/InboundPipelineTests.java index eb3ad048a12dd..058ec6ceb46bf 100644 --- a/server/src/test/java/org/opensearch/transport/InboundPipelineTests.java +++ b/server/src/test/java/org/opensearch/transport/InboundPipelineTests.java @@ -23,7 +23,7 @@ import org.opensearch.common.breaker.CircuitBreaker; import org.opensearch.common.breaker.CircuitBreakingException; import org.opensearch.common.breaker.NoopCircuitBreaker; -import org.elasticsearch.common.breaker.TestCircuitBreaker; +import org.opensearch.common.breaker.TestCircuitBreaker; import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.bytes.ReleasableBytesReference; diff --git a/server/src/test/java/org/opensearch/transport/TcpTransportTests.java b/server/src/test/java/org/opensearch/transport/TcpTransportTests.java index 98f40a556539d..e8e7e48d5c330 100644 --- a/server/src/test/java/org/opensearch/transport/TcpTransportTests.java +++ b/server/src/test/java/org/opensearch/transport/TcpTransportTests.java @@ -33,7 +33,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.MockLogAppender; diff --git a/server/src/test/java/org/opensearch/transport/TransportServiceDeserializationFailureTests.java b/server/src/test/java/org/opensearch/transport/TransportServiceDeserializationFailureTests.java index f4b01f5953f77..49a0863fd8d34 100644 --- a/server/src/test/java/org/opensearch/transport/TransportServiceDeserializationFailureTests.java +++ b/server/src/test/java/org/opensearch/transport/TransportServiceDeserializationFailureTests.java @@ -22,7 +22,7 @@ import org.opensearch.Version; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.cluster.ClusterName; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.settings.Settings; diff --git a/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java index 13e398ea6dd27..6a4ab7b435d0a 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/index/replication/ESIndexLevelReplicationTestCase.java @@ -36,7 +36,7 @@ import org.opensearch.action.resync.ResyncReplicationRequest; import org.opensearch.action.resync.ResyncReplicationResponse; import org.opensearch.action.resync.TransportResyncReplicationAction; -import org.elasticsearch.action.support.ActionTestUtils; +import org.opensearch.action.support.ActionTestUtils; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.action.support.WriteRequest; import org.opensearch.action.support.replication.PendingReplicationActions; @@ -47,7 +47,7 @@ import org.opensearch.action.support.replication.TransportReplicationAction; import org.opensearch.action.support.replication.TransportReplicationAction.ReplicaResponse; import org.opensearch.action.support.replication.TransportWriteAction; -import org.elasticsearch.action.support.replication.TransportWriteActionTestHelper; +import org.opensearch.action.support.replication.TransportWriteActionTestHelper; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; @@ -55,9 +55,9 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.collect.Iterators; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.StreamInput; diff --git a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java index 6c61df047dac9..f31459c0b37c3 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java @@ -32,9 +32,9 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingHelper; +import org.opensearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.common.CheckedFunction; import org.opensearch.common.Nullable; import org.opensearch.common.UUIDs; @@ -99,7 +99,7 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; +import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; diff --git a/test/framework/src/main/java/org/elasticsearch/index/store/EsBaseDirectoryTestCase.java b/test/framework/src/main/java/org/elasticsearch/index/store/EsBaseDirectoryTestCase.java index 771188341a720..8b46254e2df7f 100644 --- a/test/framework/src/main/java/org/elasticsearch/index/store/EsBaseDirectoryTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/index/store/EsBaseDirectoryTestCase.java @@ -27,7 +27,7 @@ import org.apache.lucene.store.BaseDirectoryTestCase; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TimeUnits; -import org.elasticsearch.bootstrap.BootstrapForTesting; +import org.opensearch.bootstrap.BootstrapForTesting; import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter; /** diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java index 9def8a37e81e6..f72a89cf0e037 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -48,7 +48,7 @@ import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.TimeUnits; import org.opensearch.Version; -import org.elasticsearch.bootstrap.BootstrapForTesting; +import org.opensearch.bootstrap.BootstrapForTesting; import org.opensearch.bootstrap.JavaVersion; import org.opensearch.client.Requests; import org.opensearch.cluster.ClusterModule; @@ -59,7 +59,7 @@ import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; +import org.opensearch.common.io.PathUtilsForTesting; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.NamedWriteable; import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; @@ -76,8 +76,8 @@ import org.opensearch.common.time.DateUtils; import org.opensearch.common.time.FormatNames; import org.opensearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.set.Sets; import org.opensearch.common.xcontent.LoggingDeprecationHandler; diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java index 165c7b49ee435..8316b45502472 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTokenStreamTestCase.java @@ -26,7 +26,7 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TimeUnits; import org.opensearch.Version; -import org.elasticsearch.bootstrap.BootstrapForTesting; +import org.opensearch.bootstrap.BootstrapForTesting; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.common.settings.Settings; import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter; diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java index 04c64c6f8841e..5c6efd680c0e0 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalAggregationTestCase.java @@ -26,8 +26,8 @@ import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.xcontent.ContextParser; import org.opensearch.common.xcontent.NamedXContentRegistry; import org.opensearch.common.xcontent.ToXContent; diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java index b793ba3cdf386..d5024b244df36 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java @@ -65,7 +65,7 @@ import org.opensearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.lease.Releasables; import org.opensearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.MockSecureSettings; +import org.opensearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.SecureSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings.Builder; diff --git a/test/framework/src/main/java/org/elasticsearch/test/disruption/DisruptableMockTransport.java b/test/framework/src/main/java/org/elasticsearch/test/disruption/DisruptableMockTransport.java index 178f30470559e..34bcdfc4ea623 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/disruption/DisruptableMockTransport.java +++ b/test/framework/src/main/java/org/elasticsearch/test/disruption/DisruptableMockTransport.java @@ -21,7 +21,7 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.ActionListener; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.Nullable; import org.opensearch.common.settings.ClusterSettings; diff --git a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java index 0987583862116..906b63fbecb66 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java +++ b/test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java @@ -36,7 +36,7 @@ import org.opensearch.common.transport.BoundTransportAddress; import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.unit.TimeValue; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.concurrent.AbstractRunnable; import org.opensearch.common.util.concurrent.RunOnce; import org.opensearch.core.internal.io.IOUtils; diff --git a/test/framework/src/main/java/org/elasticsearch/action/support/ActionTestUtils.java b/test/framework/src/main/java/org/opensearch/action/support/ActionTestUtils.java similarity index 95% rename from test/framework/src/main/java/org/elasticsearch/action/support/ActionTestUtils.java rename to test/framework/src/main/java/org/opensearch/action/support/ActionTestUtils.java index cd8e798def895..91ae2583af7a5 100644 --- a/test/framework/src/main/java/org/elasticsearch/action/support/ActionTestUtils.java +++ b/test/framework/src/main/java/org/opensearch/action/support/ActionTestUtils.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.support; +package org.opensearch.action.support; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; diff --git a/test/framework/src/main/java/org/elasticsearch/action/support/replication/ClusterStateCreationUtils.java b/test/framework/src/main/java/org/opensearch/action/support/replication/ClusterStateCreationUtils.java similarity index 99% rename from test/framework/src/main/java/org/elasticsearch/action/support/replication/ClusterStateCreationUtils.java rename to test/framework/src/main/java/org/opensearch/action/support/replication/ClusterStateCreationUtils.java index 1f52991db67f4..b4aed94fc3c85 100644 --- a/test/framework/src/main/java/org/elasticsearch/action/support/replication/ClusterStateCreationUtils.java +++ b/test/framework/src/main/java/org/opensearch/action/support/replication/ClusterStateCreationUtils.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -18,7 +18,7 @@ */ -package org.elasticsearch.action.support.replication; +package org.opensearch.action.support.replication; import org.opensearch.Version; import org.opensearch.cluster.ClusterName; @@ -35,7 +35,7 @@ import org.opensearch.cluster.routing.RoutingTable.Builder; import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.common.settings.Settings; import org.elasticsearch.index.shard.ShardId; diff --git a/test/framework/src/main/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java b/test/framework/src/main/java/org/opensearch/action/support/replication/TransportWriteActionTestHelper.java similarity index 95% rename from test/framework/src/main/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java rename to test/framework/src/main/java/org/opensearch/action/support/replication/TransportWriteActionTestHelper.java index 45092e22c2d37..92c2f0a40cf55 100644 --- a/test/framework/src/main/java/org/elasticsearch/action/support/replication/TransportWriteActionTestHelper.java +++ b/test/framework/src/main/java/org/opensearch/action/support/replication/TransportWriteActionTestHelper.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.support.replication; +package org.opensearch.action.support.replication; import org.apache.logging.log4j.Logger; import org.opensearch.action.support.WriteRequest; diff --git a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java b/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java rename to test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java index 6defe8f2e42ca..fa9ed1888dae1 100644 --- a/test/framework/src/main/java/org/elasticsearch/bootstrap/BootstrapForTesting.java +++ b/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,13 +17,12 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; import com.carrotsearch.randomizedtesting.RandomizedRunner; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.LuceneTestCase; -import org.opensearch.bootstrap.JarHell; import org.opensearch.common.Booleans; import org.opensearch.common.Strings; import org.opensearch.common.SuppressForbidden; @@ -32,12 +31,6 @@ import org.opensearch.common.network.IfConfig; import org.opensearch.common.settings.Settings; import org.elasticsearch.plugins.PluginInfo; -import org.opensearch.bootstrap.Bootstrap; -import org.opensearch.bootstrap.BootstrapInfo; -import org.opensearch.bootstrap.BootstrapSettings; -import org.opensearch.bootstrap.FilePermissionUtils; -import org.opensearch.bootstrap.OpenSearchPolicy; -import org.opensearch.bootstrap.Security; import org.opensearch.secure_sm.SecureSM; import org.junit.Assert; diff --git a/test/framework/src/main/java/org/elasticsearch/bootstrap/ESOpenSearchCliTestCase.java b/test/framework/src/main/java/org/opensearch/bootstrap/OpenSearchCliTestCase.java similarity index 90% rename from test/framework/src/main/java/org/elasticsearch/bootstrap/ESOpenSearchCliTestCase.java rename to test/framework/src/main/java/org/opensearch/bootstrap/OpenSearchCliTestCase.java index 51ae8ea6a4fe6..2895e6d33b172 100644 --- a/test/framework/src/main/java/org/elasticsearch/bootstrap/ESOpenSearchCliTestCase.java +++ b/test/framework/src/main/java/org/opensearch/bootstrap/OpenSearchCliTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.bootstrap; +package org.opensearch.bootstrap; -import org.elasticsearch.cli.MockTerminal; +import org.opensearch.cli.MockTerminal; import org.opensearch.cli.UserException; import org.opensearch.common.settings.Settings; -import org.elasticsearch.env.Environment; +import org.opensearch.env.Environment; import org.elasticsearch.test.ESTestCase; import java.nio.file.Path; @@ -32,7 +32,7 @@ import static org.hamcrest.CoreMatchers.equalTo; -abstract class ESElasticsearchCliTestCase extends ESTestCase { +abstract class OpenSearchCliTestCase extends ESTestCase { interface InitConsumer { void accept(boolean foreground, Path pidFile, boolean quiet, Environment initialEnv); @@ -48,7 +48,7 @@ void runTest( final Path home = createTempDir(); try { final AtomicBoolean init = new AtomicBoolean(); - final int status = Elasticsearch.main(args, new Elasticsearch() { + final int status = OpenSearch.main(args, new OpenSearch() { @Override protected Environment createEnv(final Map settings) throws UserException { Settings.Builder builder = Settings.builder().put("path.home", home); diff --git a/test/framework/src/main/java/org/elasticsearch/cli/CommandTestCase.java b/test/framework/src/main/java/org/opensearch/cli/CommandTestCase.java similarity index 92% rename from test/framework/src/main/java/org/elasticsearch/cli/CommandTestCase.java rename to test/framework/src/main/java/org/opensearch/cli/CommandTestCase.java index 484520f65ace7..a084e560f3f25 100644 --- a/test/framework/src/main/java/org/elasticsearch/cli/CommandTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cli/CommandTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,12 +17,10 @@ * under the License. */ -package org.elasticsearch.cli; +package org.opensearch.cli; import org.elasticsearch.test.ESTestCase; import org.junit.Before; -import org.opensearch.cli.Command; -import org.opensearch.cli.Terminal; /** * A base test case for cli tools. diff --git a/test/framework/src/main/java/org/elasticsearch/cli/MockTerminal.java b/test/framework/src/main/java/org/opensearch/cli/MockTerminal.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/cli/MockTerminal.java rename to test/framework/src/main/java/org/opensearch/cli/MockTerminal.java index 5e628b99f3d19..579e11e53e84f 100644 --- a/test/framework/src/main/java/org/elasticsearch/cli/MockTerminal.java +++ b/test/framework/src/main/java/org/opensearch/cli/MockTerminal.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cli; +package org.opensearch.cli; import org.opensearch.cli.Terminal; diff --git a/test/framework/src/main/java/org/elasticsearch/client/RestClientBuilderTestCase.java b/test/framework/src/main/java/org/opensearch/client/RestClientBuilderTestCase.java similarity index 95% rename from test/framework/src/main/java/org/elasticsearch/client/RestClientBuilderTestCase.java rename to test/framework/src/main/java/org/opensearch/client/RestClientBuilderTestCase.java index 086dca0d94911..34d8424d774e2 100644 --- a/test/framework/src/main/java/org/elasticsearch/client/RestClientBuilderTestCase.java +++ b/test/framework/src/main/java/org/opensearch/client/RestClientBuilderTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.client; +package org.opensearch.client; import java.util.HashMap; import java.util.Map; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/DataStreamTestHelper.java b/test/framework/src/main/java/org/opensearch/cluster/DataStreamTestHelper.java similarity index 99% rename from test/framework/src/main/java/org/elasticsearch/cluster/DataStreamTestHelper.java rename to test/framework/src/main/java/org/opensearch/cluster/DataStreamTestHelper.java index 201075c3d81e1..20ddc59bf452b 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/DataStreamTestHelper.java +++ b/test/framework/src/main/java/org/opensearch/cluster/DataStreamTestHelper.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.apache.lucene.util.LuceneTestCase; import org.opensearch.Version; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java b/test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java similarity index 96% rename from test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java rename to test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java index f9d9535d63773..5351ece2d3274 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/MockInternalClusterInfoService.java +++ b/test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.client.node.NodeClient; @@ -28,8 +28,6 @@ import org.opensearch.common.unit.TimeValue; import org.opensearch.monitor.fs.FsInfo; import org.opensearch.plugins.Plugin; -import org.opensearch.cluster.ClusterInfo; -import org.opensearch.cluster.InternalClusterInfoService; import org.opensearch.threadpool.ThreadPool; import java.util.List; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/ESAllocationTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationTestCase.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/cluster/ESAllocationTestCase.java rename to test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationTestCase.java index 94b1b49c1a08c..d53722b881e17 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/ESAllocationTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/OpenSearchAllocationTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.Version; import org.opensearch.cluster.node.DiscoveryNode; @@ -60,7 +60,7 @@ import static java.util.Collections.emptyMap; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; -public abstract class ESAllocationTestCase extends ESTestCase { +public abstract class OpenSearchAllocationTestCase extends ESTestCase { private static final ClusterSettings EMPTY_CLUSTER_SETTINGS = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java rename to test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java index 66e5e970acbb6..e6c68e51be7e3 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/AbstractCoordinatorTestCase.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/AbstractCoordinatorTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import com.carrotsearch.randomizedtesting.RandomizedContext; import org.apache.logging.log4j.CloseableThreadContext; @@ -29,21 +29,19 @@ import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateTaskListener; import org.opensearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.ESAllocationTestCase; +import org.opensearch.cluster.OpenSearchAllocationTestCase; import org.opensearch.cluster.NodeConnectionsService; -import org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode; -import org.opensearch.cluster.coordination.ClusterBootstrapService; -import org.opensearch.cluster.coordination.ClusterStatePublisher; +import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker.History; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker.SequentialSpec; +import org.opensearch.cluster.coordination.LinearizabilityChecker.History; +import org.opensearch.cluster.coordination.LinearizabilityChecker.SequentialSpec; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.service.ClusterApplierService; import org.opensearch.cluster.service.ClusterService; -import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; +import org.opensearch.cluster.service.FakeThreadPoolMasterService; import org.opensearch.common.Nullable; import org.opensearch.common.Randomness; import org.opensearch.common.UUIDs; @@ -59,27 +57,22 @@ import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor; import org.opensearch.discovery.DiscoveryModule; import org.opensearch.discovery.SeedHostsProvider; -import org.elasticsearch.env.NodeEnvironment; +import org.opensearch.env.NodeEnvironment; import org.opensearch.gateway.ClusterStateUpdaters; import org.opensearch.gateway.GatewayService; import org.opensearch.gateway.MockGatewayMetaState; import org.opensearch.gateway.PersistedClusterStateService; -import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; -import org.elasticsearch.monitor.NodeHealthService; -import org.elasticsearch.monitor.StatusInfo; +import org.opensearch.indices.breaker.NoneCircuitBreakerService; +import org.opensearch.monitor.NodeHealthService; +import org.opensearch.monitor.StatusInfo; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.disruption.DisruptableMockTransport; import org.elasticsearch.test.disruption.DisruptableMockTransport.ConnectionStatus; -import org.opensearch.cluster.coordination.CoordinationState; -import org.opensearch.cluster.coordination.CoordinationStateRejectedException; -import org.opensearch.cluster.coordination.Coordinator; -import org.opensearch.cluster.coordination.ElectionStrategy; -import org.opensearch.cluster.coordination.InMemoryPersistedState; import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportInterceptor; @@ -117,9 +110,9 @@ import static java.util.Collections.emptyList; import static java.util.Collections.emptySet; import static java.util.Collections.singleton; -import static org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY; +import static org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY; import static org.opensearch.cluster.coordination.ClusterBootstrapService.BOOTSTRAP_PLACEHOLDER_PREFIX; -import static org.elasticsearch.cluster.coordination.CoordinationStateTestCluster.clusterState; +import static org.opensearch.cluster.coordination.CoordinationStateTestCluster.clusterState; import static org.opensearch.cluster.coordination.Coordinator.Mode.CANDIDATE; import static org.opensearch.cluster.coordination.Coordinator.Mode.FOLLOWER; import static org.opensearch.cluster.coordination.Coordinator.Mode.LEADER; @@ -137,7 +130,7 @@ import static org.opensearch.cluster.coordination.Reconfigurator.CLUSTER_AUTO_SHRINK_VOTING_CONFIGURATION; import static org.opensearch.discovery.PeerFinder.DISCOVERY_FIND_PEERS_INTERVAL_SETTING; import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; -import static org.elasticsearch.monitor.StatusInfo.Status.HEALTHY; +import static org.opensearch.monitor.StatusInfo.Status.HEALTHY; import static org.opensearch.node.Node.NODE_NAME_SETTING; import static org.opensearch.transport.TransportService.NOOP_TRANSPORT_INTERCEPTOR; import static org.opensearch.transport.TransportSettings.CONNECT_TIMEOUT; @@ -977,7 +970,7 @@ protected Optional getDisruptableMockTransport(Transpo new NodeConnectionsService(clusterService.getSettings(), threadPool, transportService)); final Collection> onJoinValidators = Collections.singletonList((dn, cs) -> extraJoinValidators.forEach(validator -> validator.accept(dn, cs))); - final AllocationService allocationService = ESAllocationTestCase.createAllocationService(Settings.EMPTY); + final AllocationService allocationService = OpenSearchAllocationTestCase.createAllocationService(Settings.EMPTY); coordinator = new Coordinator("test_node", settings, clusterSettings, transportService, writableRegistry(), allocationService, masterService, this::getPersistedState, Cluster.this::provideSeedHosts, clusterApplierService, onJoinValidators, Randomness.get(), (s, p, r) -> {}, diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/CoordinationStateTestCluster.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/CoordinationStateTestCluster.java similarity index 95% rename from test/framework/src/main/java/org/elasticsearch/cluster/coordination/CoordinationStateTestCluster.java rename to test/framework/src/main/java/org/opensearch/cluster/coordination/CoordinationStateTestCluster.java index 0745eaca92afa..0797722cea28c 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/CoordinationStateTestCluster.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/CoordinationStateTestCluster.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; @@ -27,16 +27,6 @@ import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.common.UUIDs; import org.opensearch.common.settings.Settings; -import org.opensearch.cluster.coordination.ApplyCommitRequest; -import org.opensearch.cluster.coordination.CoordinationMetadata; -import org.opensearch.cluster.coordination.CoordinationState; -import org.opensearch.cluster.coordination.CoordinationStateRejectedException; -import org.opensearch.cluster.coordination.ElectionStrategy; -import org.opensearch.cluster.coordination.InMemoryPersistedState; -import org.opensearch.cluster.coordination.Join; -import org.opensearch.cluster.coordination.PublishRequest; -import org.opensearch.cluster.coordination.PublishResponse; -import org.opensearch.cluster.coordination.StartJoinRequest; import java.util.ArrayList; import java.util.HashSet; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueue.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/DeterministicTaskQueue.java similarity index 99% rename from test/framework/src/main/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueue.java rename to test/framework/src/main/java/org/opensearch/cluster/coordination/DeterministicTaskQueue.java index 9c7ee2473d74f..87d1bbccdf99e 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueue.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/DeterministicTaskQueue.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.apache.logging.log4j.LogManager; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/LinearizabilityChecker.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/LinearizabilityChecker.java similarity index 99% rename from test/framework/src/main/java/org/elasticsearch/cluster/coordination/LinearizabilityChecker.java rename to test/framework/src/main/java/org/opensearch/cluster/coordination/LinearizabilityChecker.java index a5b4f9ec9e495..438ea9040df69 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/LinearizabilityChecker.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/LinearizabilityChecker.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import com.carrotsearch.hppc.LongObjectHashMap; import org.apache.logging.log4j.LogManager; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutor.java b/test/framework/src/main/java/org/opensearch/cluster/coordination/MockSinglePrioritizingExecutor.java similarity index 96% rename from test/framework/src/main/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutor.java rename to test/framework/src/main/java/org/opensearch/cluster/coordination/MockSinglePrioritizingExecutor.java index b021a58e4b316..c32f4ec7f5e87 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutor.java +++ b/test/framework/src/main/java/org/opensearch/cluster/coordination/MockSinglePrioritizingExecutor.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import org.opensearch.common.util.concurrent.EsExecutors; import org.opensearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingHelper.java b/test/framework/src/main/java/org/opensearch/cluster/routing/ShardRoutingHelper.java similarity index 96% rename from test/framework/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingHelper.java rename to test/framework/src/main/java/org/opensearch/cluster/routing/ShardRoutingHelper.java index c6b69565bc3fc..8636ea56fa56f 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/routing/ShardRoutingHelper.java +++ b/test/framework/src/main/java/org/opensearch/cluster/routing/ShardRoutingHelper.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster.routing; +package org.opensearch.cluster.routing; import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.RecoverySource.SnapshotRecoverySource; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java b/test/framework/src/main/java/org/opensearch/cluster/routing/TestShardRouting.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java rename to test/framework/src/main/java/org/opensearch/cluster/routing/TestShardRouting.java index 955b2219a25d7..588d3be95bde9 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/routing/TestShardRouting.java +++ b/test/framework/src/main/java/org/opensearch/cluster/routing/TestShardRouting.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster.routing; +package org.opensearch.cluster.routing; import org.opensearch.Version; import org.opensearch.cluster.metadata.IndexMetadata; diff --git a/test/framework/src/main/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterService.java b/test/framework/src/main/java/org/opensearch/cluster/service/FakeThreadPoolMasterService.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterService.java rename to test/framework/src/main/java/org/opensearch/cluster/service/FakeThreadPoolMasterService.java index 392ab34086f9c..ddafb8200821b 100644 --- a/test/framework/src/main/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterService.java +++ b/test/framework/src/main/java/org/opensearch/cluster/service/FakeThreadPoolMasterService.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.service; +package org.opensearch.cluster.service; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -32,7 +32,6 @@ import org.opensearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.node.Node; -import org.opensearch.cluster.service.MasterService; import org.opensearch.threadpool.ThreadPool; import java.util.ArrayList; diff --git a/test/framework/src/main/java/org/elasticsearch/common/breaker/TestCircuitBreaker.java b/test/framework/src/main/java/org/opensearch/common/breaker/TestCircuitBreaker.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/common/breaker/TestCircuitBreaker.java rename to test/framework/src/main/java/org/opensearch/common/breaker/TestCircuitBreaker.java index 2be1c8853396b..ddca8b5f801fb 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/breaker/TestCircuitBreaker.java +++ b/test/framework/src/main/java/org/opensearch/common/breaker/TestCircuitBreaker.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.breaker; +package org.opensearch.common.breaker; import org.opensearch.common.breaker.CircuitBreakingException; import org.opensearch.common.breaker.NoopCircuitBreaker; diff --git a/test/framework/src/main/java/org/elasticsearch/common/bytes/AbstractBytesReferenceTestCase.java b/test/framework/src/main/java/org/opensearch/common/bytes/AbstractBytesReferenceTestCase.java similarity index 99% rename from test/framework/src/main/java/org/elasticsearch/common/bytes/AbstractBytesReferenceTestCase.java rename to test/framework/src/main/java/org/opensearch/common/bytes/AbstractBytesReferenceTestCase.java index 15d9c92c2f1c4..cbf2673afe858 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/bytes/AbstractBytesReferenceTestCase.java +++ b/test/framework/src/main/java/org/opensearch/common/bytes/AbstractBytesReferenceTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.bytes; +package org.opensearch.common.bytes; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; diff --git a/test/framework/src/main/java/org/elasticsearch/common/inject/ModuleTestCase.java b/test/framework/src/main/java/org/opensearch/common/inject/ModuleTestCase.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/common/inject/ModuleTestCase.java rename to test/framework/src/main/java/org/opensearch/common/inject/ModuleTestCase.java index c48f425ae44de..83d489f5480ea 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/inject/ModuleTestCase.java +++ b/test/framework/src/main/java/org/opensearch/common/inject/ModuleTestCase.java @@ -16,14 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.common.inject; +package org.opensearch.common.inject; import org.opensearch.common.inject.spi.Element; import org.opensearch.common.inject.spi.Elements; import org.opensearch.common.inject.spi.InstanceBinding; import org.opensearch.common.inject.spi.ProviderInstanceBinding; import org.elasticsearch.test.ESTestCase; -import org.opensearch.common.inject.Module; import java.lang.annotation.Annotation; import java.util.List; diff --git a/test/framework/src/main/java/org/elasticsearch/common/io/PathUtilsForTesting.java b/test/framework/src/main/java/org/opensearch/common/io/PathUtilsForTesting.java similarity index 94% rename from test/framework/src/main/java/org/elasticsearch/common/io/PathUtilsForTesting.java rename to test/framework/src/main/java/org/opensearch/common/io/PathUtilsForTesting.java index 5b00f9f2e8654..9f307ea4b26fa 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/io/PathUtilsForTesting.java +++ b/test/framework/src/main/java/org/opensearch/common/io/PathUtilsForTesting.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.io; +package org.opensearch.common.io; import org.apache.lucene.util.LuceneTestCase; diff --git a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogLine.java b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogLine.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogLine.java rename to test/framework/src/main/java/org/opensearch/common/logging/JsonLogLine.java index de55403d16208..71bc59fa2f0f0 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogLine.java +++ b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogLine.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.logging; +package org.opensearch.common.logging; import org.opensearch.common.ParseField; import org.opensearch.common.xcontent.ObjectParser; diff --git a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsIntegTestCase.java b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogsIntegTestCase.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsIntegTestCase.java rename to test/framework/src/main/java/org/opensearch/common/logging/JsonLogsIntegTestCase.java index ef3fcbd472820..365dcdb594da6 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsIntegTestCase.java +++ b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogsIntegTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.logging; +package org.opensearch.common.logging; import org.opensearch.common.SuppressForbidden; import org.elasticsearch.test.rest.ESRestTestCase; diff --git a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsStream.java b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogsStream.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsStream.java rename to test/framework/src/main/java/org/opensearch/common/logging/JsonLogsStream.java index 71c5b0ca116e4..5054f8e8c1dfd 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/logging/JsonLogsStream.java +++ b/test/framework/src/main/java/org/opensearch/common/logging/JsonLogsStream.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.logging; +package org.opensearch.common.logging; import org.opensearch.common.xcontent.DeprecationHandler; import org.opensearch.common.xcontent.NamedXContentRegistry; diff --git a/test/framework/src/main/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverter.java b/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverter.java rename to test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java index b8d90e9e3a208..def23729e7488 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverter.java +++ b/test/framework/src/main/java/org/opensearch/common/logging/TestThreadInfoPatternConverter.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.logging; +package org.opensearch.common.logging; import java.util.Arrays; import java.util.regex.Matcher; diff --git a/test/framework/src/main/java/org/elasticsearch/common/lucene/store/ESIndexInputTestCase.java b/test/framework/src/main/java/org/opensearch/common/lucene/store/OpenSearchIndexInputTestCase.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/common/lucene/store/ESIndexInputTestCase.java rename to test/framework/src/main/java/org/opensearch/common/lucene/store/OpenSearchIndexInputTestCase.java index 6b08c6a762481..8c06b9fbb5edc 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/lucene/store/ESIndexInputTestCase.java +++ b/test/framework/src/main/java/org/opensearch/common/lucene/store/OpenSearchIndexInputTestCase.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.common.lucene.store; +package org.opensearch.common.lucene.store; import org.apache.lucene.store.IndexInput; import org.opensearch.action.ActionListener; @@ -36,7 +36,7 @@ /** * Test harness for verifying {@link IndexInput} implementations. */ -public class ESIndexInputTestCase extends ESTestCase { +public class OpenSearchIndexInputTestCase extends ESTestCase { private static EsThreadPoolExecutor executor; diff --git a/test/framework/src/main/java/org/elasticsearch/common/settings/MockSecureSettings.java b/test/framework/src/main/java/org/opensearch/common/settings/MockSecureSettings.java similarity index 95% rename from test/framework/src/main/java/org/elasticsearch/common/settings/MockSecureSettings.java rename to test/framework/src/main/java/org/opensearch/common/settings/MockSecureSettings.java index 59abca2965cf0..d76d4db51dc82 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/settings/MockSecureSettings.java +++ b/test/framework/src/main/java/org/opensearch/common/settings/MockSecureSettings.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,11 +17,9 @@ * under the License. */ -package org.elasticsearch.common.settings; +package org.opensearch.common.settings; import org.opensearch.common.hash.MessageDigests; -import org.opensearch.common.settings.SecureSettings; -import org.opensearch.common.settings.SecureString; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/test/framework/src/main/java/org/elasticsearch/common/util/MockBigArrays.java b/test/framework/src/main/java/org/opensearch/common/util/MockBigArrays.java similarity index 96% rename from test/framework/src/main/java/org/elasticsearch/common/util/MockBigArrays.java rename to test/framework/src/main/java/org/opensearch/common/util/MockBigArrays.java index bde97ed08d466..72c26d00299bd 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/util/MockBigArrays.java +++ b/test/framework/src/main/java/org/opensearch/common/util/MockBigArrays.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.util; +package org.opensearch.common.util; import com.carrotsearch.randomizedtesting.RandomizedContext; import com.carrotsearch.randomizedtesting.SeedUtils; @@ -26,17 +26,8 @@ import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.LuceneTestCase; import org.opensearch.common.breaker.CircuitBreaker; -import org.opensearch.common.util.BigArray; -import org.opensearch.common.util.BigArrays; -import org.opensearch.common.util.ByteArray; -import org.opensearch.common.util.DoubleArray; -import org.opensearch.common.util.FloatArray; -import org.opensearch.common.util.IntArray; -import org.opensearch.common.util.LongArray; -import org.opensearch.common.util.ObjectArray; -import org.opensearch.common.util.PageCacheRecycler; import org.opensearch.common.util.set.Sets; -import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.opensearch.indices.breaker.CircuitBreakerService; import java.util.Collection; import java.util.Collections; diff --git a/test/framework/src/main/java/org/elasticsearch/common/util/MockPageCacheRecycler.java b/test/framework/src/main/java/org/opensearch/common/util/MockPageCacheRecycler.java similarity index 98% rename from test/framework/src/main/java/org/elasticsearch/common/util/MockPageCacheRecycler.java rename to test/framework/src/main/java/org/opensearch/common/util/MockPageCacheRecycler.java index 73a03cdbd3b26..2c31eb7d21779 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/util/MockPageCacheRecycler.java +++ b/test/framework/src/main/java/org/opensearch/common/util/MockPageCacheRecycler.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.util; +package org.opensearch.common.util; import org.apache.lucene.util.LuceneTestCase; import org.opensearch.common.recycler.Recycler.V; diff --git a/test/framework/src/main/java/org/elasticsearch/common/util/NamedFormatter.java b/test/framework/src/main/java/org/opensearch/common/util/NamedFormatter.java similarity index 97% rename from test/framework/src/main/java/org/elasticsearch/common/util/NamedFormatter.java rename to test/framework/src/main/java/org/opensearch/common/util/NamedFormatter.java index f1f8ffaa17a1a..5b517b1cc5546 100644 --- a/test/framework/src/main/java/org/elasticsearch/common/util/NamedFormatter.java +++ b/test/framework/src/main/java/org/opensearch/common/util/NamedFormatter.java @@ -7,7 +7,7 @@ * not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.common.util; +package org.opensearch.common.util; import java.util.Map; import java.util.regex.Matcher; diff --git a/test/framework/src/main/java/org/opensearch/node/MockNode.java b/test/framework/src/main/java/org/opensearch/node/MockNode.java index b63ac75f49369..db5b4431ed890 100644 --- a/test/framework/src/main/java/org/opensearch/node/MockNode.java +++ b/test/framework/src/main/java/org/opensearch/node/MockNode.java @@ -21,7 +21,7 @@ import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.ClusterInfoService; -import org.elasticsearch.cluster.MockInternalClusterInfoService; +import org.opensearch.cluster.MockInternalClusterInfoService; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.network.NetworkModule; @@ -29,8 +29,8 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.BoundTransportAddress; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler; import org.elasticsearch.env.Environment; import org.opensearch.http.HttpServerTransport; diff --git a/test/framework/src/main/java/org/opensearch/search/aggregations/AggregatorTestCase.java b/test/framework/src/main/java/org/opensearch/search/aggregations/AggregatorTestCase.java index 93c4d5a25d842..9cd5a38694f7e 100644 --- a/test/framework/src/main/java/org/opensearch/search/aggregations/AggregatorTestCase.java +++ b/test/framework/src/main/java/org/opensearch/search/aggregations/AggregatorTestCase.java @@ -58,8 +58,8 @@ import org.opensearch.common.network.NetworkAddress; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockPageCacheRecycler; import org.opensearch.common.xcontent.ContextParser; import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.index.Index; diff --git a/test/framework/src/test/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueueTests.java b/test/framework/src/test/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueueTests.java index 24af3a2dd4065..d0666f5fbf18b 100644 --- a/test/framework/src/test/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueueTests.java +++ b/test/framework/src/test/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueueTests.java @@ -19,6 +19,7 @@ package org.elasticsearch.cluster.coordination; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.elasticsearch.test.ESTestCase; diff --git a/test/framework/src/test/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutorTests.java b/test/framework/src/test/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutorTests.java index d7b5d75ff1ab7..dcab92e9ad619 100644 --- a/test/framework/src/test/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutorTests.java +++ b/test/framework/src/test/java/org/elasticsearch/cluster/coordination/MockSinglePrioritizingExecutorTests.java @@ -18,6 +18,8 @@ */ package org.elasticsearch.cluster.coordination; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.MockSinglePrioritizingExecutor; import org.opensearch.common.Priority; import org.opensearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor; import org.opensearch.common.util.concurrent.PrioritizedRunnable; diff --git a/test/framework/src/test/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterServiceTests.java b/test/framework/src/test/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterServiceTests.java index e8a2c0038d9ee..a84c148e8ba79 100644 --- a/test/framework/src/test/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterServiceTests.java +++ b/test/framework/src/test/java/org/elasticsearch/cluster/service/FakeThreadPoolMasterServiceTests.java @@ -20,13 +20,14 @@ import org.opensearch.Version; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; +import org.opensearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateUpdateTask; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.cluster.service.FakeThreadPoolMasterService; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.elasticsearch.test.ESTestCase; diff --git a/test/framework/src/test/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverterTests.java b/test/framework/src/test/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverterTests.java index 17b8bcd23bdc8..256968e092100 100644 --- a/test/framework/src/test/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverterTests.java +++ b/test/framework/src/test/java/org/elasticsearch/common/logging/TestThreadInfoPatternConverterTests.java @@ -23,7 +23,7 @@ import org.elasticsearch.test.ESTestCase; import org.junit.BeforeClass; -import static org.elasticsearch.common.logging.TestThreadInfoPatternConverter.threadInfo; +import static org.opensearch.common.logging.TestThreadInfoPatternConverter.threadInfo; public class TestThreadInfoPatternConverterTests extends ESTestCase { private static String suiteInfo; diff --git a/test/framework/src/test/java/org/elasticsearch/common/util/NamedFormatterTests.java b/test/framework/src/test/java/org/elasticsearch/common/util/NamedFormatterTests.java index f0cdf5b6514dd..e56496ef69852 100644 --- a/test/framework/src/test/java/org/elasticsearch/common/util/NamedFormatterTests.java +++ b/test/framework/src/test/java/org/elasticsearch/common/util/NamedFormatterTests.java @@ -22,6 +22,7 @@ import org.elasticsearch.test.ESTestCase; import org.junit.Rule; import org.junit.rules.ExpectedException; +import org.opensearch.common.util.NamedFormatter; import java.util.HashMap; import java.util.Map; diff --git a/test/framework/src/test/java/org/elasticsearch/test/disruption/DisruptableMockTransportTests.java b/test/framework/src/test/java/org/elasticsearch/test/disruption/DisruptableMockTransportTests.java index d527b648b50fa..c2349d612220d 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/disruption/DisruptableMockTransportTests.java +++ b/test/framework/src/test/java/org/elasticsearch/test/disruption/DisruptableMockTransportTests.java @@ -21,7 +21,7 @@ import org.opensearch.Version; import org.opensearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; +import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.common.collect.Tuple; import org.opensearch.common.io.stream.StreamInput; diff --git a/test/framework/src/test/java/org/opensearch/node/MockNodeTests.java b/test/framework/src/test/java/org/opensearch/node/MockNodeTests.java index 6f0b3757c8e91..8de4df9a798d4 100644 --- a/test/framework/src/test/java/org/opensearch/node/MockNodeTests.java +++ b/test/framework/src/test/java/org/opensearch/node/MockNodeTests.java @@ -21,7 +21,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.util.BigArrays; -import org.elasticsearch.common.util.MockBigArrays; +import org.opensearch.common.util.MockBigArrays; import org.opensearch.env.Environment; import org.opensearch.plugins.Plugin; import org.opensearch.search.MockSearchService; diff --git a/test/framework/src/test/java/org/opensearch/transport/nio/SimpleMockNioTransportTests.java b/test/framework/src/test/java/org/opensearch/transport/nio/SimpleMockNioTransportTests.java index 4d287cba9ed6b..ab17659f12c09 100644 --- a/test/framework/src/test/java/org/opensearch/transport/nio/SimpleMockNioTransportTests.java +++ b/test/framework/src/test/java/org/opensearch/transport/nio/SimpleMockNioTransportTests.java @@ -27,7 +27,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.transport.TransportAddress; -import org.elasticsearch.common.util.MockPageCacheRecycler; +import org.opensearch.common.util.MockPageCacheRecycler; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.transport.AbstractSimpleTransportTestCase; import org.opensearch.transport.ConnectTransportException;