From 12f3233fa52ab44243ad8ac405cf58da277ea9d4 Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Wed, 17 Mar 2021 16:40:38 -0500 Subject: [PATCH] [Rename] framework/test/o.e.action,bootstrap,cli,client,cluster,common (#361) This commit refactors the following test packages from the o.e namespace: * o.e.action * o.e.bootstrap * o.e.cli * o.e.client * o.e.cluster * o.e.common to the o.opensearch namespace. Any references throughout the codebase are also refactored. Signed-off-by: Nicholas Walter Knize --- .../client/SyncedFlushResponseTests.java | 3 +- .../indices/GetDataStreamResponseTests.java | 2 +- .../test/rest/JsonLogsFormatAndParseIT.java | 2 +- .../opensearch/bootstrap/BootstrapTests.java | 2 +- .../settings/KeyStoreCommandTestCase.java | 6 +-- .../plugins/InstallPluginCommandTests.java | 4 +- .../plugins/ListPluginsCommandTests.java | 2 +- .../plugins/RemovePluginCommandTests.java | 2 +- .../ssl/SslConfigurationLoaderTests.java | 2 +- .../stats/InternalMatrixStatsTests.java | 6 +-- ...ReindexFromRemoteBuildRestClientTests.java | 2 +- .../http/netty4/Netty4BadRequestTests.java | 4 +- .../Netty4HttpServerPipeliningTests.java | 4 +- .../Netty4HttpServerTransportTests.java | 4 +- .../Netty4SizeHeaderFrameDecoderTests.java | 2 +- .../transport/netty4/Netty4UtilsTests.java | 2 +- .../netty4/NettyTransportMultiPortTests.java | 2 +- .../org/opensearch/bootstrap/Bootstrap.java | 16 ++++---- .../org/opensearch/bootstrap/OpenSearch.java | 2 +- .../org/opensearch/bootstrap/Spawner.java | 8 ++-- .../cli/EnvironmentAwareCommand.java | 4 +- .../org/opensearch/common/util/BigArrays.java | 2 +- .../aggregations/AggregationBuilder.java | 6 +-- .../aggregations/AggregatorFactories.java | 6 +-- .../cluster/ClusterInfoTests.java | 2 +- .../cluster/ClusterModuleTests.java | 2 +- .../cluster/ClusterStateTests.java | 2 +- .../elasticsearch/cluster/DiskUsageTests.java | 2 +- ...rnalClusterInfoServiceSchedulingTests.java | 6 +-- .../cluster/NodeConnectionsServiceTests.java | 2 +- ...rdFailedClusterStateTaskExecutorTests.java | 8 ++-- ...dStartedClusterStateTaskExecutorTests.java | 12 +++--- .../action/shard/ShardStateActionTests.java | 2 +- .../ClusterBootstrapServiceTests.java | 1 + .../ClusterFormationFailureHelperTests.java | 1 + .../coordination/CoordinationStateTests.java | 1 + .../coordination/CoordinatorTests.java | 7 ++-- .../ElectionSchedulerFactoryTests.java | 1 + .../coordination/FollowersCheckerTests.java | 1 + .../cluster/coordination/JoinHelperTests.java | 1 + .../coordination/LagDetectorTests.java | 1 + .../coordination/LeaderCheckerTests.java | 1 + .../LinearizabilityCheckerTests.java | 7 ++-- .../cluster/coordination/NodeJoinTests.java | 7 ++-- .../OpenSearchNodeCommandTests.java | 4 +- .../coordination/PreVoteCollectorTests.java | 1 + .../PublicationTransportHandlerTests.java | 1 + .../health/ClusterHealthAllocationTests.java | 4 +- .../metadata/AutoExpandReplicasTests.java | 2 +- .../cluster/metadata/DataStreamTests.java | 2 +- .../IndexNameExpressionResolverTests.java | 4 +- .../MetadataCreateDataStreamServiceTests.java | 6 +-- .../MetadataCreateIndexServiceTests.java | 8 ++-- .../MetadataDeleteIndexServiceTests.java | 2 +- .../MetadataIndexAliasesServiceTests.java | 2 +- .../MetadataIndexStateServiceTests.java | 2 +- .../cluster/metadata/MetadataTests.java | 8 ++-- .../metadata/ToAndFromJsonMetadataTests.java | 4 +- .../WildcardExpressionResolverTests.java | 4 +- .../DelayedAllocationServiceTests.java | 4 +- .../routing/GroupShardsIteratorTests.java | 1 + .../routing/OperationRoutingTests.java | 2 +- .../cluster/routing/PrimaryTermsTests.java | 4 +- .../cluster/routing/RecoverySourceTests.java | 1 + .../cluster/routing/RoutingNodeTests.java | 1 + .../routing/RoutingTableGenerator.java | 1 + .../cluster/routing/RoutingTableTests.java | 5 ++- .../cluster/routing/ShardRoutingTests.java | 2 + .../cluster/routing/UnassignedInfoTests.java | 5 ++- .../allocation/AddIncrementallyTests.java | 4 +- .../allocation/AllocationCommandsTests.java | 4 +- .../allocation/AllocationPriorityTests.java | 4 +- .../allocation/AwarenessAllocationTests.java | 4 +- .../allocation/BalanceConfigurationTests.java | 4 +- .../BalanceUnbalancedClusterTests.java | 4 +- .../allocation/BalancedSingleShardTests.java | 6 +-- .../allocation/CatAllocationTestCase.java | 8 ++-- .../ClusterRebalanceRoutingTests.java | 4 +- .../ConcurrentRebalanceRoutingTests.java | 4 +- .../allocation/DeadNodesAllocationTests.java | 4 +- .../DecisionsImpactOnClusterHealthTests.java | 4 +- .../allocation/DiskThresholdMonitorTests.java | 4 +- ...ReplicaAsPrimaryDuringRelocationTests.java | 4 +- .../ExpectedShardSizeAllocationTests.java | 4 +- .../allocation/FailedNodeRoutingTests.java | 6 +-- .../allocation/FailedShardsRoutingTests.java | 4 +- .../allocation/FilterRoutingTests.java | 4 +- .../allocation/InSyncAllocationIdTests.java | 4 +- .../routing/allocation/IndexBalanceTests.java | 4 +- .../MaxRetryAllocationDeciderTests.java | 4 +- .../NodeVersionAllocationDeciderTests.java | 8 ++-- ...alPrimariesToRelocatingPrimariesTests.java | 4 +- .../PreferPrimaryAllocationTests.java | 4 +- .../PrimaryElectionRoutingTests.java | 4 +- ...yNotRelocatedWhileBeingRecoveredTests.java | 4 +- .../RandomAllocationDeciderTests.java | 4 +- .../allocation/RebalanceAfterActiveTests.java | 4 +- .../ReplicaAllocatedAfterPrimaryTests.java | 4 +- .../ResizeAllocationDeciderTests.java | 6 +-- .../RetryFailedAllocationTests.java | 4 +- .../RoutingNodesIntegrityTests.java | 4 +- .../allocation/SameShardRoutingTests.java | 8 ++-- .../allocation/ShardVersioningTests.java | 4 +- .../ShardsLimitAllocationTests.java | 4 +- .../SingleShardNoReplicasRoutingTests.java | 4 +- .../SingleShardOneReplicaRoutingTests.java | 4 +- .../allocation/StartedShardsRoutingTests.java | 6 +-- .../TenShardsOneReplicaRoutingTests.java | 4 +- .../allocation/ThrottlingAllocationTests.java | 6 +-- .../TrackFailedAllocationNodesTests.java | 4 +- .../UpdateNumberOfReplicasTests.java | 4 +- .../decider/DiskThresholdDeciderTests.java | 6 +-- .../DiskThresholdDeciderUnitTests.java | 6 +-- .../EnableAllocationShortCircuitTests.java | 4 +- .../decider/EnableAllocationTests.java | 4 +- .../decider/FilterAllocationDeciderTests.java | 4 +- ...storeInProgressAllocationDeciderTests.java | 4 +- .../ClusterSerializationTests.java | 4 +- .../ClusterStateToStringTests.java | 4 +- .../structure/RoutingIteratorTests.java | 4 +- .../index/engine/InternalEngineTests.java | 2 +- .../index/engine/NoOpEngineRecoveryTests.java | 2 +- .../index/engine/NoOpEngineTests.java | 2 +- .../FunctionScoreEquivalenceTests.java | 2 +- .../GlobalCheckpointSyncActionTests.java | 2 +- .../seqno/ReplicationTrackerTestCase.java | 2 +- .../index/seqno/ReplicationTrackerTests.java | 2 +- ...tentionLeaseBackgroundSyncActionTests.java | 2 +- .../seqno/RetentionLeaseSyncActionTests.java | 2 +- .../shard/IndexShardRetentionLeaseTests.java | 2 +- .../index/shard/IndexShardTests.java | 6 +-- .../index/shard/NewPathForShardTests.java | 2 +- .../RemoveCorruptedShardDataCommandTests.java | 6 +-- ...dicesLifecycleListenerSingleNodeTests.java | 2 +- ...ClusterStateServiceRandomUpdatesTests.java | 2 +- .../PeerRecoveryTargetServiceTests.java | 2 +- .../indices/recovery/RecoveryTargetTests.java | 2 +- .../indices/store/IndicesStoreTests.java | 2 +- .../monitor/fs/FsHealthServiceTests.java | 4 +- .../cluster/reroute/ClusterRerouteTests.java | 7 +--- .../blobstore/fs/FsBlobContainerTests.java | 2 +- .../common/bytes/BytesArrayTests.java | 3 -- .../bytes/CompositeBytesReferenceTests.java | 4 -- .../bytes/PagedBytesReferenceTests.java | 4 -- .../RecyclingBytesStreamOutputTests.java | 7 ++-- .../bytes/ReleasableBytesReferenceTests.java | 5 --- .../ReleasableBytesStreamOutputTests.java | 4 +- .../JsonThrowablePatternConverterTests.java | 2 + .../store/ByteArrayIndexInputTests.java | 3 +- .../ConsistentSettingsServiceTests.java | 1 + .../common/settings/ScopedSettingsTests.java | 1 + .../common/settings/SettingTests.java | 1 + .../common/settings/SettingsModuleTests.java | 8 +--- .../common/settings/SettingsTests.java | 1 + .../common/util/BigArraysTests.java | 2 + .../common/util/BinarySearcherTests.java | 2 + .../common/util/BytesRefHashTests.java | 2 + .../opensearch/common/util/LongHashTests.java | 2 + .../common/util/LongLongHashTests.java | 2 + .../common/util/LongObjectHashMapTests.java | 2 + .../node/InternalSettingsPreparerTests.java | 2 +- .../BlobStoreRepositoryRestoreTests.java | 2 +- .../repositories/fs/FsRepositoryTests.java | 2 +- .../action/cat/RestIndicesActionTests.java | 2 +- .../action/cat/RestRecoveryActionTests.java | 2 +- .../action/cat/RestShardsActionTests.java | 2 +- .../search/DefaultSearchContextTests.java | 4 +- .../InternalVariableWidthHistogramTests.java | 4 +- .../BestDocsDeferringCollectorTests.java | 4 +- .../terms/BytesKeyedBucketOrdsTests.java | 4 +- .../terms/LongKeyedBucketOrdsTests.java | 4 +- .../bucket/terms/TermsAggregatorTests.java | 4 +- .../metrics/InternalCardinalityTests.java | 4 +- .../search/sort/BucketedSortTestCase.java | 4 +- .../InternalSnapshotsInfoServiceTests.java | 6 +-- .../snapshots/RestoreServiceTests.java | 2 +- .../snapshots/SnapshotResiliencyTests.java | 16 ++++---- .../snapshots/SnapshotsServiceTests.java | 2 +- .../transport/InboundAggregatorTests.java | 2 +- .../transport/InboundPipelineTests.java | 2 +- .../transport/TcpTransportTests.java | 2 +- ...ortServiceDeserializationFailureTests.java | 2 +- .../ESIndexLevelReplicationTestCase.java | 8 ++-- .../index/shard/IndexShardTestCase.java | 6 +-- .../index/store/EsBaseDirectoryTestCase.java | 2 +- .../org/elasticsearch/test/ESTestCase.java | 8 ++-- .../test/ESTokenStreamTestCase.java | 2 +- .../test/InternalAggregationTestCase.java | 4 +- .../test/InternalTestCluster.java | 2 +- .../disruption/DisruptableMockTransport.java | 2 +- .../test/transport/MockTransportService.java | 2 +- .../action/support/ActionTestUtils.java | 4 +- .../ClusterStateCreationUtils.java | 6 +-- .../TransportWriteActionTestHelper.java | 4 +- .../bootstrap/BootstrapForTesting.java | 11 +---- .../bootstrap/OpenSearchCliTestCase.java} | 12 +++--- .../cli/CommandTestCase.java | 6 +-- .../cli/MockTerminal.java | 4 +- .../client/RestClientBuilderTestCase.java | 4 +- .../cluster/DataStreamTestHelper.java | 2 +- .../MockInternalClusterInfoService.java | 6 +-- .../OpenSearchAllocationTestCase.java} | 6 +-- .../AbstractCoordinatorTestCase.java | 41 ++++++++----------- .../CoordinationStateTestCluster.java | 14 +------ .../coordination/DeterministicTaskQueue.java | 4 +- .../coordination/LinearizabilityChecker.java | 4 +- .../MockSinglePrioritizingExecutor.java | 4 +- .../cluster/routing/ShardRoutingHelper.java | 4 +- .../cluster/routing/TestShardRouting.java | 4 +- .../service/FakeThreadPoolMasterService.java | 5 +-- .../common/breaker/TestCircuitBreaker.java | 2 +- .../bytes/AbstractBytesReferenceTestCase.java | 4 +- .../common/inject/ModuleTestCase.java | 3 +- .../common/io/PathUtilsForTesting.java | 4 +- .../common/logging/JsonLogLine.java | 4 +- .../common/logging/JsonLogsIntegTestCase.java | 4 +- .../common/logging/JsonLogsStream.java | 4 +- .../TestThreadInfoPatternConverter.java | 4 +- .../store/OpenSearchIndexInputTestCase.java} | 6 +-- .../common/settings/MockSecureSettings.java | 6 +-- .../common/util/MockBigArrays.java | 15 ++----- .../common/util/MockPageCacheRecycler.java | 4 +- .../common/util/NamedFormatter.java | 4 +- .../java/org/opensearch/node/MockNode.java | 6 +-- .../aggregations/AggregatorTestCase.java | 4 +- .../DeterministicTaskQueueTests.java | 1 + .../MockSinglePrioritizingExecutorTests.java | 2 + .../FakeThreadPoolMasterServiceTests.java | 3 +- .../TestThreadInfoPatternConverterTests.java | 2 +- .../common/util/NamedFormatterTests.java | 1 + .../DisruptableMockTransportTests.java | 2 +- .../org/opensearch/node/MockNodeTests.java | 2 +- .../nio/SimpleMockNioTransportTests.java | 2 +- 233 files changed, 454 insertions(+), 479 deletions(-) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/action/support/ActionTestUtils.java (95%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/action/support/replication/ClusterStateCreationUtils.java (99%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/action/support/replication/TransportWriteActionTestHelper.java (95%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/bootstrap/BootstrapForTesting.java (97%) rename test/framework/src/main/java/org/{elasticsearch/bootstrap/ESOpenSearchCliTestCase.java => opensearch/bootstrap/OpenSearchCliTestCase.java} (90%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cli/CommandTestCase.java (92%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cli/MockTerminal.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/client/RestClientBuilderTestCase.java (95%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/DataStreamTestHelper.java (99%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/MockInternalClusterInfoService.java (96%) rename test/framework/src/main/java/org/{elasticsearch/cluster/ESAllocationTestCase.java => opensearch/cluster/OpenSearchAllocationTestCase.java} (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/coordination/AbstractCoordinatorTestCase.java (97%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/coordination/CoordinationStateTestCluster.java (95%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/coordination/DeterministicTaskQueue.java (99%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/coordination/LinearizabilityChecker.java (99%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/coordination/MockSinglePrioritizingExecutor.java (96%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/routing/ShardRoutingHelper.java (96%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/routing/TestShardRouting.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/cluster/service/FakeThreadPoolMasterService.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/breaker/TestCircuitBreaker.java (97%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/bytes/AbstractBytesReferenceTestCase.java (99%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/inject/ModuleTestCase.java (97%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/io/PathUtilsForTesting.java (94%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/logging/JsonLogLine.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/logging/JsonLogsIntegTestCase.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/logging/JsonLogsStream.java (97%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/logging/TestThreadInfoPatternConverter.java (98%) rename test/framework/src/main/java/org/{elasticsearch/common/lucene/store/ESIndexInputTestCase.java => opensearch/common/lucene/store/OpenSearchIndexInputTestCase.java} (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/settings/MockSecureSettings.java (95%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/util/MockBigArrays.java (96%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/util/MockPageCacheRecycler.java (98%) rename test/framework/src/main/java/org/{elasticsearch => opensearch}/common/util/NamedFormatter.java (97%) 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 d7c2dc23434..2e19710af28 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 @@ package org.opensearch.client; 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 cded325b23d..784b505cd79 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.List; 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 34bd5be4282..c4663c731be 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 c3fcb59726d..190739c3a9e 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.KeyStoreWrapper; 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 3c5ba2c5475..50a332a81e3 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.Configuration; 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 7380ade6526..995faed3d1e 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.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder; 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.collect.Tuple; 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 0ed19692543..2f15974aac2 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 java.util.stream.Collectors; 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 9797182ab69..b7db59be4b6 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 @@ package org.opensearch.plugins; 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 920ad9e1e5c..db31b3c83fe 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 bc2832cb1d6..f55d73ba782 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 @@ package org.opensearch.search.aggregations.matrix.stats; 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 6172ab01f3c..06c59be5f05 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 f25ad7e2dd1..8c67760f9a4 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.network.NetworkService; 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 3cbeecb488c..1b5150494a4 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.network.NetworkService; 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 51f94896003..560365f340d 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.settings.Settings; 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 810f1bff7a1..df9dab70aa1 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.io.stream.NamedWriteableRegistry; 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 ea3e4b1654b..207595b8a67 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.CompositeByteBuf; 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 92e52dca2e2..fe5037e6c60 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.io.stream.NamedWriteableRegistry; 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 61998050251..b913caff326 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.logging.log4j.core.config.Configurator; 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.SecureString; 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 8bd7d042b1f..46d7c6ef500 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.ExitCodes; 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 c4a84dc57e8..a55df543126 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 @@ package org.opensearch.bootstrap; 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 9c91de61d72..616c362466a 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.OptionSpec; 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.HashMap; 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 c6880049946..1f094c9712a 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.breaker.CircuitBreakingException; 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 3ff08c3abd4..3282fe602e4 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.Strings; 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 dd198018c8f..2227b9539c7 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.ToXContentObject; 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 f9cdcf5a8f5..0c0c548cfea 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 @@ package org.elasticsearch.cluster; 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 8b2581eb2d5..6d277bd544e 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.ShardsLimitAllocationDe 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 50c1d74e2ad..5a1308e2a8e 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.IndexRoutingTable; 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 b83049ace04..143c6d2fb31 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.action.admin.indices.stats.ShardStats; 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 11a5bcc894a..aad5c445e56 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.ActionType; 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 50aec23c08e..cb245226b2f 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.OpenSearchTimeoutException; 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 7047bdc6f6c..c98d1d94b0e 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.Version; 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.RoutingTable; 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.equalTo; 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 @@ public class ShardFailedClusterStateTaskExecutorTests extends ESAllocationTestCa 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 4f6869f6fc7..34ab944e7de 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 @@ package org.elasticsearch.cluster.action.shard; 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.IntStream; 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 7a9a827ab2a..056fe3628f6 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.index.CorruptIndexException; 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 8ddc6177270..ea9104aadf3 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 @@ package org.elasticsearch.cluster.coordination; 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 aeea399644a..c92e9ee847d 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; 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 808fd42cf43..5d171ae7b9a 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; 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 4b6a24eb0aa..4e2a625056b 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.Version; 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 java.util.stream.Collectors; 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 77343f10c5c..bd506c82c7a 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 e31c97a9c94..fa44593eb97 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.OpenSearchException; 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 061a8b84380..976106f23dc 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.action.support.PlainActionFuture; 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 7526546c129..bbdd02565a0 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 3683208fe48..a560ea6c71a 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.OpenSearchException; 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 89de998d006..5bc934e6209 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 88db1c4cb7d..e3ff9fb9808 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.Version; 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 @@ public class NodeJoinTests extends ESTestCase { 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 2e823cb99c9..f7a88076f66 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.function.Function; 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 75c873ea80e..c77f19a3f3e 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 @@ package org.elasticsearch.cluster.coordination; 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 46c17d92b40..1ff166ae8ff 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.ClusterChangedEvent; 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 7ef1e617feb..0b82d011eaf 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 @@ package org.elasticsearch.cluster.health; 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 org.opensearch.cluster.routing.allocation.AllocationService; 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 4c5da0f2a89..2e63cade6aa 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.cluster.reroute.ClusterRerouteRequest; 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 85f93442f5b..d1f7b9f3b7d 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.ArrayList; 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 26e3a6486a2..57b78e20be9 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.Set; 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 4e7c8879529..6c528a0fc13 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 org.opensearch.cluster.metadata.MetadataCreateIndexService; 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 d92a01c37f5..74c96f75380 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.create.CreateIndexClusterStateUpdateR 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 class MetadataCreateIndexServiceTests extends ESTestCase { 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 class MetadataCreateIndexServiceTests extends ESTestCase { 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 @@ public class MetadataCreateIndexServiceTests extends ESTestCase { // 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 2bf5b16a65a..5f6af05984b 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 @@ package org.elasticsearch.cluster.metadata; 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 94a076e3ef4..a546e3a562f 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.List; 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 26fac6c2fbe..fbc6c74255a 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_NUMBER_OF_SH 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 4d425bcc8b7..35c9e565282 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 @@ package org.elasticsearch.cluster.metadata; 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.SortedMap; 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 8f6735acf8c..4f8d79c093d 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.HashMap; 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 5d924346af6..0d61f599aa1 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.Collections; 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 6da4db248a6..2d688daba41 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.ClusterChangedEvent; 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.verify; 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 417e0f5ab30..530c3995dd3 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.GroupShardsIterator; 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 9796f693cbf..a45fbf3d93d 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 c71cd4cfc48..6b4ec175c68 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 @@ package org.elasticsearch.cluster.routing; 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.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; 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 30393e5375d..a44f3fa1bda 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 35c4cfdae0a..3fecebb6db9 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 @@ package org.elasticsearch.cluster.routing; 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 03409832f30..942d6363440 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.IndexRoutingTable; 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 cdfe507f4f7..d50b015b4f8 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 @@ package org.elasticsearch.cluster.routing; 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.RecoverySource; 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.is; 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 056153c5f72..173c2ff449e 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 b2488451020..17e7f4c056c 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 com.carrotsearch.randomizedtesting.generators.RandomPicks; 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.RecoverySource.SnapshotRecoverySource; 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.greaterThan; 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 5b04651bc6f..898dfffdb0c 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.STARTED; 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 9560a7184ac..24ac500b525 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.apache.logging.log4j.Logger; 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.hasSize; 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 a98febb6581..7861417bdd8 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 @@ package org.elasticsearch.cluster.routing.allocation; 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 org.opensearch.common.settings.Settings; 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 e3ac0b65a3b..455e379d86b 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.LogManager; 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.equalTo; 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 0a1d61a18c2..4dfb03ac420 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.logging.log4j.Logger; 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 java.util.stream.Collectors; 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 8895bf494bb..c7fa9daf528 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 @@ package org.elasticsearch.cluster.routing.allocation; 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 @@ public class BalanceUnbalancedClusterTests extends CatAllocationTestCase { 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 d02b13f5a09..8f9859eff07 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 @@ import static org.hamcrest.Matchers.startsWith; /** * 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 72cf51b2a2b..1ff9448b299 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.IndexShardRoutingTable; 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 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; * 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 @@ public abstract class CatAllocationTestCase extends ESAllocationTestCase { } 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 84b79346b0f..ea4786f17b7 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.LogManager; 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.anyOf; 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 dd8c6932059..8e86c3ed340 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; 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 31e4b4c5d66..fee22e6fadf 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.STARTED; 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 951f164eac8..4ee35bd3cde 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 @@ package org.elasticsearch.cluster.routing.allocation; 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 @@ import static org.hamcrest.Matchers.equalTo; * 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 ddc0e1b585e..782612a63b2 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.ClusterInfo; 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 java.util.function.LongSupplier; 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 e9b8d2d2cdd..9f994ad591a 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.LogManager; 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.STARTED; 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 cd253a5f22b..04e47353115 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.apache.logging.log4j.Logger; 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 org.opensearch.common.settings.Settings; 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 7a7d7515d5e..acff5e481b5 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.Version; 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.INITIALIZING; 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 bdd6696f2d9..10709375a5b 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.LogManager; 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.lessThan; 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 e1f1fde858a..e9a1856a5f3 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.FilterAllocation 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 e815385151c..c197c66796f 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; 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 3e8c1c9356b..714a6fca278 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.LogManager; 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; 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 7e89d4d493a..52a0203bf07 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.containsString; 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 32134da6413..c81fc389a4b 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.LogManager; 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.RoutingNode; 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.notNullValue; 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 866b6283f5c..4378e3e069e 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.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 0b2bd0e1bdc..1259bccc15f 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.LogManager; 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 org.opensearch.common.settings.Settings; 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 6bb75b95384..f4ef73f1f71 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; 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 f2ec06ced22..7898badeb87 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.LogManager; 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.INITIALIZING; 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 c66b8448d5b..05eadf5bac8 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 @@ package org.elasticsearch.cluster.routing.allocation; 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 java.util.Random; 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 8e9a7377a2d..5e0a7c29448 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.apache.logging.log4j.Logger; 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.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; 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 41af4818acc..101dd739812 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.node.DiscoveryNodes; 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.equalTo; 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 138142c0f3a..0d09093cbeb 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.RecoverySource; 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.STARTED; 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 934f2ae6bb1..f6fcc410591 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.OpenSearchException; 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 java.util.List; 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 af28d3813ef..6aa1f6b297c 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.STARTED; 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 3d6f7ec1320..998071d0f81 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.RoutingNodes; 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.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; 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 2fd05b33b14..f919d739cc2 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.LogManager; 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.STARTED; 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 6a389ef672d..5004a452e54 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.LogManager; 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.opensearch.cluster.routing.ShardRoutingState.STARTED; 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 3fd09f5a9b2..fd10f323a58 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.LogManager; 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.lessThan; 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 d30be6081cd..934a87e8e80 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.LogManager; 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.equalTo; 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 cc463b209bc..8b813397947 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 @@ package org.elasticsearch.cluster.routing.allocation; 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.IndexShardRoutingTable; 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.equalTo; 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 0172b671c2f..59ae55e9b9a 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.LogManager; 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.lessThan; 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 c5316fa66bf..d6a58b12655 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.LogManager; 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; 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.STARTED; 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 5d3d4bcc120..89bc154ba21 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 @@ package org.elasticsearch.cluster.routing.allocation; 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 java.util.Set; 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 8a3f73f239a..0b3bed67ff5 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.apache.logging.log4j.Logger; 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.equalTo; 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 0ff4c6a3b1a..b16ad31882f 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.ClusterInfoService; 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.RoutingNodes; 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.is; 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 c598873ed5b..7261a16d75a 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.ClusterInfo; 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.RecoverySource.PeerRecoverySource; 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 @@ import static org.hamcrest.Matchers.equalTo; /** * 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 5e653dc1f8a..db375d91713 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.Version; 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.opensearch.cluster.routing.allocation.decider.EnableAllocation 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 0af08624404..9e06bf9bfc4 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.LogManager; 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.EnableAllocation 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 8f84a692b6d..9fa6b9f4927 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 @@ package org.elasticsearch.cluster.routing.allocation.decider; 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.INITIALIZING; 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 861ef2b4fd2..1520beb39af 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 com.carrotsearch.hppc.cursors.ObjectCursor; 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 @@ import static java.util.Collections.singletonList; /** * 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 b4b417d3f9b..5c9f44cf871 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.ClusterName; 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.equalTo; 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 97344cbf09b..b1b982419d7 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 @@ package org.elasticsearch.cluster.serialization; 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.emptyMap; 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 20cdccdbec5..122dbb4ad1d 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 @@ package org.elasticsearch.cluster.structure; 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.notNullValue; 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 7ddae76ca29..3b8389fd645 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.metadata.IndexMetadata; 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 aa536ff1f5a..ef81095691f 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 org.elasticsearch.index.shard.IndexShardTestCase; 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 2a39a852350..a394356fa3b 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.metadata.IndexMetadata; 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 0a50a91c2a1..7b77c5c8e6f 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.Query; 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 7ffd9d1324c..73df7909e03 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 467c1b82189..656f51b13b1 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.AllocationId; 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 813ded10358..31bd2a22182 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.AllocationId; 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 458a79c6079..b5217a5469d 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 @@ package org.elasticsearch.index.seqno; 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 ce68de4083f..b252bd6bc26 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 @@ package org.elasticsearch.index.seqno; 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 58c2ddec31f..de51c570c74 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 @@ package org.elasticsearch.index.shard; 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 4d11ac22e52..e4e26ad2834 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.AllocationId; 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 java.util.stream.Stream; 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 ca2ee9fdc80..59723c6dc31 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 @@ package org.elasticsearch.index.shard; 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 d81b10abb1a..26aa33ca81c 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 joptsimple.OptionSet; 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.IndexMetadata; 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 dbd8a2cea74..844a579781d 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.metadata.IndexMetadata; 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 1059dc8a1e0..65699364ab4 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.delete.DeleteIndexRequest; 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 b3163fdf99b..98a27c8eb6e 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.action.support.PlainActionFuture; 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 0da8dde3e35..ffb5e111387 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.node.DiscoveryNode; 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 268b19a7c85..03d760f5769 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.Version; 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 7b0459ab7f2..72d4afe0d8b 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.LogManager; 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 c67fe093403..f9e137d7f6e 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 @@ package org.opensearch.action.admin.cluster.reroute; 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.settings.Settings; 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.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; 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 8d522614b87..f2876976259 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.mockfile.FilterSeekableByteChannel; 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 4c1569b4f9e..83cd2c3cf52 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 5c1c0ab5aca..40af11746c3 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 @@ package org.opensearch.common.bytes; 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 5fce9485c6e..3572eb22694 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 89104654216..d24326868bf 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 @@ package org.opensearch.common.bytes; 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 c893fc5bbad..c91bf49fa64 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 76b15ae961d..1a7d3167ed9 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 0fdfc6fe40d..6698bc7d8f7 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.JsonLogLine; 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 fa9120fcd92..1046155726a 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 4dd3e684b23..aac73635ed2 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.elasticsearch.test.ESTestCase; 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 b6a068cdbb4..ffc3bf6caa5 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.FilterAllocationDecider 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 d3f61d1beb7..268328c977d 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.logging.Loggers; 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 a49c338e0c2..ade56b272d6 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 913686fceb4..0bb3949b976 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.Strings; 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 98145c0970e..eb5b9ba0d21 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.DoubleArray; 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 ed972773112..980f8ab7470 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.BigArrays; 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 c4f514e376a..e3b6e17348b 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.indices.breaker.NoneCircuitBreakerService; 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 5cf73648e96..c7101a041ba 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.indices.breaker.NoneCircuitBreakerService; 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 26bbd6cf2bd..3edb7c4d746 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.indices.breaker.NoneCircuitBreakerService; 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 74c18b72905..724432c1421 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.indices.breaker.NoneCircuitBreakerService; 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 badc84040aa..abc7a022e53 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 0427492ffb7..749dd7257f6 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.Metadata; 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 47cc9cdb23e..e2a13e843c1 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.metadata.RepositoryMetadata; 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 ea9586f9dc0..5c8537977e6 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.health.ClusterIndexHealth; 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 442c06b2016..02b9fc7e1c0 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.action.support.DefaultShardOperationFailedException; 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 c200e1c066e..54306fade12 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.node.DiscoveryNodes; 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 636332b2012..272fac72a77 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.UUIDs; 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 98a44daed01..fb1db73869c 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 @@ package org.opensearch.search.aggregations.bucket.histogram; 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 4482d8b8e23..9f2065cb464 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.TermQuery; 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 43de51819bf..267bda291a8 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 @@ package org.opensearch.search.aggregations.bucket.terms; 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 71524e0f6fa..c696f7347b1 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 dbce0f72714..e7a8adf8112 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.geo.GeoPoint; 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 1e80869bcf6..5ab873abd6c 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 @@ package org.opensearch.search.aggregations.metrics; 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 cec21ac6681..cb3437f5378 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.settings.Settings; 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 3a81739cc0b..408815e9110 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 com.carrotsearch.hppc.IntHashSet; 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 class InternalSnapshotsInfoServiceTests extends ESTestCase { 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 c3fcf69f18a..91efaef401c 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 org.elasticsearch.test.ESTestCase; 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 1d15b108971..22433dedd04 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.SearchResponse; 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.ClusterModule; 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.AllocationService; 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 java.util.stream.Stream; 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 class SnapshotResiliencyTests extends ESTestCase { 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 cb4d43336ce..f1f5ca7f8ac 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.IndexRoutingTable; 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 454f7a78640..255d00892a6 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 @@ package org.opensearch.transport; 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 eb3ad048a12..058ec6ceb46 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.Version; 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 98f40a55653..e8e7e48d5c3 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.network.NetworkUtils; 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 f4b01f5953f..49a0863fd8d 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 @@ package org.opensearch.transport; 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 13e398ea6dd..6a4ab7b435d 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.index.IndexRequest; 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.ReplicationResponse; 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.AllocationId; 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 6c61df047da..f31459c0b37 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.node.DiscoveryNodeRole; 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.BiFunction; 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 771188341a7..8b46254e2df 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.logging.log4j.Logger; 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 9def8a37e81..f72a89cf0e0 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.TestRuleMarkFailure; 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.SuppressForbidden; 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.elasticsearch.common.settings.Settings; 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 165c7b49ee4..8316b455024 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.analysis.BaseTokenStreamTestCase; 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 04c64c6f884..5c6efd680c0 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.bytes.BytesReference; 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 b793ba3cdf3..d5024b244df 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.FileSystemUtils; 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 178f3047055..34bcdfc4ea6 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 @@ package org.elasticsearch.test.disruption; 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 09875838621..906b63fbecb 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.settings.Settings; 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 cd8e798def8..91ae2583af7 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 1f52991db67..b4aed94fc3c 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; 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 45092e22c2d..92c2f0a40cf 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 6defe8f2e42..fa9ed1888da 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.io.PathUtils; 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 51ae8ea6a4f..2895e6d33b1 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 java.util.function.BiConsumer; 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 @@ abstract class ESElasticsearchCliTestCase extends ESTestCase { 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 484520f65ac..a084e560f3f 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 5e628b99f3d..579e11e53e8 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 086dca0d949..34d8424d774 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 201075c3d81..20ddc59bf45 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 f9d9535d637..5351ece2d32 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.settings.Settings; 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 94b1b49c1a0..d53722b881e 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 java.util.Set; 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 66e5e970acb..e6c68e51be7 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.ClusterModule; 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.settings.Settings; 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 java.util.stream.Stream; 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.NoMasterBlockService.NO_MASTER 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 @@ public class AbstractCoordinatorTestCase extends ESTestCase { 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 0745eaca92a..0797722cea2 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.DiscoveryNodeRole; 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 9c7ee2473d7..87d1bbccdf9 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 a5b4f9ec9e4..438ea9040df 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 b021a58e4b3..c32f4ec7f5e 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 c6b69565bc3..8636ea56fa5 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 955b2219a25..588d3be95bd 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 392ab34086f..ddafb820082 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.EsExecutors; 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 2be1c885339..ddca8b5f801 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 15d9c92c2f1..cbf2673afe8 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 c48f425ae44..83d489f5480 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 5b00f9f2e86..9f307ea4b26 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 de55403d162..71bc59fa2f0 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 ef3fcbd4728..365dcdb594d 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 71c5b0ca116..5054f8e8c1d 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 b8d90e9e3a2..def23729e74 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 6b08c6a7624..8c06b9fbb5e 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 @@ import java.util.concurrent.CountDownLatch; /** * 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 59abca2965c..d76d4db51dc 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 bde97ed08d4..72c26d00299 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.Accountables; 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 73a03cdbd3b..2c31eb7d217 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 f1f8ffaa17a..5b517b1cc55 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 b63ac75f493..db5b4431ed8 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 @@ package org.opensearch.node; 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.ClusterSettings; 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 93c4d5a25d8..9cd5a38694f 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.lucene.index.OpenSearchDirectoryReader; 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 24af3a2dd40..d0666f5fbf1 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 d7b5d75ff1a..dcab92e9ad6 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 e8a2c0038d9..a84c148e8ba 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 @@ package org.elasticsearch.cluster.service; 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 17b8bcd23bd..256968e0921 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.opensearch.common.util.concurrent.EsExecutors; 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 f0cdf5b6514..e56496ef698 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 @@ package org.elasticsearch.common.util; 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 d527b648b50..c2349d61222 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 @@ package org.elasticsearch.test.disruption; 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 6f0b3757c8e..8de4df9a798 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 @@ package org.opensearch.node; 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 4d287cba9ed..ab17659f12c 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.network.NetworkService; 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;