From a71f725dd8ac6f3071f589a3dfcb0aaa2a9c5a83 Mon Sep 17 00:00:00 2001 From: Harold Wang <74381974+harold-wang@users.noreply.github.com> Date: Tue, 9 Mar 2021 22:14:48 -0800 Subject: [PATCH] [Rename] Rename files under three server sub folders (#195) Refactor below three folders as part of the Elasticsearch to OpenSearch renaming effort. . server/src/internalClusterTest . server/src/main/java11 . server/src/main/resources . rest-api-spec Signed-off-by: Harold Wang --- .../test/rest/ClientYamlTestSuiteIT.java | 6 +- .../action/IndicesRequestIT.java | 97 +++++----- .../action/ListenerActionIT.java | 17 +- .../action/RejectionActionIT.java | 28 ++- .../action/admin/HotThreadsIT.java | 18 +- .../action/admin/ReloadSecureSettingsIT.java | 30 +-- .../ClusterAllocationExplainIT.java | 65 ++++--- .../node/tasks/CancellableTasksIT.java | 61 +++--- .../node/tasks/TaskStorageRetryIT.java | 20 +- .../admin/cluster/node/tasks/TasksIT.java | 87 ++++----- .../repositories/RepositoryBlocksIT.java | 18 +- .../cluster/snapshots/SnapshotBlocksIT.java | 25 +-- ...ansportClusterStateActionDisruptionIT.java | 39 ++-- .../admin/cluster/stats/ClusterStatsIT.java | 33 ++-- .../cluster/tasks/PendingTasksBlocksIT.java | 23 ++- .../ValidateIndicesAliasesRequestIT.java | 32 ++-- .../clear/ClearIndicesCacheBlocksIT.java | 25 ++- .../admin/indices/create/CloneIndexIT.java | 24 +-- .../admin/indices/create/CreateIndexIT.java | 55 +++--- .../admin/indices/create/ShrinkIndexIT.java | 67 +++---- .../admin/indices/create/SplitIndexIT.java | 68 +++---- .../indices/delete/DeleteIndexBlocksIT.java | 22 +-- .../admin/indices/exists/IndicesExistsIT.java | 22 +-- .../admin/indices/flush/FlushBlocksIT.java | 23 ++- .../forcemerge/ForceMergeBlocksIT.java | 25 ++- .../indices/forcemerge/ForceMergeIT.java | 25 ++- .../action/admin/indices/get/GetIndexIT.java | 38 ++-- .../put/ValidateMappingRequestPluginIT.java | 17 +- .../indices/refresh/RefreshBlocksIT.java | 24 ++- .../admin/indices/rollover/RolloverIT.java | 45 ++--- .../segments/IndicesSegmentsBlocksIT.java | 25 ++- .../shards/IndicesShardStoreRequestIT.java | 45 +++-- .../indices/stats/IndicesStatsBlocksIT.java | 23 ++- .../action/bulk/BulkIntegrationIT.java | 40 ++-- .../bulk/BulkProcessorClusterSettingsIT.java | 14 +- .../action/bulk/BulkProcessorIT.java | 42 ++-- .../action/bulk/BulkProcessorRetryIT.java | 21 +- .../action/bulk/BulkRejectionIT.java | 24 +-- .../action/bulk/BulkWithUpdatesIT.java | 58 +++--- .../action/ingest/AsyncIngestProcessorIT.java | 54 +++--- .../SearchProgressActionListenerIT.java | 29 +-- .../action/search/TransportSearchIT.java | 95 ++++----- .../support/ActiveShardsObserverIT.java | 16 +- .../support/WaitActiveShardCountIT.java | 23 +-- .../master/IndexingMasterFailoverIT.java | 18 +- ...tReplicationActionRetryOnClosedNodeIT.java | 63 +++--- .../action/termvectors/GetTermVectorsIT.java | 26 +-- .../termvectors/MultiTermVectorsIT.java | 14 +- .../aliases/IndexAliasesIT.java | 86 ++++----- .../blocks/SimpleBlocksIT.java | 51 ++--- .../broadcast/BroadcastActionsIT.java | 18 +- .../RecoveryWithUnsupportedIndicesIT.java | 18 +- .../documentation/IndicesDocumentationIT.java | 14 +- .../client/node/NodeClientIT.java | 14 +- .../client/transport/NodeDisconnectIT.java | 22 +-- .../client/transport/TransportClientIT.java | 40 ++-- .../transport/TransportClientRetryIT.java | 30 +-- .../cluster/ClusterHealthIT.java | 28 +-- .../cluster/ClusterInfoServiceIT.java | 63 +++--- .../cluster/ClusterStateDiffIT.java | 96 +++++----- .../cluster/ClusterStateIT.java | 60 +++--- .../cluster/MinimumMasterNodesIT.java | 42 ++-- .../cluster/NoMasterNodeIT.java | 58 +++--- .../cluster/SimpleClusterStateIT.java | 79 ++++---- .../cluster/SimpleDataNodesIT.java | 35 ++-- .../cluster/SpecificMasterNodesIT.java | 28 +-- .../cluster/UpdateSettingsValidationIT.java | 18 +- .../action/shard/ShardStateActionIT.java | 25 +-- .../allocation/AwarenessAllocationIT.java | 30 +-- .../cluster/allocation/ClusterRerouteIT.java | 84 ++++---- .../allocation/FilteringAllocationIT.java | 40 ++-- .../allocation/SimpleAllocationIT.java | 16 +- .../coordination/RareClusterStateIT.java | 69 +++---- .../coordination/RemoveCustomsCommandIT.java | 20 +- .../coordination/RemoveSettingsCommandIT.java | 22 +-- .../UnsafeBootstrapAndDetachCommandIT.java | 49 ++--- .../coordination/VotingConfigurationIT.java | 22 +-- .../cluster/coordination/Zen1IT.java | 71 +++---- .../cluster/coordination/ZenDiscoveryIT.java | 42 ++-- .../metadata/TemplateUpgradeServiceIT.java | 36 ++-- .../metadata/UpgradeIndexSettingsIT.java | 10 +- .../cluster/node/DiscoveryNodeRoleIT.java | 19 +- .../cluster/routing/AllocationIdIT.java | 59 +++--- .../cluster/routing/DelayedAllocationIT.java | 22 +-- .../cluster/routing/PrimaryAllocationIT.java | 76 ++++---- .../routing/allocation/ShardStateIT.java | 20 +- .../decider/DiskThresholdDeciderIT.java | 68 +++---- .../allocation/decider/MockDiskUsagesIT.java | 53 +++--- .../UpdateShardAllocationSettingsIT.java | 20 +- .../cluster/service/ClusterServiceIT.java | 24 +-- .../cluster/settings/ClusterSettingsIT.java | 29 +-- .../cluster/settings/SettingsFilteringIT.java | 22 ++- .../cluster/shards/ClusterSearchShardsIT.java | 26 +-- .../cluster/shards/ClusterShardLimitIT.java | 38 ++-- .../common/settings/ConsistentSettingsIT.java | 16 +- .../common/settings/UpgradeSettingsIT.java | 15 +- .../ClusterDisruptionCleanSettingsIT.java | 24 +-- .../discovery/ClusterDisruptionIT.java | 71 +++---- .../discovery/DiscoveryDisruptionIT.java | 42 ++-- .../discovery/DiskDisruptionIT.java | 25 +-- .../discovery/MasterDisruptionIT.java | 38 ++-- .../SettingsBasedSeedHostsProviderIT.java | 16 +- .../discovery/SnapshotDisruptionIT.java | 51 ++--- .../discovery/StableMasterDisruptionIT.java | 46 ++--- .../single/SingleNodeDiscoveryIT.java | 34 ++-- .../AliasedIndexDocumentActionsIT.java | 4 +- .../document/DocumentActionsIT.java | 45 ++--- .../document/ShardInfoIT.java | 31 +-- .../env/NodeEnvironmentIT.java | 28 +-- .../env/NodeRepurposeCommandIT.java | 20 +- .../explain/ExplainActionIT.java | 24 +-- .../gateway/GatewayIndexStateIT.java | 73 +++---- .../gateway/MetadataNodesIT.java | 32 ++-- .../gateway/QuorumGatewayIT.java | 26 +-- .../gateway/RecoverAfterNodesIT.java | 24 +-- .../gateway/RecoveryFromGatewayIT.java | 81 ++++---- .../gateway/ReplicaShardAllocatorIT.java | 60 +++--- .../get/GetActionIT.java | 47 ++--- .../get/LegacyGetActionIT.java | 22 +-- .../index/FinalPipelineIT.java | 69 +++---- .../index/HiddenIndexIT.java | 22 +-- .../index/IndexRequestBuilderIT.java | 22 +-- .../index/IndexSortIT.java | 12 +- .../index/IndexingPressureIT.java | 48 ++--- .../index/SettingsListenerIT.java | 24 +-- .../index/WaitUntilRefreshIT.java | 41 ++-- .../index/engine/InternalEngineMergeIT.java | 26 +-- .../index/engine/MaxDocsLimitIT.java | 40 ++-- .../index/fielddata/FieldDataLoadingIT.java | 10 +- .../mapper/CopyToMapperIntegrationIT.java | 28 +-- .../index/mapper/DynamicMappingIT.java | 31 +-- .../ExternalValuesMapperIntegrationIT.java | 22 +-- .../mapper/MultiFieldsIntegrationIT.java | 30 +-- .../query/plugin/CustomQueryParserIT.java | 12 +- .../index/search/MatchPhraseQueryIT.java | 22 +-- .../index/seqno/GlobalCheckpointSyncIT.java | 36 ++-- .../PeerRecoveryRetentionLeaseCreationIT.java | 28 +-- .../index/seqno/RetentionLeaseIT.java | 50 ++--- .../shard/GlobalCheckpointListenersIT.java | 20 +- .../index/shard/IndexShardIT.java | 146 +++++++------- .../RemoveCorruptedShardDataCommandIT.java | 97 +++++----- .../index/shard/SearchIdleIT.java | 28 +-- .../index/store/CorruptedFileIT.java | 100 +++++----- .../index/store/CorruptedTranslogIT.java | 44 ++--- .../index/store/ExceptionRetryIT.java | 46 ++--- .../index/suggest/stats/SuggestStatsIT.java | 38 ++-- .../indexing/IndexActionIT.java | 29 +-- ...DateMathIndexExpressionsIntegrationIT.java | 25 +-- .../indices/IndexingMemoryControllerIT.java | 30 +-- .../indices/IndicesLifecycleListenerIT.java | 66 +++---- .../indices/IndicesOptionsIntegrationIT.java | 40 ++-- .../indices/IndicesRequestCacheIT.java | 100 +++++----- .../PreBuiltAnalyzerIntegrationIT.java | 18 +- .../indices/analyze/AnalyzeActionIT.java | 17 +- .../exists/indices/IndicesExistsIT.java | 20 +- .../indices/exists/types/TypesExistsIT.java | 28 +-- .../indices/flush/FlushIT.java | 66 +++---- .../mapping/ConcurrentDynamicTemplateIT.java | 16 +- .../DedicatedMasterGetFieldMappingIT.java | 6 +- .../LegacyUpdateMappingIntegrationIT.java | 22 +-- .../mapping/SimpleGetFieldMappingsIT.java | 37 ++-- .../indices/mapping/SimpleGetMappingsIT.java | 28 +-- .../mapping/UpdateMappingIntegrationIT.java | 57 +++--- .../memory/breaker/CircuitBreakerNoopIT.java | 26 +-- .../breaker/CircuitBreakerServiceIT.java | 70 +++---- .../RandomExceptionCircuitBreakerIT.java | 50 ++--- .../indices/recovery/DanglingIndicesIT.java | 26 +-- .../recovery/IndexPrimaryRelocationIT.java | 32 ++-- .../indices/recovery/IndexRecoveryIT.java | 180 +++++++++--------- .../recovery/ReplicaToPrimaryPromotionIT.java | 26 +-- .../indices/settings/GetSettingsBlocksIT.java | 24 +-- .../indices/settings/InternalSettingsIT.java | 10 +- .../indices/settings/PrivateSettingsIT.java | 12 +- .../settings/UpdateNumberOfReplicasIT.java | 30 +-- .../indices/settings/UpdateSettingsIT.java | 48 ++--- .../state/CloseIndexDisableCloseAllIT.java | 13 +- .../indices/state/CloseIndexIT.java | 59 +++--- .../state/CloseWhileRelocatingShardsIT.java | 62 +++--- .../indices/state/OpenCloseIndexIT.java | 58 +++--- .../indices/state/ReopenWhileClosingIT.java | 38 ++-- .../indices/state/SimpleIndexStateIT.java | 26 +-- .../indices/stats/IndexStatsIT.java | 80 ++++---- .../indices/stats/LegacyIndexStatsIT.java | 19 +- .../store/IndicesStoreIntegrationIT.java | 76 ++++---- .../template/ComposableTemplateIT.java | 25 +-- .../template/IndexTemplateBlocksIT.java | 15 +- .../template/SimpleIndexTemplateIT.java | 51 ++--- .../ingest/IngestClientIT.java | 58 +++--- ...gestProcessorNotInstalledOnAllNodesIT.java | 22 +-- .../mget/SimpleMgetIT.java | 33 ++-- .../nodesinfo/SimpleNodesInfoIT.java | 22 ++- .../DestructiveOperationsIT.java | 16 +- .../PersistentTasksExecutorFullRestartIT.java | 20 +- .../persistent/PersistentTasksExecutorIT.java | 40 ++-- .../decider/EnableAssignmentDeciderIT.java | 31 +-- .../recovery/FullRollingRestartIT.java | 32 ++-- .../recovery/RecoveryWhileUnderLoadIT.java | 56 +++--- .../recovery/RelocationIT.java | 100 +++++----- .../recovery/SimpleRecoveryIT.java | 23 +-- .../recovery/TruncatedRecoveryIT.java | 38 ++-- .../repositories/RepositoriesServiceIT.java | 22 +-- .../BlobStoreRepositoryCleanupIT.java | 22 +-- .../fs/FsBlobStoreRepositoryIT.java | 26 +-- .../routing/AliasResolveRoutingIT.java | 20 +- .../routing/AliasRoutingIT.java | 25 +-- .../routing/PartitionedRoutingIT.java | 16 +- .../routing/SimpleRoutingIT.java | 48 ++--- .../script/StoredScriptsIT.java | 16 +- .../search/SearchCancellationIT.java | 59 +++--- .../search/SearchTimeoutIT.java | 30 +-- .../search/SearchWithRejectionsIT.java | 17 +- .../search/StressSearchServiceReaperIT.java | 24 +-- .../AggregationsIntegrationIT.java | 22 +-- .../search/aggregations/CombiIT.java | 28 +-- .../search/aggregations/EquivalenceIT.java | 74 +++---- .../aggregations/FiltersAggsRewriteIT.java | 26 +-- .../search/aggregations/MetadataIT.java | 28 +-- .../search/aggregations/MissingValueIT.java | 50 ++--- .../bucket/AdjacencyMatrixIT.java | 52 ++--- .../aggregations/bucket/BooleanTermsIT.java | 22 +-- .../aggregations/bucket/DateHistogramIT.java | 84 ++++---- .../bucket/DateHistogramOffsetIT.java | 30 +-- .../aggregations/bucket/DateRangeIT.java | 50 ++--- .../bucket/DiversifiedSamplerIT.java | 46 ++--- .../aggregations/bucket/DoubleTermsIT.java | 72 +++---- .../search/aggregations/bucket/FilterIT.java | 42 ++-- .../search/aggregations/bucket/FiltersIT.java | 44 ++--- .../aggregations/bucket/GeoDistanceIT.java | 54 +++--- .../aggregations/bucket/GeoHashGridIT.java | 48 ++--- .../search/aggregations/bucket/GlobalIT.java | 30 +-- .../aggregations/bucket/HistogramIT.java | 70 +++---- .../search/aggregations/bucket/IpRangeIT.java | 30 +-- .../search/aggregations/bucket/IpTermsIT.java | 22 +-- .../aggregations/bucket/LongTermsIT.java | 68 +++---- .../aggregations/bucket/MinDocCountIT.java | 54 +++--- .../aggregations/bucket/NaNSortingIT.java | 50 ++--- .../search/aggregations/bucket/NestedIT.java | 88 ++++----- .../search/aggregations/bucket/RangeIT.java | 56 +++--- .../aggregations/bucket/ReverseNestedIT.java | 62 +++--- .../search/aggregations/bucket/SamplerIT.java | 45 ++--- .../aggregations/bucket/ShardReduceIT.java | 66 +++---- .../aggregations/bucket/ShardSizeTermsIT.java | 14 +- .../SignificantTermsSignificanceScoreIT.java | 84 ++++---- .../bucket/TermsDocCountErrorIT.java | 38 ++-- .../bucket/TermsShardMinDocCountIT.java | 40 ++-- .../bucket/terms/StringTermsIT.java | 82 ++++---- .../aggregations/metrics/CardinalityIT.java | 46 ++--- .../CardinalityWithRequestBreakerIT.java | 28 +-- .../aggregations/metrics/ExtendedStatsIT.java | 52 ++--- .../aggregations/metrics/GeoBoundsIT.java | 30 +-- .../aggregations/metrics/GeoCentroidIT.java | 26 +-- .../metrics/HDRPercentileRanksIT.java | 48 ++--- .../metrics/HDRPercentilesIT.java | 48 ++--- .../metrics/MedianAbsoluteDeviationIT.java | 60 +++--- .../metrics/ScriptedMetricIT.java | 62 +++--- .../search/aggregations/metrics/StatsIT.java | 48 ++--- .../search/aggregations/metrics/SumIT.java | 52 ++--- .../metrics/TDigestPercentileRanksIT.java | 48 ++--- .../metrics/TDigestPercentilesIT.java | 48 ++--- .../aggregations/metrics/TopHitsIT.java | 106 +++++------ .../aggregations/metrics/ValueCountIT.java | 58 +++--- .../aggregations/pipeline/AvgBucketIT.java | 40 ++-- .../aggregations/pipeline/BucketScriptIT.java | 50 ++--- .../pipeline/BucketSelectorIT.java | 48 ++--- .../aggregations/pipeline/BucketSortIT.java | 44 ++--- .../pipeline/DateDerivativeIT.java | 40 ++-- .../aggregations/pipeline/DerivativeIT.java | 58 +++--- .../pipeline/ExtendedStatsBucketIT.java | 46 ++--- .../aggregations/pipeline/MaxBucketIT.java | 68 +++---- .../aggregations/pipeline/MinBucketIT.java | 40 ++-- .../aggregations/pipeline/MovAvgIT.java | 51 ++--- .../pipeline/PercentilesBucketIT.java | 42 ++-- .../aggregations/pipeline/SerialDiffIT.java | 34 ++-- .../aggregations/pipeline/StatsBucketIT.java | 40 ++-- .../aggregations/pipeline/SumBucketIT.java | 40 ++-- .../search/basic/SearchRedStateIndexIT.java | 28 +-- .../basic/SearchWhileCreatingIndexIT.java | 17 +- .../search/basic/SearchWhileRelocatingIT.java | 28 +-- .../basic/SearchWithRandomExceptionsIT.java | 47 ++--- .../basic/SearchWithRandomIOExceptionsIT.java | 44 +++-- .../basic/TransportSearchFailuresIT.java | 36 ++-- .../basic/TransportTwoNodesSearchIT.java | 64 +++---- .../search/ccs/CrossClusterSearchIT.java | 30 +-- .../search/fetch/FetchSubPhasePluginIT.java | 38 ++-- .../search/fetch/subphase/InnerHitsIT.java | 76 ++++---- .../fetch/subphase/MatchedQueriesIT.java | 44 ++--- .../highlight/CustomHighlighterSearchIT.java | 20 +- .../highlight/HighlighterSearchIT.java | 132 ++++++------- .../search/fieldcaps/FieldCapabilitiesIT.java | 24 +-- .../search/fields/SearchFieldsIT.java | 79 ++++---- .../functionscore/DecayFunctionScoreIT.java | 76 ++++---- .../functionscore/ExplainableScriptIT.java | 60 +++--- .../FunctionScoreFieldValueIT.java | 28 +-- .../search/functionscore/FunctionScoreIT.java | 50 ++--- .../functionscore/FunctionScorePluginIT.java | 50 ++--- .../search/functionscore/QueryRescorerIT.java | 88 ++++----- .../functionscore/RandomScoreFunctionIT.java | 48 ++--- .../search/geo/GeoBoundingBoxQueryIT.java | 36 ++-- .../search/geo/GeoDistanceIT.java | 54 +++--- .../search/geo/GeoFilterIT.java | 74 +++---- .../search/geo/GeoPolygonIT.java | 32 ++-- .../search/geo/GeoShapeIntegrationIT.java | 40 ++-- .../geo/LegacyGeoShapeIntegrationIT.java | 43 +++-- .../search/morelikethis/MoreLikeThisIT.java | 78 ++++---- .../search/msearch/MultiSearchIT.java | 22 +-- .../search/nested/SimpleNestedIT.java | 57 +++--- .../search/preference/SearchPreferenceIT.java | 36 ++-- .../aggregation/AggregationProfilerIT.java | 72 +++---- .../search/profile/query/QueryProfilerIT.java | 36 ++-- .../search/query/ExistsIT.java | 30 +-- .../search/query/MultiMatchQueryIT.java | 75 ++++---- .../search/query/QueryStringIT.java | 48 ++--- .../search/query/ScriptScoreQueryIT.java | 46 ++--- .../search/query/SearchQueryIT.java | 167 ++++++++-------- .../search/query/SimpleQueryStringIT.java | 98 +++++----- .../scriptfilter/ScriptQuerySearchIT.java | 42 ++-- .../search/scroll/DuelScrollIT.java | 34 ++-- .../search/scroll/SearchScrollIT.java | 83 ++++---- .../SearchScrollWithFailingNodesIT.java | 26 +-- .../search/searchafter/SearchAfterIT.java | 30 +-- .../search/simple/SimpleSearchIT.java | 58 +++--- .../search/slice/SearchSliceIT.java | 41 ++-- .../search/sort/FieldSortIT.java | 76 ++++---- .../search/sort/GeoDistanceIT.java | 46 ++--- .../search/sort/GeoDistanceSortBuilderIT.java | 40 ++-- .../search/sort/SimpleSortIT.java | 50 ++--- .../search/source/MetadataFetchingIT.java | 26 +-- .../search/source/SourceFetchingIT.java | 8 +- .../search/stats/SearchStatsIT.java | 50 ++--- .../suggest/CompletionSuggestSearchIT.java | 70 +++---- .../ContextCompletionSuggestSearchIT.java | 45 ++--- .../search/suggest/SuggestSearchIT.java | 80 ++++---- .../similarity/SimilarityIT.java | 16 +- .../snapshots/AbortedRestoreIT.java | 21 +- .../snapshots/BlobStoreIncrementalityIT.java | 21 +- .../snapshots/CloneSnapshotIT.java | 42 ++-- .../snapshots/ConcurrentSnapshotsIT.java | 59 +++--- .../CorruptedBlobStoreRepositoryIT.java | 51 ++--- .../DedicatedClusterSnapshotRestoreIT.java | 117 ++++++------ ...etadataLoadingDuringSnapshotRestoreIT.java | 32 ++-- .../snapshots/MultiClusterRepoAccessIT.java | 32 ++-- .../snapshots/RepositoriesIT.java | 31 +-- .../RepositoryFilterUserMetadataIT.java | 47 ++--- .../snapshots/RestoreSnapshotIT.java | 46 ++--- .../SharedClusterSnapshotRestoreIT.java | 95 ++++----- .../SnapshotCustomPluginStateIT.java | 30 +-- .../snapshots/SnapshotShardsServiceIT.java | 20 +- .../snapshots/SnapshotStatusApisIT.java | 25 +-- .../threadpool/SimpleThreadPoolIT.java | 30 +-- .../update/UpdateIT.java | 54 +++--- .../update/UpdateNoopIT.java | 16 +- .../validate/SimpleValidateQueryIT.java | 41 ++-- .../ConcurrentDocumentOperationIT.java | 12 +- .../ConcurrentSeqNoVersioningIT.java | 48 ++--- .../versioning/SimpleVersioningIT.java | 36 ++-- .../monitor/jvm/JvmPid.java | 2 +- .../java.util.spi.CalendarDataProvider | 2 +- ...asticsearch.common.xcontent.ErrorOnUnknown | 1 - ...h.common.xcontent.XContentBuilderExtension | 1 - ....opensearch.common.xcontent.ErrorOnUnknown | 1 + ...h.common.xcontent.XContentBuilderExtension | 1 + .../bootstrap/security.policy | 10 +- .../bootstrap/test-framework.policy | 8 +- .../bootstrap/untrusted.policy | 0 .../tasks/task-index-mapping.json | 0 365 files changed, 7529 insertions(+), 7432 deletions(-) rename rest-api-spec/src/yamlRestTest/java/org/{elasticsearch => opensearch}/test/rest/ClientYamlTestSuiteIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/IndicesRequestIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/ListenerActionIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/RejectionActionIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/HotThreadsIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/ReloadSecureSettingsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/allocation/ClusterAllocationExplainIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/node/tasks/CancellableTasksIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/node/tasks/TaskStorageRetryIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/node/tasks/TasksIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/repositories/RepositoryBlocksIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/snapshots/SnapshotBlocksIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/stats/ClusterStatsIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/cluster/tasks/PendingTasksBlocksIT.java (79%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java (70%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/create/CloneIndexIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/create/CreateIndexIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/create/ShrinkIndexIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/create/SplitIndexIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/delete/DeleteIndexBlocksIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/exists/IndicesExistsIT.java (68%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/flush/FlushBlocksIT.java (68%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/forcemerge/ForceMergeBlocksIT.java (74%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/forcemerge/ForceMergeIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/get/GetIndexIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/refresh/RefreshBlocksIT.java (66%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/rollover/RolloverIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/segments/IndicesSegmentsBlocksIT.java (68%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/shards/IndicesShardStoreRequestIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/admin/indices/stats/IndicesStatsBlocksIT.java (71%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkIntegrationIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkProcessorClusterSettingsIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkProcessorIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkProcessorRetryIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkRejectionIT.java (82%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/bulk/BulkWithUpdatesIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/ingest/AsyncIngestProcessorIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/search/SearchProgressActionListenerIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/search/TransportSearchIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/support/ActiveShardsObserverIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/support/WaitActiveShardCountIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/support/master/IndexingMasterFailoverIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/termvectors/GetTermVectorsIT.java (98%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/action/termvectors/MultiTermVectorsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/aliases/IndexAliasesIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/blocks/SimpleBlocksIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/broadcast/BroadcastActionsIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/bwcompat/RecoveryWithUnsupportedIndicesIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/client/documentation/IndicesDocumentationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/client/node/NodeClientIT.java (78%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/client/transport/NodeDisconnectIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/client/transport/TransportClientIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/client/transport/TransportClientRetryIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/ClusterHealthIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/ClusterInfoServiceIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/ClusterStateDiffIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/ClusterStateIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/MinimumMasterNodesIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/NoMasterNodeIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/SimpleClusterStateIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/SimpleDataNodesIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/SpecificMasterNodesIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/UpdateSettingsValidationIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/action/shard/ShardStateActionIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/allocation/AwarenessAllocationIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/allocation/ClusterRerouteIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/allocation/FilteringAllocationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/allocation/SimpleAllocationIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/RareClusterStateIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/RemoveCustomsCommandIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/RemoveSettingsCommandIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/VotingConfigurationIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/Zen1IT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/coordination/ZenDiscoveryIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/metadata/TemplateUpgradeServiceIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/metadata/UpgradeIndexSettingsIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/node/DiscoveryNodeRoleIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/AllocationIdIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/DelayedAllocationIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/PrimaryAllocationIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/allocation/ShardStateIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/allocation/decider/MockDiskUsagesIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/service/ClusterServiceIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/settings/ClusterSettingsIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/settings/SettingsFilteringIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/shards/ClusterSearchShardsIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/cluster/shards/ClusterShardLimitIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/common/settings/ConsistentSettingsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/common/settings/UpgradeSettingsIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/ClusterDisruptionCleanSettingsIT.java (78%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/ClusterDisruptionIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/DiscoveryDisruptionIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/DiskDisruptionIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/MasterDisruptionIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/SettingsBasedSeedHostsProviderIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/SnapshotDisruptionIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/StableMasterDisruptionIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/discovery/single/SingleNodeDiscoveryIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/document/AliasedIndexDocumentActionsIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/document/DocumentActionsIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/document/ShardInfoIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/env/NodeEnvironmentIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/env/NodeRepurposeCommandIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/explain/ExplainActionIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/GatewayIndexStateIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/MetadataNodesIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/QuorumGatewayIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/RecoverAfterNodesIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/RecoveryFromGatewayIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/gateway/ReplicaShardAllocatorIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/get/GetActionIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/get/LegacyGetActionIT.java (82%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/FinalPipelineIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/HiddenIndexIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/IndexRequestBuilderIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/IndexSortIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/IndexingPressureIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/SettingsListenerIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/WaitUntilRefreshIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/engine/InternalEngineMergeIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/engine/MaxDocsLimitIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/fielddata/FieldDataLoadingIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/mapper/CopyToMapperIntegrationIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/mapper/DynamicMappingIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/mapper/ExternalValuesMapperIntegrationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/mapper/MultiFieldsIntegrationIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/query/plugin/CustomQueryParserIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/search/MatchPhraseQueryIT.java (79%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/seqno/GlobalCheckpointSyncIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/seqno/RetentionLeaseIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/shard/GlobalCheckpointListenersIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/shard/IndexShardIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/shard/RemoveCorruptedShardDataCommandIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/shard/SearchIdleIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/store/CorruptedFileIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/store/CorruptedTranslogIT.java (74%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/store/ExceptionRetryIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/index/suggest/stats/SuggestStatsIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indexing/IndexActionIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/DateMathIndexExpressionsIntegrationIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/IndexingMemoryControllerIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/IndicesLifecycleListenerIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/IndicesOptionsIntegrationIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/IndicesRequestCacheIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/analysis/PreBuiltAnalyzerIntegrationIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/analyze/AnalyzeActionIT.java (98%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/exists/indices/IndicesExistsIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/exists/types/TypesExistsIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/flush/FlushIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/ConcurrentDynamicTemplateIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/DedicatedMasterGetFieldMappingIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/LegacyUpdateMappingIntegrationIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/SimpleGetFieldMappingsIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/SimpleGetMappingsIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/mapping/UpdateMappingIntegrationIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/memory/breaker/CircuitBreakerNoopIT.java (79%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/memory/breaker/CircuitBreakerServiceIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/recovery/DanglingIndicesIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/recovery/IndexPrimaryRelocationIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/recovery/IndexRecoveryIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/recovery/ReplicaToPrimaryPromotionIT.java (82%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/settings/GetSettingsBlocksIT.java (74%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/settings/InternalSettingsIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/settings/PrivateSettingsIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/settings/UpdateNumberOfReplicasIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/settings/UpdateSettingsIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/CloseIndexDisableCloseAllIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/CloseIndexIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/CloseWhileRelocatingShardsIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/OpenCloseIndexIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/ReopenWhileClosingIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/state/SimpleIndexStateIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/stats/IndexStatsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/stats/LegacyIndexStatsIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/store/IndicesStoreIntegrationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/template/ComposableTemplateIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/template/IndexTemplateBlocksIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/indices/template/SimpleIndexTemplateIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/ingest/IngestClientIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/ingest/IngestProcessorNotInstalledOnAllNodesIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/mget/SimpleMgetIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/nodesinfo/SimpleNodesInfoIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/operateAllIndices/DestructiveOperationsIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksExecutorFullRestartIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksExecutorIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/persistent/decider/EnableAssignmentDeciderIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/recovery/FullRollingRestartIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/recovery/RecoveryWhileUnderLoadIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/recovery/RelocationIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/recovery/SimpleRecoveryIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/recovery/TruncatedRecoveryIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/repositories/RepositoriesServiceIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/repositories/blobstore/BlobStoreRepositoryCleanupIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/repositories/fs/FsBlobStoreRepositoryIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/routing/AliasResolveRoutingIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/routing/AliasRoutingIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/routing/PartitionedRoutingIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/routing/SimpleRoutingIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/script/StoredScriptsIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/SearchCancellationIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/SearchTimeoutIT.java (79%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/SearchWithRejectionsIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/StressSearchServiceReaperIT.java (73%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/AggregationsIntegrationIT.java (78%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/CombiIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/EquivalenceIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/FiltersAggsRewriteIT.java (77%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/MetadataIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/MissingValueIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/AdjacencyMatrixIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/BooleanTermsIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/DateHistogramIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/DateHistogramOffsetIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/DateRangeIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/DiversifiedSamplerIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/DoubleTermsIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/FilterIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/FiltersIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/GeoDistanceIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/GeoHashGridIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/GlobalIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/HistogramIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/IpRangeIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/IpTermsIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/LongTermsIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/MinDocCountIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/NaNSortingIT.java (78%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/NestedIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/RangeIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/ReverseNestedIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/SamplerIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/ShardReduceIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/ShardSizeTermsIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/TermsDocCountErrorIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/TermsShardMinDocCountIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/bucket/terms/StringTermsIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/CardinalityIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java (73%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/ExtendedStatsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/GeoBoundsIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/GeoCentroidIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/HDRPercentileRanksIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/HDRPercentilesIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/MedianAbsoluteDeviationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/ScriptedMetricIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/StatsIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/SumIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/TDigestPercentileRanksIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/TDigestPercentilesIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/TopHitsIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/metrics/ValueCountIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/AvgBucketIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/BucketScriptIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/BucketSelectorIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/BucketSortIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/DateDerivativeIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/DerivativeIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/ExtendedStatsBucketIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/MaxBucketIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/MinBucketIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/MovAvgIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/PercentilesBucketIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/SerialDiffIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/StatsBucketIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/aggregations/pipeline/SumBucketIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/SearchRedStateIndexIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/SearchWhileCreatingIndexIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/SearchWhileRelocatingIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/SearchWithRandomExceptionsIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/SearchWithRandomIOExceptionsIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/TransportSearchFailuresIT.java (84%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/basic/TransportTwoNodesSearchIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/ccs/CrossClusterSearchIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fetch/FetchSubPhasePluginIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fetch/subphase/InnerHitsIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fetch/subphase/MatchedQueriesIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java (89%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fetch/subphase/highlight/HighlighterSearchIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fieldcaps/FieldCapabilitiesIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/fields/SearchFieldsIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/DecayFunctionScoreIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/ExplainableScriptIT.java (76%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/FunctionScoreFieldValueIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/FunctionScoreIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/FunctionScorePluginIT.java (78%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/QueryRescorerIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/functionscore/RandomScoreFunctionIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/GeoBoundingBoxQueryIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/GeoDistanceIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/GeoFilterIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/GeoPolygonIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/GeoShapeIntegrationIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/geo/LegacyGeoShapeIntegrationIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/morelikethis/MoreLikeThisIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/msearch/MultiSearchIT.java (81%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/nested/SimpleNestedIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/preference/SearchPreferenceIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/profile/aggregation/AggregationProfilerIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/profile/query/QueryProfilerIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/ExistsIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/MultiMatchQueryIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/QueryStringIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/ScriptScoreQueryIT.java (85%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/SearchQueryIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/query/SimpleQueryStringIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/scriptfilter/ScriptQuerySearchIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/scroll/DuelScrollIT.java (91%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/scroll/SearchScrollIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/scroll/SearchScrollWithFailingNodesIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/searchafter/SearchAfterIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/simple/SimpleSearchIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/slice/SearchSliceIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/sort/FieldSortIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/sort/GeoDistanceIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/sort/GeoDistanceSortBuilderIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/sort/SimpleSortIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/source/MetadataFetchingIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/source/SourceFetchingIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/stats/SearchStatsIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/suggest/CompletionSuggestSearchIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/suggest/ContextCompletionSuggestSearchIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/search/suggest/SuggestSearchIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/similarity/SimilarityIT.java (87%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/AbortedRestoreIT.java (90%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/BlobStoreIncrementalityIT.java (94%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/CloneSnapshotIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/ConcurrentSnapshotsIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/CorruptedBlobStoreRepositoryIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/DedicatedClusterSnapshotRestoreIT.java (95%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/MultiClusterRepoAccessIT.java (83%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/RepositoriesIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/RepositoryFilterUserMetadataIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/RestoreSnapshotIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/SharedClusterSnapshotRestoreIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/SnapshotCustomPluginStateIT.java (92%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/SnapshotShardsServiceIT.java (86%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/snapshots/SnapshotStatusApisIT.java (97%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/threadpool/SimpleThreadPoolIT.java (80%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/update/UpdateIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/update/UpdateNoopIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/validate/SimpleValidateQueryIT.java (93%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/versioning/ConcurrentDocumentOperationIT.java (88%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/versioning/ConcurrentSeqNoVersioningIT.java (96%) rename server/src/internalClusterTest/java/org/{elasticsearch => opensearch}/versioning/SimpleVersioningIT.java (97%) rename server/src/main/java11/org/{elasticsearch => opensearch}/monitor/jvm/JvmPid.java (95%) delete mode 100644 server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.ErrorOnUnknown delete mode 100644 server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.XContentBuilderExtension create mode 100644 server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.ErrorOnUnknown create mode 100644 server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.XContentBuilderExtension rename server/src/main/resources/org/{elasticsearch => opensearch}/bootstrap/security.policy (96%) rename server/src/main/resources/org/{elasticsearch => opensearch}/bootstrap/test-framework.policy (94%) rename server/src/main/resources/org/{elasticsearch => opensearch}/bootstrap/untrusted.policy (100%) rename server/src/main/resources/org/{elasticsearch => opensearch}/tasks/task-index-mapping.json (100%) diff --git a/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java b/rest-api-spec/src/yamlRestTest/java/org/opensearch/test/rest/ClientYamlTestSuiteIT.java similarity index 90% rename from rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java rename to rest-api-spec/src/yamlRestTest/java/org/opensearch/test/rest/ClientYamlTestSuiteIT.java index 12773cf59e4..17a4d73f537 100644 --- a/rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java +++ b/rest-api-spec/src/yamlRestTest/java/org/opensearch/test/rest/ClientYamlTestSuiteIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.test.rest; +package org.opensearch.test.rest; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import org.apache.lucene.util.TimeUnits; -import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate; -import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase; +import org.opensearch.test.rest.yaml.ClientYamlTestCandidate; +import org.opensearch.test.rest.yaml.ESClientYamlSuiteTestCase; /** Rest integration test. Runs against a cluster started by {@code gradle integTest} */ diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/IndicesRequestIT.java b/server/src/internalClusterTest/java/org/opensearch/action/IndicesRequestIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/action/IndicesRequestIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/IndicesRequestIT.java index 077f6b44312..f918fbfafa3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/IndicesRequestIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/IndicesRequestIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action; +package org.opensearch.action; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.analyze.AnalyzeAction; @@ -53,50 +53,51 @@ import org.opensearch.action.admin.indices.stats.IndicesStatsAction; import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; import org.opensearch.action.admin.indices.validate.query.ValidateQueryAction; import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequest; -import org.elasticsearch.action.bulk.BulkAction; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.delete.DeleteRequest; -import org.elasticsearch.action.explain.ExplainAction; -import org.elasticsearch.action.explain.ExplainRequest; -import org.elasticsearch.action.fieldcaps.FieldCapabilitiesAction; -import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest; -import org.elasticsearch.action.get.GetAction; -import org.elasticsearch.action.get.GetRequest; -import org.elasticsearch.action.get.MultiGetAction; -import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchTransportService; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.support.replication.TransportReplicationActionTests; -import org.elasticsearch.action.termvectors.MultiTermVectorsAction; -import org.elasticsearch.action.termvectors.MultiTermVectorsRequest; -import org.elasticsearch.action.termvectors.TermVectorsAction; -import org.elasticsearch.action.termvectors.TermVectorsRequest; -import org.elasticsearch.action.update.UpdateAction; -import org.elasticsearch.action.update.UpdateRequest; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.NetworkPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.transport.TransportChannel; -import org.elasticsearch.transport.TransportInterceptor; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestHandler; +import org.opensearch.action.bulk.BulkAction; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.delete.DeleteRequest; +import org.opensearch.action.explain.ExplainAction; +import org.opensearch.action.explain.ExplainRequest; +import org.opensearch.action.fieldcaps.FieldCapabilitiesAction; +import org.opensearch.action.fieldcaps.FieldCapabilitiesRequest; +import org.opensearch.action.get.GetAction; +import org.opensearch.action.get.GetRequest; +import org.opensearch.action.get.MultiGetAction; +import org.opensearch.action.get.MultiGetRequest; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchTransportService; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.support.replication.TransportReplicationActionTests; +import org.opensearch.action.termvectors.MultiTermVectorsAction; +import org.opensearch.action.termvectors.MultiTermVectorsRequest; +import org.opensearch.action.termvectors.TermVectorsAction; +import org.opensearch.action.termvectors.TermVectorsRequest; +import org.opensearch.action.update.UpdateAction; +import org.opensearch.action.update.UpdateRequest; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.NetworkPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.tasks.Task; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.transport.TransportChannel; +import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestHandler; + import org.junit.After; import org.junit.Before; import org.opensearch.action.DocWriteResponse; @@ -113,15 +114,15 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.emptyIterable; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasItem; @ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2) -public class IndicesRequestIT extends ESIntegTestCase { +public class IndicesRequestIT extends OpenSearchIntegTestCase { private final List indices = new ArrayList<>(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/ListenerActionIT.java b/server/src/internalClusterTest/java/org/opensearch/action/ListenerActionIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/action/ListenerActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/ListenerActionIT.java index 47480d34f51..d3488a8f0d6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/ListenerActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/ListenerActionIT.java @@ -17,20 +17,19 @@ * under the License. */ -package org.elasticsearch.action; +package org.opensearch.action; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.client.transport.TransportClient; -import org.elasticsearch.test.ESIntegTestCase; -import org.opensearch.action.ActionListener; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.client.transport.TransportClient; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -public class ListenerActionIT extends ESIntegTestCase { +public class ListenerActionIT extends OpenSearchIntegTestCase { public void testThreadedListeners() throws Throwable { final CountDownLatch latch = new CountDownLatch(1); final AtomicReference failure = new AtomicReference<>(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/RejectionActionIT.java b/server/src/internalClusterTest/java/org/opensearch/action/RejectionActionIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/action/RejectionActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/RejectionActionIT.java index c04805aed4c..b4a3caaa3b0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/RejectionActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/RejectionActionIT.java @@ -17,20 +17,18 @@ * under the License. */ -package org.elasticsearch.action; +package org.opensearch.action; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.ActionListener; -import org.opensearch.action.LatchedActionListener; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.EsRejectedExecutionException; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Locale; import java.util.concurrent.CopyOnWriteArrayList; @@ -40,8 +38,8 @@ import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2) -public class RejectionActionIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2) +public class RejectionActionIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/HotThreadsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/HotThreadsIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/HotThreadsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/HotThreadsIT.java index 2e7c74de29d..2614e4820ed 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/HotThreadsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/HotThreadsIT.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin; +package org.opensearch.action.admin; import org.apache.lucene.util.Constants; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.hotthreads.NodeHotThreads; import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequestBuilder; import org.opensearch.action.admin.cluster.node.hotthreads.NodesHotThreadsResponse; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matcher; import java.util.Map; @@ -32,10 +32,10 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; @@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.not; import static org.hamcrest.collection.IsEmptyCollection.empty; -public class HotThreadsIT extends ESIntegTestCase { +public class HotThreadsIT extends OpenSearchIntegTestCase { public void testHotThreadsDontFail() throws ExecutionException, InterruptedException { /** @@ -142,7 +142,7 @@ public class HotThreadsIT extends ESIntegTestCase { NodesHotThreadsResponse response = builder.execute().get(); final Matcher containsCachedTimeThreadRunMethod - = containsString("org.elasticsearch.threadpool.ThreadPool$CachedTimeThread.run"); + = containsString("org.opensearch.threadpool.ThreadPool$CachedTimeThread.run"); int totSizeAll = 0; for (NodeHotThreads node : response.getNodesMap().values()) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/ReloadSecureSettingsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/ReloadSecureSettingsIT.java index 6bd56a8771a..1379c2ff746 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/ReloadSecureSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/ReloadSecureSettingsIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.action.admin; +package org.opensearch.action.admin; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.reload.NodesReloadSecureSettingsResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.KeyStoreWrapper; -import org.elasticsearch.common.settings.SecureSettings; -import org.elasticsearch.common.settings.SecureString; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.plugins.ReloadablePlugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.transport.RemoteTransportException; +import org.opensearch.common.Strings; +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.opensearch.env.Environment; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.plugins.ReloadablePlugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.transport.RemoteTransportException; import java.io.InputStream; import java.nio.file.Files; @@ -52,8 +52,8 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class ReloadSecureSettingsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class ReloadSecureSettingsIT extends OpenSearchIntegTestCase { public void testMissingKeystoreFile() throws Exception { final PluginsService pluginsService = internalCluster().getInstance(PluginsService.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java index 2a8c707813b..9522c2c8ad4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java @@ -17,38 +17,37 @@ * under the License. */ -package org.elasticsearch.action.admin.cluster.allocation; +package org.opensearch.action.admin.cluster.allocation; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.cluster.ClusterInfo; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.UnassignedInfo.AllocationStatus; -import org.elasticsearch.cluster.routing.UnassignedInfo.Reason; -import org.elasticsearch.cluster.routing.allocation.AllocateUnassignedDecision; -import org.elasticsearch.cluster.routing.allocation.AllocationDecision; -import org.elasticsearch.cluster.routing.allocation.MoveDecision; -import org.elasticsearch.cluster.routing.allocation.NodeAllocationResult; -import org.elasticsearch.cluster.routing.allocation.decider.Decision; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.XContentParser.Token; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplanation; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.cluster.ClusterInfo; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus; +import org.opensearch.cluster.routing.UnassignedInfo.Reason; +import org.opensearch.cluster.routing.allocation.AllocateUnassignedDecision; +import org.opensearch.cluster.routing.allocation.AllocationDecision; +import org.opensearch.cluster.routing.allocation.MoveDecision; +import org.opensearch.cluster.routing.allocation.NodeAllocationResult; +import org.opensearch.cluster.routing.allocation.decider.Decision; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.set.Sets; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.common.xcontent.XContentParser.Token; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.index.shard.ShardId; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.io.IOException; import java.util.Collections; @@ -58,7 +57,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -71,8 +70,8 @@ import static org.hamcrest.Matchers.startsWith; /** * Tests for the cluster allocation explanation */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public final class ClusterAllocationExplainIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public final class ClusterAllocationExplainIT extends OpenSearchIntegTestCase { public void testUnassignedPrimaryWithExistingIndex() throws Exception { logger.info("--> starting 2 nodes"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/CancellableTasksIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/CancellableTasksIT.java index 819957154cc..105019968fd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/CancellableTasksIT.java @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin.cluster.node.tasks; +package org.opensearch.action.admin.cluster.node.tasks; import org.apache.lucene.util.SetOnce; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.ResourceNotFoundException; +import org.opensearch.ExceptionsHelper; +import org.opensearch.ResourceNotFoundException; import org.opensearch.action.ActionFuture; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; @@ -31,32 +31,33 @@ import org.opensearch.action.ActionType; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; -import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.action.support.GroupedActionListener; -import org.elasticsearch.action.support.HandledTransportAction; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.util.concurrent.AbstractRunnable; -import org.elasticsearch.common.util.concurrent.ConcurrentCollections; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.tasks.CancellableTask; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.tasks.TaskCancelledException; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.tasks.TaskInfo; -import org.elasticsearch.tasks.TaskManager; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportException; -import org.elasticsearch.transport.TransportResponseHandler; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.GroupedActionListener; +import org.opensearch.action.support.HandledTransportAction; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.client.node.NodeClient; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.util.concurrent.AbstractRunnable; +import org.opensearch.common.util.concurrent.ConcurrentCollections; +import org.opensearch.common.util.set.Sets; +import org.opensearch.plugins.ActionPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.tasks.CancellableTask; +import org.opensearch.tasks.Task; +import org.opensearch.tasks.TaskCancelledException; +import org.opensearch.tasks.TaskId; +import org.opensearch.tasks.TaskInfo; +import org.opensearch.tasks.TaskManager; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportException; +import org.opensearch.transport.TransportResponseHandler; +import org.opensearch.transport.TransportService; + import org.junit.Before; import java.io.IOException; @@ -80,7 +81,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; -public class CancellableTasksIT extends ESIntegTestCase { +public class CancellableTasksIT extends OpenSearchIntegTestCase { static int idGenerator = 0; static final Map beforeSendLatches = ConcurrentCollections.newConcurrentMap(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java index db6da3263d0..b602be36651 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TaskStorageRetryIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.action.admin.cluster.node.tasks; +package org.opensearch.action.admin.cluster.node.tasks; import org.opensearch.action.admin.cluster.node.tasks.get.GetTaskResponse; -import org.elasticsearch.action.support.PlainListenableActionFuture; -import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.action.support.PlainListenableActionFuture; +import org.opensearch.client.node.NodeClient; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.tasks.Task; +import org.opensearch.tasks.TaskId; +import org.opensearch.test.OpenSearchSingleNodeTestCase; +import org.opensearch.threadpool.ThreadPool; import java.util.Arrays; import java.util.Collection; @@ -41,7 +41,7 @@ import static java.util.Collections.singletonMap; * Makes sure that tasks that attempt to store themselves on completion retry if * they don't succeed at first. */ -public class TaskStorageRetryIT extends ESSingleNodeTestCase { +public class TaskStorageRetryIT extends OpenSearchSingleNodeTestCase { @Override protected Collection> getPlugins() { return Arrays.asList(TestTaskPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TasksIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TasksIT.java index 6fa1801d47e..75439dc3793 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/node/tasks/TasksIT.java @@ -16,12 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin.cluster.node.tasks; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.OpenSearchTimeoutException; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.ResourceNotFoundException; +package org.opensearch.action.admin.cluster.node.tasks; + +import org.opensearch.OpenSearchException; +import org.opensearch.OpenSearchTimeoutException; +import org.opensearch.ExceptionsHelper; +import org.opensearch.ResourceNotFoundException; import org.opensearch.action.ActionFuture; import org.opensearch.action.ActionListener; import org.opensearch.action.TaskOperationFailure; @@ -34,36 +35,36 @@ import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; import org.opensearch.action.admin.indices.refresh.RefreshAction; import org.opensearch.action.admin.indices.upgrade.post.UpgradeAction; import org.opensearch.action.admin.indices.validate.query.ValidateQueryAction; -import org.elasticsearch.action.bulk.BulkAction; -import org.elasticsearch.action.index.IndexAction; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchAction; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchTransportService; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.action.support.replication.ReplicationResponse; -import org.elasticsearch.action.support.replication.TransportReplicationActionTests; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.regex.Regex; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.tasks.TaskInfo; -import org.elasticsearch.tasks.TaskResult; -import org.elasticsearch.tasks.TaskResultsService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.tasks.MockTaskManager; -import org.elasticsearch.test.tasks.MockTaskManagerListener; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.ReceiveTimeoutTransportException; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.bulk.BulkAction; +import org.opensearch.action.index.IndexAction; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchAction; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchTransportService; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.action.support.replication.ReplicationResponse; +import org.opensearch.action.support.replication.TransportReplicationActionTests; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Strings; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.regex.Regex; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.tasks.Task; +import org.opensearch.tasks.TaskId; +import org.opensearch.tasks.TaskInfo; +import org.opensearch.tasks.TaskResult; +import org.opensearch.tasks.TaskResultsService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.tasks.MockTaskManager; +import org.opensearch.test.tasks.MockTaskManagerListener; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.ReceiveTimeoutTransportException; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.ArrayList; @@ -82,12 +83,12 @@ import java.util.function.Function; import static java.util.Collections.emptyList; import static java.util.Collections.singleton; -import static org.elasticsearch.common.unit.TimeValue.timeValueMillis; -import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; -import static org.elasticsearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.unit.TimeValue.timeValueMillis; +import static org.opensearch.common.unit.TimeValue.timeValueSeconds; +import static org.opensearch.http.HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; @@ -105,8 +106,8 @@ import static org.hamcrest.Matchers.startsWith; *

* We need at least 2 nodes so we have a master node a non-master node */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, minNumDataNodes = 2, transportClientRatio = 0.0) -public class TasksIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, minNumDataNodes = 2, transportClientRatio = 0.0) +public class TasksIT extends OpenSearchIntegTestCase { private Map, RecordingTaskManagerListener> listeners = new HashMap<>(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/repositories/RepositoryBlocksIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/repositories/RepositoryBlocksIT.java index 47870aa410a..eef81eadf76 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/repositories/RepositoryBlocksIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.action.admin.cluster.repositories; +package org.opensearch.action.admin.cluster.repositories; import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse; import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -36,8 +36,8 @@ import static org.hamcrest.Matchers.hasSize; * * The @NodeScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only". */ -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class RepositoryBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class RepositoryBlocksIT extends OpenSearchIntegTestCase { public void testPutRepositoryWithBlocks() { logger.info("--> registering a repository is blocked when the cluster is read only"); try { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java index 7f85aa2c8e6..ed6bd3d4604 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java @@ -16,24 +16,27 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin.cluster.snapshots; + +package org.opensearch.action.admin.cluster.snapshots; import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.settings.Settings; + +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.settings.Settings; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; + import org.junit.Before; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -42,8 +45,8 @@ import static org.hamcrest.Matchers.hasSize; * * The @NodeScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only". */ -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class SnapshotBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class SnapshotBlocksIT extends OpenSearchIntegTestCase { protected static final String INDEX_NAME = "test-blocks-1"; protected static final String OTHER_INDEX_NAME = "test-blocks-2"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java index dbc272497a2..f9cf1767ff3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/state/TransportClusterStateActionDisruptionIT.java @@ -16,23 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin.cluster.state; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.ClusterBootstrapService; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.discovery.MasterNotDiscoveredException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; -import org.opensearch.action.admin.cluster.state.ClusterStateRequestBuilder; -import org.opensearch.action.admin.cluster.state.ClusterStateResponse; +package org.opensearch.action.admin.cluster.state; + +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.ClusterBootstrapService; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.discovery.MasterNotDiscoveredException; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.Collection; import java.util.Collections; @@ -41,15 +40,15 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.TEST, transportClientRatio = 0) -public class TransportClusterStateActionDisruptionIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 0, scope = OpenSearchIntegTestCase.Scope.TEST, transportClientRatio = 0) +public class TransportClusterStateActionDisruptionIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java index 5e329a811c6..d24e9005cff 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java @@ -17,25 +17,26 @@ * under the License. */ -package org.elasticsearch.action.admin.cluster.stats; +package org.opensearch.action.admin.cluster.stats; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.EsExecutors; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.monitor.os.OsStats; -import org.elasticsearch.node.NodeRoleSettings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.client.Requests; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.EsExecutors; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.monitor.os.OsStats; +import org.opensearch.node.NodeRoleSettings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; + import org.hamcrest.Matchers; import org.opensearch.action.admin.cluster.stats.ClusterStatsIndices; import org.opensearch.action.admin.cluster.stats.ClusterStatsNodes; @@ -56,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ClusterStatsIT extends ESIntegTestCase { +public class ClusterStatsIT extends OpenSearchIntegTestCase { private void assertCounts(ClusterStatsNodes.Counts counts, int total, Map roles) { assertThat(counts.getTotal(), equalTo(total)); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java similarity index 79% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java index aa9436c4655..cfd9ace64e0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java @@ -17,23 +17,22 @@ * under the License. */ -package org.elasticsearch.action.admin.cluster.tasks; +package org.opensearch.action.admin.cluster.tasks; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.gateway.GatewayService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.gateway.GatewayService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -public class PendingTasksBlocksIT extends ESIntegTestCase { +public class PendingTasksBlocksIT extends OpenSearchIntegTestCase { public void testPendingTasksWithIndexBlocks() { createIndex("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java index 4edee093469..40cffc99d48 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/alias/ValidateIndicesAliasesRequestIT.java @@ -17,21 +17,19 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.alias; +package org.opensearch.action.admin.indices.alias; import org.opensearch.action.RequestValidators; -import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; -import org.elasticsearch.cluster.metadata.AliasMetadata; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.Index; -import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESSingleNodeTestCase; - +import org.opensearch.cluster.metadata.AliasMetadata; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.Index; +import org.opensearch.plugins.ActionPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -39,13 +37,13 @@ import java.util.Locale; import java.util.Optional; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.hasToString; -public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase { +public class ValidateIndicesAliasesRequestIT extends OpenSearchSingleNodeTestCase { public static class IndicesAliasesPlugin extends Plugin implements ActionPlugin { @@ -83,12 +81,12 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase { @Override protected Collection> getPlugins() { - return Collections.singletonList(IndicesAliasesPlugin.class); + return Collections.singletonList(IndicesAliasopensearchplugin.class); } public void testAllowed() { final Settings settings = Settings.builder() - .putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed")) + .putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed")) .build(); createIndex("index", settings); final IndicesAliasesRequest request = new IndicesAliasesRequest().origin("allowed"); @@ -104,7 +102,7 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase { public void testNotAllowed() { final Settings settings = Settings.builder() - .putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed")) + .putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("allowed")) .build(); createIndex("index", settings); final String origin = randomFrom("", "not-allowed"); @@ -116,11 +114,11 @@ public class ValidateIndicesAliasesRequestIT extends ESSingleNodeTestCase { public void testSomeAllowed() { final Settings fooIndexSettings = Settings.builder() - .putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("foo_allowed")) + .putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("foo_allowed")) .build(); createIndex("foo", fooIndexSettings); final Settings barIndexSettings = Settings.builder() - .putList(IndicesAliasesPlugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("bar_allowed")) + .putList(IndicesAliasopensearchplugin.ALLOWED_ORIGINS_SETTING.getKey(), Collections.singletonList("bar_allowed")) .build(); createIndex("bar", barIndexSettings); final String origin = randomFrom("foo_allowed", "bar_allowed"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java similarity index 70% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java index ffadbca7d51..fad79850c3f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java @@ -17,25 +17,24 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.cache.clear; +package org.opensearch.action.admin.indices.cache.clear; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class ClearIndicesCacheBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class ClearIndicesCacheBlocksIT extends OpenSearchIntegTestCase { public void testClearIndicesCacheWithBlocks() { createIndex("test"); ensureGreen("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CloneIndexIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CloneIndexIT.java index 6c94e00636e..c28089040f4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CloneIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CloneIndexIT.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.admin.indices.create; +package org.opensearch.action.admin.indices.create; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.shrink.ResizeType; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.index.seqno.SeqNoStats; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.TermsQueryBuilder; +import org.opensearch.index.seqno.SeqNoStats; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; -public class CloneIndexIT extends ESIntegTestCase { +public class CloneIndexIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CreateIndexIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CreateIndexIT.java index 4d0a2de7406..09aac21fd51 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/CreateIndexIT.java @@ -17,45 +17,44 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.create; +package org.opensearch.action.admin.indices.create; import org.opensearch.action.ActionListener; import org.opensearch.action.UnavailableShardsException; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.opensearch.action.admin.indices.create.CreateIndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.IndexService; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.HashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_WAIT_FOR_ACTIVE_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_WAIT_FOR_ACTIVE_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -65,7 +64,7 @@ import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.core.IsNull.notNullValue; @ClusterScope(scope = Scope.TEST) -public class CreateIndexIT extends ESIntegTestCase { +public class CreateIndexIT extends OpenSearchIntegTestCase { public void testCreationDateGivenFails() { try { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/ShrinkIndexIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/ShrinkIndexIT.java index 1f73e26271e..970ef9606e7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/ShrinkIndexIT.java @@ -17,14 +17,15 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.create; +package org.opensearch.action.admin.indices.create; import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortedSetSelector; import org.apache.lucene.search.SortedSetSortField; import org.apache.lucene.util.Constants; -import org.elasticsearch.Version; + +import org.opensearch.Version; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse; import org.opensearch.action.admin.cluster.state.ClusterStateRequest; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; @@ -36,46 +37,46 @@ import org.opensearch.action.admin.indices.shrink.ResizeType; import org.opensearch.action.admin.indices.stats.CommonStats; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterInfoService; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.InternalClusterInfoService; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.Murmur3HashFunction; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.engine.SegmentsStats; -import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.index.seqno.SeqNoStats; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterInfoService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.InternalClusterInfoService; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.Murmur3HashFunction; +import org.opensearch.cluster.routing.RoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.Priority; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.engine.SegmentsStats; +import org.opensearch.index.query.TermsQueryBuilder; +import org.opensearch.index.seqno.SeqNoStats; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.VersionUtils; import java.util.Arrays; import java.util.Map; import java.util.stream.IntStream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; -public class ShrinkIndexIT extends ESIntegTestCase { +public class ShrinkIndexIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/SplitIndexIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/SplitIndexIT.java index 2600009bd13..6da4eb1e5db 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/create/SplitIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/create/SplitIndexIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.create; +package org.opensearch.action.admin.indices.create; import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; @@ -25,7 +25,8 @@ import org.apache.lucene.search.SortedSetSelector; import org.apache.lucene.search.SortedSetSortField; import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.util.Constants; -import org.elasticsearch.Version; + +import org.opensearch.Version; import org.opensearch.action.admin.cluster.state.ClusterStateRequest; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; @@ -33,31 +34,30 @@ import org.opensearch.action.admin.indices.shrink.ResizeType; import org.opensearch.action.admin.indices.stats.CommonStats; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MetadataCreateIndexService; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.Murmur3HashFunction; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.engine.SegmentsStats; -import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.index.seqno.SeqNoStats; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; -import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MetadataCreateIndexService; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.Murmur3HashFunction; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.engine.SegmentsStats; +import org.opensearch.index.query.TermsQueryBuilder; +import org.opensearch.index.seqno.SeqNoStats; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.io.IOException; import java.io.UncheckedIOException; @@ -67,16 +67,16 @@ import java.util.Set; import java.util.function.BiFunction; import java.util.stream.IntStream; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class SplitIndexIT extends ESIntegTestCase { +public class SplitIndexIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/delete/DeleteIndexBlocksIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/delete/DeleteIndexBlocksIT.java index c4b8c96090e..35e069fb657 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/delete/DeleteIndexBlocksIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.delete; +package org.opensearch.action.admin.indices.delete; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; -public class DeleteIndexBlocksIT extends ESIntegTestCase { +public class DeleteIndexBlocksIT extends OpenSearchIntegTestCase { public void testDeleteIndexWithBlocks() { createIndex("test"); ensureGreen("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/exists/IndicesExistsIT.java similarity index 68% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/exists/IndicesExistsIT.java index aff43fc3616..490fb921a41 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/exists/IndicesExistsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/exists/IndicesExistsIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.exists; +package org.opensearch.action.admin.indices.exists; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.discovery.MasterNotDiscoveredException; -import org.elasticsearch.gateway.GatewayService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.discovery.MasterNotDiscoveredException; +import org.opensearch.gateway.GatewayService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.InternalTestCluster; import java.io.IOException; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0.0, +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0.0, autoManageMasterNodes = false) -public class IndicesExistsIT extends ESIntegTestCase { +public class IndicesExistsIT extends OpenSearchIntegTestCase { public void testIndexExistsWithBlocksInPlace() throws IOException { internalCluster().setBootstrapMasterNodeIndex(0); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/flush/FlushBlocksIT.java similarity index 68% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/flush/FlushBlocksIT.java index c6a3a15412a..7f5755a635c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/flush/FlushBlocksIT.java @@ -17,24 +17,23 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.flush; +package org.opensearch.action.admin.indices.flush; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.flush.FlushResponse; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class FlushBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class FlushBlocksIT extends OpenSearchIntegTestCase { public void testFlushWithBlocks() { createIndex("test"); ensureGreen("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java similarity index 74% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java index 6ce898ac7db..38a541ebf0b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeBlocksIT.java @@ -17,25 +17,24 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.forcemerge; +package org.opensearch.action.admin.indices.forcemerge; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class ForceMergeBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class ForceMergeBlocksIT extends OpenSearchIntegTestCase { public void testForceMergeWithBlocks() { createIndex("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeIT.java index 7285ab6b069..25c9820d1d8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeIT.java @@ -17,20 +17,19 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.forcemerge; +package org.opensearch.action.admin.indices.forcemerge; import org.opensearch.action.admin.indices.flush.FlushResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.Index; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; @@ -38,7 +37,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class ForceMergeIT extends ESIntegTestCase { +public class ForceMergeIT extends OpenSearchIntegTestCase { public void testForceMergeUUIDConsistent() throws IOException { internalCluster().ensureAtLeastNumDataNodes(2); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/get/GetIndexIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/get/GetIndexIT.java index 150d902ab79..055ea9defee 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/get/GetIndexIT.java @@ -17,39 +17,37 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.get; +package org.opensearch.action.admin.indices.get; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.get.GetIndexRequest.Feature; -import org.elasticsearch.cluster.metadata.AliasMetadata; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.test.ESIntegTestCase; -import org.opensearch.action.admin.indices.get.GetIndexRequestBuilder; -import org.opensearch.action.admin.indices.get.GetIndexResponse; +import org.opensearch.cluster.metadata.AliasMetadata; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class GetIndexIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class GetIndexIT extends OpenSearchIntegTestCase { @Override protected void setupSuiteScopeCluster() throws Exception { assertAcked(prepareCreate("idx").addAlias(new Alias("alias_idx")).addMapping("type1", "{\"type1\":{}}", XContentType.JSON) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java index ed14774deba..b6b93160141 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/mapping/put/ValidateMappingRequestPluginIT.java @@ -17,15 +17,14 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.mapping.put; +package org.opensearch.action.admin.indices.mapping.put; import org.opensearch.action.RequestValidators; -import org.elasticsearch.common.util.concurrent.ConcurrentCollections; -import org.elasticsearch.index.Index; -import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest; +import org.opensearch.common.util.concurrent.ConcurrentCollections; +import org.opensearch.index.Index; +import org.opensearch.plugins.ActionPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import java.util.Arrays; import java.util.Collection; @@ -33,11 +32,11 @@ import java.util.Collections; import java.util.Map; import java.util.Optional; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class ValidateMappingRequestPluginIT extends ESSingleNodeTestCase { +public class ValidateMappingRequestPluginIT extends OpenSearchSingleNodeTestCase { static final Map> allowedOrigins = ConcurrentCollections.newConcurrentMap(); public static class TestPlugin extends Plugin implements ActionPlugin { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/refresh/RefreshBlocksIT.java similarity index 66% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/refresh/RefreshBlocksIT.java index 89448576f2f..938d8c09d18 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/refresh/RefreshBlocksIT.java @@ -17,25 +17,23 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.refresh; +package org.opensearch.action.admin.indices.refresh; - -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.refresh.RefreshResponse; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class RefreshBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class RefreshBlocksIT extends OpenSearchIntegTestCase { public void testRefreshWithBlocks() { createIndex("test"); ensureGreen("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/rollover/RolloverIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/rollover/RolloverIT.java index a5e9baf09e6..fb7c77081e3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/rollover/RolloverIT.java @@ -17,33 +17,30 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.rollover; +package org.opensearch.action.admin.indices.rollover; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.ResourceAlreadyExistsException; + +import org.opensearch.ResourceAlreadyExistsException; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.AutoExpandReplicas; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.allocation.AllocationService; -import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.MockLogAppender; -import org.opensearch.action.admin.indices.rollover.Condition; -import org.opensearch.action.admin.indices.rollover.MaxAgeCondition; -import org.opensearch.action.admin.indices.rollover.MaxSizeCondition; -import org.opensearch.action.admin.indices.rollover.RolloverResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.AutoExpandReplicas; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.allocation.AllocationService; +import org.opensearch.common.logging.Loggers; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.MockLogAppender; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -52,8 +49,8 @@ import java.util.Collections; import java.util.List; import java.util.Set; -import static org.elasticsearch.index.mapper.MapperService.SINGLE_MAPPING_NAME; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.index.mapper.MapperService.SINGLE_MAPPING_NAME; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; @@ -64,8 +61,8 @@ import static org.hamcrest.collection.IsEmptyCollection.empty; import static org.hamcrest.core.CombinableMatcher.both; import static org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class RolloverIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class RolloverIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java similarity index 68% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java index 9c3e646d50d..d8b42447330 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java @@ -17,24 +17,23 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.segments; +package org.opensearch.action.admin.indices.segments; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.segments.IndicesSegmentResponse; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class IndicesSegmentsBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class IndicesSegmentsBlocksIT extends OpenSearchIntegTestCase { public void testIndicesSegmentsWithBlocks() { createIndex("test-blocks"); ensureGreen("test-blocks"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java index 5f81bbbae80..1deff85dd93 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java @@ -17,29 +17,28 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.shards; +package org.opensearch.action.admin.indices.shards; import com.carrotsearch.hppc.cursors.IntObjectCursor; import com.carrotsearch.hppc.cursors.ObjectCursor; import org.apache.lucene.index.CorruptIndexException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.common.collect.ImmutableOpenIntMap; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.store.MockFSIndexStore; -import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.common.collect.ImmutableOpenIntMap; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.store.MockFSIndexStore; import java.util.Arrays; import java.util.Collection; @@ -51,15 +50,15 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.function.Predicate; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class IndicesShardStoreRequestIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class IndicesShardStoreRequestIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/stats/IndicesStatsBlocksIT.java similarity index 71% rename from server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/admin/indices/stats/IndicesStatsBlocksIT.java index ee617725e8c..b3b1748375d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/indices/stats/IndicesStatsBlocksIT.java @@ -17,23 +17,22 @@ * under the License. */ -package org.elasticsearch.action.admin.indices.stats; +package org.opensearch.action.admin.indices.stats; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class IndicesStatsBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class IndicesStatsBlocksIT extends OpenSearchIntegTestCase { public void testIndicesStatsWithBlocks() { createIndex("ro"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkIntegrationIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkIntegrationIT.java index d6fbaf807f2..9941ac9eed0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkIntegrationIT.java @@ -17,27 +17,27 @@ * under the License. */ +package org.opensearch.action.bulk; -package org.elasticsearch.action.bulk; - -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; +import org.opensearch.OpenSearchException; +import org.opensearch.Version; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.ingest.PutPipelineRequest; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.action.support.replication.ReplicationRequest; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.ingest.IngestTestPlugin; -import org.elasticsearch.plugins.Plugin; + +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.ingest.PutPipelineRequest; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.action.support.replication.ReplicationRequest; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.ingest.IngestTestPlugin; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -51,9 +51,9 @@ import java.util.concurrent.atomic.AtomicInteger; import static org.opensearch.action.DocWriteResponse.Result.CREATED; import static org.opensearch.action.DocWriteResponse.Result.UPDATED; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.StreamsUtils.copyToStringFromClasspath; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.oneOf; -public class BulkIntegrationIT extends ESIntegTestCase { +public class BulkIntegrationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(IngestTestPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorClusterSettingsIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorClusterSettingsIT.java index e82be77fc14..53890cd5420 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorClusterSettingsIT.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.action.bulk; +package org.opensearch.action.bulk; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class BulkProcessorClusterSettingsIT extends ESIntegTestCase { +public class BulkProcessorClusterSettingsIT extends OpenSearchIntegTestCase { public void testBulkProcessorAutoCreateRestrictions() throws Exception { // See issue #8125 Settings settings = Settings.builder().put("action.auto_create_index", false).build(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorIT.java index 6d770f46fc1..2e6d1643f51 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorIT.java @@ -17,27 +17,27 @@ * under the License. */ -package org.elasticsearch.action.bulk; +package org.opensearch.action.bulk; import com.carrotsearch.randomizedtesting.generators.RandomPicks; -import org.elasticsearch.action.get.MultiGetItemResponse; -import org.elasticsearch.action.get.MultiGetRequestBuilder; -import org.elasticsearch.action.get.MultiGetResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.env.Environment; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.transport.MockTransportClient; +import org.opensearch.action.get.MultiGetItemResponse; +import org.opensearch.action.get.MultiGetRequestBuilder; +import org.opensearch.action.get.MultiGetResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Strings; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.env.Environment; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.transport.MockTransportClient; import java.util.Arrays; import java.util.HashSet; @@ -48,7 +48,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.either; import static org.hamcrest.Matchers.equalTo; @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThanOrEqualTo; -public class BulkProcessorIT extends ESIntegTestCase { +public class BulkProcessorIT extends OpenSearchIntegTestCase { public void testThatBulkProcessorCountIsCorrect() throws Exception { final CountDownLatch latch = new CountDownLatch(1); BulkProcessorTestListener listener = new BulkProcessorTestListener(latch); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorRetryIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorRetryIT.java index 83be4d600bf..007cb58ee58 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkProcessorRetryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkProcessorRetryIT.java @@ -16,16 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.bulk; +package org.opensearch.action.bulk; import org.opensearch.action.admin.indices.refresh.RefreshRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.query.QueryBuilders; + +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.query.QueryBuilders; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.transport.RemoteTransportException; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.transport.RemoteTransportException; import java.util.Collections; import java.util.Iterator; @@ -35,13 +36,13 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2) -public class BulkProcessorRetryIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2) +public class BulkProcessorRetryIT extends OpenSearchIntegTestCase { private static final String INDEX_NAME = "test"; private static final String TYPE_NAME = "type"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkRejectionIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkRejectionIT.java similarity index 82% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkRejectionIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkRejectionIT.java index d2ee9b54f4a..60771fb1a8a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkRejectionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkRejectionIT.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.bulk; +package org.opensearch.action.bulk; import org.opensearch.action.ActionFuture; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.EsRejectedExecutionException; +import org.opensearch.index.IndexService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 2) -public class BulkRejectionIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 2) +public class BulkRejectionIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkWithUpdatesIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkWithUpdatesIT.java index 60476667a22..a90ea296a7a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/bulk/BulkWithUpdatesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/bulk/BulkWithUpdatesIT.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.action.bulk; +package org.opensearch.action.bulk; import org.opensearch.action.DocWriteRequest.OpType; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.delete.DeleteRequest; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.action.update.UpdateRequest; -import org.elasticsearch.action.update.UpdateRequestBuilder; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.indices.IndexClosedException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptException; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.delete.DeleteRequest; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.action.update.UpdateRequest; +import org.opensearch.action.update.UpdateRequestBuilder; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.VersionType; +import org.opensearch.indices.IndexClosedException; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptException; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.util.ArrayList; import java.util.Arrays; @@ -55,10 +55,10 @@ import java.util.Map; import java.util.concurrent.CyclicBarrier; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.arrayWithSize; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -66,7 +66,7 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; -public class BulkWithUpdatesIT extends ESIntegTestCase { +public class BulkWithUpdatesIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java b/server/src/internalClusterTest/java/org/opensearch/action/ingest/AsyncIngestProcessorIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/ingest/AsyncIngestProcessorIT.java index a6ffab9c284..7542f23a5ed 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/ingest/AsyncIngestProcessorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/ingest/AsyncIngestProcessorIT.java @@ -16,33 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.action.ingest; +package org.opensearch.action.ingest; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.get.GetRequest; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.ingest.AbstractProcessor; -import org.elasticsearch.ingest.IngestDocument; -import org.elasticsearch.ingest.Processor; -import org.elasticsearch.plugins.IngestPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.get.GetRequest; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.ingest.AbstractProcessor; +import org.opensearch.ingest.IngestDocument; +import org.opensearch.ingest.Processor; +import org.opensearch.plugins.IngestPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.script.ScriptService; +import org.opensearch.test.OpenSearchSingleNodeTestCase; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.watcher.ResourceWatcherService; import java.util.Collection; import java.util.Collections; @@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.equalTo; * executes asynchronously. The result of the operation should be the same and also the order in which the * bulk responses are returned should be the same as how the corresponding index requests were defined. */ -public class AsyncIngestProcessorIT extends ESSingleNodeTestCase { +public class AsyncIngestProcessorIT extends OpenSearchSingleNodeTestCase { @Override protected Collection> getPlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java b/server/src/internalClusterTest/java/org/opensearch/action/search/SearchProgressActionListenerIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/search/SearchProgressActionListenerIT.java index 13c05450c67..5f069deea75 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/search/SearchProgressActionListenerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/search/SearchProgressActionListenerIT.java @@ -17,21 +17,22 @@ * under the License. */ -package org.elasticsearch.action.search; +package org.opensearch.action.search; import org.apache.lucene.search.TotalHits; import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchShardTarget; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.InternalAggregations; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.test.ESSingleNodeTestCase; + +import org.opensearch.client.Client; +import org.opensearch.client.node.NodeClient; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchShardTarget; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.InternalAggregations; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.sort.FieldSortBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.tasks.TaskId; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import java.util.ArrayList; import java.util.Arrays; @@ -45,11 +46,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThan; -public class SearchProgressActionListenerIT extends ESSingleNodeTestCase { +public class SearchProgressActionListenerIT extends OpenSearchSingleNodeTestCase { private List shards; public void setUp() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/action/search/TransportSearchIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/search/TransportSearchIT.java index c8c7eddbd84..7ba1ab9cf77 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/search/TransportSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/search/TransportSearchIT.java @@ -17,60 +17,61 @@ * under the License. */ -package org.elasticsearch.action.search; +package org.opensearch.action.search; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.CollectionTerminatedException; import org.apache.lucene.search.ScoreMode; -import org.elasticsearch.ExceptionsHelper; + +import org.opensearch.ExceptionsHelper; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.AtomicArray; -import org.elasticsearch.common.xcontent.ObjectParser; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.QueryShardContext; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.SearchPlugin; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Strings; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.AtomicArray; +import org.opensearch.common.xcontent.ObjectParser; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.QueryShardContext; +import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.SearchPlugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.DocValueFormat; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.aggregations.AbstractAggregationBuilder; -import org.elasticsearch.search.aggregations.AggregationBuilder; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.Aggregator; -import org.elasticsearch.search.aggregations.AggregatorBase; -import org.elasticsearch.search.aggregations.AggregatorFactories; -import org.elasticsearch.search.aggregations.AggregatorFactory; -import org.elasticsearch.search.aggregations.CardinalityUpperBound; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.LeafBucketCollector; -import org.elasticsearch.search.aggregations.bucket.terms.LongTerms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.InternalMax; -import org.elasticsearch.search.aggregations.support.ValueType; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.fetch.FetchSubPhase; -import org.elasticsearch.search.fetch.FetchSubPhaseProcessor; -import org.elasticsearch.search.internal.SearchContext; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.DocValueFormat; +import org.opensearch.search.SearchHit; +import org.opensearch.search.aggregations.AbstractAggregationBuilder; +import org.opensearch.search.aggregations.AggregationBuilder; +import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.search.aggregations.Aggregator; +import org.opensearch.search.aggregations.AggregatorBase; +import org.opensearch.search.aggregations.AggregatorFactories; +import org.opensearch.search.aggregations.AggregatorFactory; +import org.opensearch.search.aggregations.CardinalityUpperBound; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.LeafBucketCollector; +import org.opensearch.search.aggregations.bucket.terms.LongTerms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; +import org.opensearch.search.aggregations.metrics.InternalMax; +import org.opensearch.search.aggregations.support.ValueType; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.fetch.FetchSubPhase; +import org.opensearch.search.fetch.FetchSubPhaseProcessor; +import org.opensearch.search.internal.SearchContext; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Collection; @@ -79,11 +80,11 @@ import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class TransportSearchIT extends ESIntegTestCase { +public class TransportSearchIT extends OpenSearchIntegTestCase { public static class TestPlugin extends Plugin implements SearchPlugin { @Override public List getAggregations() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java b/server/src/internalClusterTest/java/org/opensearch/action/support/ActiveShardsObserverIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/support/ActiveShardsObserverIT.java index 37a75858147..7863894d9d7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/support/ActiveShardsObserverIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/support/ActiveShardsObserverIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.action.support; +package org.opensearch.action.support; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.indices.create.CreateIndexResponse; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; /** * Tests that the index creation operation waits for the appropriate * number of active shards to be started before returning. */ -public class ActiveShardsObserverIT extends ESIntegTestCase { +public class ActiveShardsObserverIT extends OpenSearchIntegTestCase { public void testCreateIndexNoActiveShardsTimesOut() throws Exception { Settings.Builder settingsBuilder = Settings.builder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java b/server/src/internalClusterTest/java/org/opensearch/action/support/WaitActiveShardCountIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/support/WaitActiveShardCountIT.java index e7b06dd0648..1cdda4ef982 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/support/WaitActiveShardCountIT.java @@ -17,28 +17,29 @@ * under the License. */ -package org.elasticsearch.action.support; +package org.opensearch.action.support; import org.opensearch.action.UnavailableShardsException; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import static org.elasticsearch.common.unit.TimeValue.timeValueMillis; -import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.rest.RestStatus; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.common.unit.TimeValue.timeValueMillis; +import static org.opensearch.common.unit.TimeValue.timeValueSeconds; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.startsWith; /** * Tests setting the active shard count for replication operations (e.g. index) operates correctly. */ -public class WaitActiveShardCountIT extends ESIntegTestCase { +public class WaitActiveShardCountIT extends OpenSearchIntegTestCase { public void testReplicationWaitsForActiveShardCount() throws Exception { CreateIndexResponse createIndexResponse = prepareCreate("test", 1, Settings.builder().put("index.number_of_shards", 1).put("index.number_of_replicas", 2)).get(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java b/server/src/internalClusterTest/java/org/opensearch/action/support/master/IndexingMasterFailoverIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/support/master/IndexingMasterFailoverIT.java index d165b8f63f0..a61730d8bf0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/support/master/IndexingMasterFailoverIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/support/master/IndexingMasterFailoverIT.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.action.support.master; +package org.opensearch.action.support.master; import org.opensearch.action.DocWriteResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.transport.MockTransportService; import java.util.Collection; import java.util.HashSet; @@ -34,8 +34,8 @@ import java.util.concurrent.CyclicBarrier; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class IndexingMasterFailoverIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) +public class IndexingMasterFailoverIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java b/server/src/internalClusterTest/java/org/opensearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java index 8b27763bc57..3a329a25b88 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/support/replication/TransportReplicationActionRetryOnClosedNodeIT.java @@ -17,39 +17,40 @@ * under the License. */ -package org.elasticsearch.action.support.replication; +package org.opensearch.action.support.replication; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionResponse; import org.opensearch.action.ActionType; -import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.cluster.action.shard.ShardStateAction; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.NetworkPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportInterceptor; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportResponse; -import org.elasticsearch.transport.TransportResponseHandler; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.cluster.action.shard.ShardStateAction; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.ActionPlugin; +import org.opensearch.plugins.NetworkPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportInterceptor; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportResponse; +import org.opensearch.transport.TransportResponseHandler; +import org.opensearch.transport.TransportService; + import org.hamcrest.Matchers; import java.io.IOException; @@ -60,11 +61,11 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class TransportReplicationActionRetryOnClosedNodeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class TransportReplicationActionRetryOnClosedNodeIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/termvectors/GetTermVectorsIT.java similarity index 98% rename from server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/termvectors/GetTermVectorsIT.java index 51f01fb4296..969ba87d79b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/termvectors/GetTermVectorsIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.action.termvectors; +package org.opensearch.action.termvectors; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.DirectoryReader; @@ -29,15 +29,15 @@ import org.apache.lucene.util.BytesRef; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.MockKeywordPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.common.Strings; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.MockKeywordPlugin; import java.io.IOException; import java.util.ArrayList; @@ -52,9 +52,9 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.stream.Collectors; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/termvectors/MultiTermVectorsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java rename to server/src/internalClusterTest/java/org/opensearch/action/termvectors/MultiTermVectorsIT.java index ad209545a33..e9572fa68a5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/termvectors/MultiTermVectorsIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.action.termvectors; +package org.opensearch.action.termvectors; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.Fields; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.engine.VersionConflictEngineException; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.engine.VersionConflictEngineException; import java.io.IOException; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.notNullValue; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java b/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java rename to server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java index 8466b11cbcc..eede37a67f2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/aliases/IndexAliasesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/aliases/IndexAliasesIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.aliases; +package org.opensearch.aliases; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.opensearch.action.admin.indices.alias.Alias; @@ -25,32 +25,32 @@ import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActi import org.opensearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.AliasMetadata; -import org.elasticsearch.cluster.metadata.IndexAbstraction; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.StopWatch; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.TermQueryBuilder; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.AliasMetadata; +import org.opensearch.cluster.metadata.IndexAbstraction; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.StopWatch; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.TermQueryBuilder; import org.opensearch.rest.action.admin.indices.AliasesNotFoundException; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.HashMap; @@ -64,22 +64,22 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.client.Requests.createIndexRequest; -import static org.elasticsearch.client.Requests.deleteRequest; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_READ_ONLY_BLOCK; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.CollectionAssertions.hasKey; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.client.Requests.createIndexRequest; +import static org.opensearch.client.Requests.deleteRequest; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_READ_ONLY_BLOCK; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.index.query.QueryBuilders.rangeQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.CollectionAssertions.hasKey; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.emptyArray; @@ -88,7 +88,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class IndexAliasesIT extends ESIntegTestCase { +public class IndexAliasesIT extends OpenSearchIntegTestCase { public void testAliases() throws Exception { logger.info("--> creating index [test]"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/blocks/SimpleBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/blocks/SimpleBlocksIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/blocks/SimpleBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/blocks/SimpleBlocksIT.java index 28b384a33ed..387761e44f6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/blocks/SimpleBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/blocks/SimpleBlocksIT.java @@ -17,28 +17,29 @@ * under the License. */ -package org.elasticsearch.blocks; +package org.opensearch.blocks; -import org.elasticsearch.ExceptionsHelper; +import org.opensearch.ExceptionsHelper; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsResponse; import org.opensearch.action.admin.indices.readonly.AddIndexBlockRequestBuilder; import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.IndexMetadata.APIBlock; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.IndexMetadata.APIBlock; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Arrays; @@ -51,13 +52,13 @@ import java.util.stream.IntStream; import static java.util.Collections.emptySet; import static java.util.stream.Collectors.toList; -import static org.elasticsearch.action.support.IndicesOptions.lenientExpandOpen; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.action.support.IndicesOptions.lenientExpandOpen; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -65,8 +66,8 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class SimpleBlocksIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class SimpleBlocksIT extends OpenSearchIntegTestCase { public void testVerifyIndexAndClusterReadOnly() throws Exception { // cluster.read_only = null: write and metadata not blocked canCreateIndex("test1"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/broadcast/BroadcastActionsIT.java b/server/src/internalClusterTest/java/org/opensearch/broadcast/BroadcastActionsIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/broadcast/BroadcastActionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/broadcast/BroadcastActionsIT.java index ab9ac6075cf..3b0ef328887 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/broadcast/BroadcastActionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/broadcast/BroadcastActionsIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.broadcast; +package org.opensearch.broadcast; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class BroadcastActionsIT extends ESIntegTestCase { +public class BroadcastActionsIT extends OpenSearchIntegTestCase { @Override protected int maximumNumberOfReplicas() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java b/server/src/internalClusterTest/java/org/opensearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java rename to server/src/internalClusterTest/java/org/opensearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java index 5d97855229d..ebeafe5b8c9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.bwcompat; +package org.opensearch.bwcompat; import java.io.IOException; import java.io.InputStream; @@ -28,18 +28,18 @@ import java.util.List; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.TestUtil; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.gateway.CorruptStateException; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.gateway.CorruptStateException; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.containsString; @LuceneTestCase.SuppressCodecs("*") -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0) -public class RecoveryWithUnsupportedIndicesIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0) +public class RecoveryWithUnsupportedIndicesIT extends OpenSearchIntegTestCase { /** * Return settings that could be used to start a node that has the given zipped home directory. diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java b/server/src/internalClusterTest/java/org/opensearch/client/documentation/IndicesDocumentationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java rename to server/src/internalClusterTest/java/org/opensearch/client/documentation/IndicesDocumentationIT.java index a8797ed739d..c7929b877ee 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/client/documentation/IndicesDocumentationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/client/documentation/IndicesDocumentationIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.client.documentation; +package org.opensearch.client.documentation; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; import static java.util.Collections.singletonMap; import static org.hamcrest.Matchers.instanceOf; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.instanceOf; * include-tagged::{client-tests}/IndicesDocumentationIT.java[your-example-tag-here] * -------------------------------------------------- */ -public class IndicesDocumentationIT extends ESIntegTestCase { +public class IndicesDocumentationIT extends OpenSearchIntegTestCase { /** * This test method is used to generate the Put Mapping Java Indices API documentation diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/node/NodeClientIT.java b/server/src/internalClusterTest/java/org/opensearch/client/node/NodeClientIT.java similarity index 78% rename from server/src/internalClusterTest/java/org/elasticsearch/client/node/NodeClientIT.java rename to server/src/internalClusterTest/java/org/opensearch/client/node/NodeClientIT.java index 1cae3a15deb..d43d5e8d86e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/client/node/NodeClientIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/client/node/NodeClientIT.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.node; +package org.opensearch.client.node; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.client.Client; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.SUITE) -public class NodeClientIT extends ESIntegTestCase { +public class NodeClientIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(Client.CLIENT_TYPE_SETTING_S.getKey(), "anything").build(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/NodeDisconnectIT.java b/server/src/internalClusterTest/java/org/opensearch/client/transport/NodeDisconnectIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/client/transport/NodeDisconnectIT.java rename to server/src/internalClusterTest/java/org/opensearch/client/transport/NodeDisconnectIT.java index 6fa1848cc84..e3012b3592f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/NodeDisconnectIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/client/transport/NodeDisconnectIT.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.transport.MockTransportClient; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.transport.MockTransportClient; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Collections; @@ -33,10 +33,10 @@ import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; -import static org.elasticsearch.client.transport.TransportClient.CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL; +import static org.opensearch.client.transport.TransportClient.CLIENT_TRANSPORT_NODES_SAMPLER_INTERVAL; @ClusterScope(scope = Scope.TEST) -public class NodeDisconnectIT extends ESIntegTestCase { +public class NodeDisconnectIT extends OpenSearchIntegTestCase { public void testNotifyOnDisconnect() throws IOException { internalCluster().ensureAtLeastNumDataNodes(2); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientIT.java b/server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientIT.java rename to server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientIT.java index f7845cf5161..d7c834634fd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientIT.java @@ -17,37 +17,37 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; -import org.elasticsearch.Version; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.coordination.ClusterBootstrapService; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.env.Environment; -import org.elasticsearch.node.MockNode; -import org.elasticsearch.node.Node; -import org.elasticsearch.node.NodeValidationException; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.MockHttpTransport; -import org.elasticsearch.transport.MockTransportClient; -import org.elasticsearch.transport.TransportService; +import org.opensearch.Version; +import org.opensearch.client.Client; +import org.opensearch.cluster.coordination.ClusterBootstrapService; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.network.NetworkModule; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.env.Environment; +import org.opensearch.node.MockNode; +import org.opensearch.node.Node; +import org.opensearch.node.NodeValidationException; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.MockHttpTransport; +import org.opensearch.transport.MockTransportClient; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Arrays; -import static org.elasticsearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonDataNode; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.startsWith; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 1.0) -public class TransportClientIT extends ESIntegTestCase { +public class TransportClientIT extends OpenSearchIntegTestCase { public void testPickingUpChangesInDiscoveryNode() { String nodeName = internalCluster().startNode(nonDataNode()); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientRetryIT.java b/server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientRetryIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientRetryIT.java rename to server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientRetryIT.java index d9fae8e20a3..77bf2595f1c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/client/transport/TransportClientRetryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/client/transport/TransportClientRetryIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.client.transport; +package org.opensearch.client.transport; import org.opensearch.action.admin.cluster.state.ClusterStateRequest; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterName; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.transport.TransportAddress; -import org.elasticsearch.env.Environment; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.transport.MockTransportClient; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterName; +import org.opensearch.cluster.ClusterState; +import org.opensearch.common.network.NetworkModule; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.transport.TransportAddress; +import org.opensearch.env.Environment; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.transport.MockTransportClient; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.concurrent.ExecutionException; @@ -41,7 +41,7 @@ import java.util.concurrent.ExecutionException; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ClusterScope(scope = Scope.TEST, numClientNodes = 0, supportsDedicatedMasters = false) -public class TransportClientRetryIT extends ESIntegTestCase { +public class TransportClientRetryIT extends OpenSearchIntegTestCase { public void testRetry() throws IOException, ExecutionException, InterruptedException { Iterable instances = internalCluster().getInstances(TransportService.class); TransportAddress[] addresses = new TransportAddress[internalCluster().size()]; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterHealthIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/ClusterHealthIT.java index a63172e5a78..f0c60edc725 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterHealthIT.java @@ -17,33 +17,33 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class ClusterHealthIT extends ESIntegTestCase { +public class ClusterHealthIT extends OpenSearchIntegTestCase { public void testSimpleLocalHealth() { createIndex("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java index 8e8c5e5772c..d6672cdbdee 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java @@ -17,38 +17,39 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import com.carrotsearch.hppc.cursors.ObjectCursor; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.admin.cluster.node.stats.NodesStatsAction; import org.opensearch.action.admin.indices.stats.IndicesStatsAction; -import org.elasticsearch.action.support.ActionFilter; -import org.elasticsearch.action.support.ActionFilters; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.store.Store; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.SystemIndexDescriptor; -import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.SystemIndexPlugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.ActionFilter; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.RoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Strings; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.IndexService; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.store.Store; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.SystemIndexDescriptor; +import org.opensearch.plugins.ActionPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.SystemIndexPlugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; + import org.hamcrest.Matchers; import java.util.Arrays; @@ -62,8 +63,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import static java.util.Collections.emptySet; import static java.util.Collections.singletonList; import static java.util.Collections.unmodifiableSet; -import static org.elasticsearch.common.util.set.Sets.newHashSet; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.util.set.Sets.newHashSet; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -71,8 +72,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; /** * Integration tests for the ClusterInfoService collecting information */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class ClusterInfoServiceIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class ClusterInfoServiceIT extends OpenSearchIntegTestCase { private static final String TEST_SYSTEM_INDEX_NAME = ".test-cluster-info-system-index"; @@ -96,7 +97,7 @@ public class ClusterInfoServiceIT extends ESIntegTestCase { } } - public static class BlockingActionFilter extends org.elasticsearch.action.support.ActionFilter.Simple { + public static class BlockingActionFilter extends org.opensearch.action.support.ActionFilter.Simple { private Set blockedActions = emptySet(); @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateDiffIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateDiffIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateDiffIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateDiffIT.java index d8d856f6ac3..fdeabef2eb4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateDiffIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateDiffIT.java @@ -17,48 +17,48 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import com.carrotsearch.hppc.cursors.ObjectCursor; -import org.elasticsearch.cluster.block.ClusterBlock; -import org.elasticsearch.cluster.block.ClusterBlocks; -import org.elasticsearch.cluster.coordination.CoordinationMetadata; -import org.elasticsearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion; -import org.elasticsearch.cluster.coordination.NoMasterBlockService; -import org.elasticsearch.cluster.metadata.AliasMetadata; -import org.elasticsearch.cluster.metadata.IndexGraveyard; -import org.elasticsearch.cluster.metadata.IndexGraveyardTests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.IndexTemplateMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.metadata.RepositoriesMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.gateway.GatewayService; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.snapshots.Snapshot; -import org.elasticsearch.snapshots.SnapshotId; -import org.elasticsearch.snapshots.SnapshotInfoTests; -import org.elasticsearch.snapshots.SnapshotsInProgressSerializationTests; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.block.ClusterBlock; +import org.opensearch.cluster.block.ClusterBlocks; +import org.opensearch.cluster.coordination.CoordinationMetadata; +import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion; +import org.opensearch.cluster.coordination.NoMasterBlockService; +import org.opensearch.cluster.metadata.AliasMetadata; +import org.opensearch.cluster.metadata.IndexGraveyard; +import org.opensearch.cluster.metadata.IndexGraveyardTests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.IndexTemplateMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.metadata.RepositoriesMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.routing.IndexRoutingTable; +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.opensearch.cluster.routing.TestShardRouting; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.common.UUIDs; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.io.stream.BytesStreamOutput; +import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.set.Sets; +import org.opensearch.gateway.GatewayService; +import org.opensearch.index.Index; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.shard.ShardId; +import org.opensearch.snapshots.Snapshot; +import org.opensearch.snapshots.SnapshotId; +import org.opensearch.snapshots.SnapshotInfoTests; +import org.opensearch.snapshots.SnapshotsInProgressSerializationTests; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collections; import java.util.List; @@ -67,18 +67,18 @@ import java.util.Set; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; -import static org.elasticsearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder; -import static org.elasticsearch.cluster.routing.RandomShardRoutingMutator.randomChange; -import static org.elasticsearch.cluster.routing.RandomShardRoutingMutator.randomReason; -import static org.elasticsearch.test.VersionUtils.randomVersion; -import static org.elasticsearch.test.XContentTestUtils.convertToMap; -import static org.elasticsearch.test.XContentTestUtils.differenceBetweenMapsIgnoringArrayOrder; +import static org.opensearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder; +import static org.opensearch.cluster.routing.RandomShardRoutingMutator.randomChange; +import static org.opensearch.cluster.routing.RandomShardRoutingMutator.randomReason; +import static org.opensearch.test.VersionUtils.randomVersion; +import static org.opensearch.test.XContentTestUtils.convertToMap; +import static org.opensearch.test.XContentTestUtils.differenceBetweenMapsIgnoringArrayOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0, numClientNodes = 0) -public class ClusterStateDiffIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 0, numClientNodes = 0) +public class ClusterStateDiffIT extends OpenSearchIntegTestCase { public void testClusterStateDiffSerialization() throws Exception { NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(ClusterModule.getNamedWriteables()); DiscoveryNode masterNode = randomNode("master"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateIT.java index 0d070cb15e2..3861ee90699 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/ClusterStateIT.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexGraveyard; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexGraveyard; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.CheckedFunction; +import org.opensearch.common.ParseField; +import org.opensearch.common.Priority; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.script.ScriptService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.watcher.ResourceWatcherService; import java.io.IOException; import java.util.ArrayList; @@ -59,8 +59,8 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; -import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; -import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST; +import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; +import static org.opensearch.test.OpenSearchIntegTestCase.Scope.TEST; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.Matchers.hasItem; @@ -72,8 +72,8 @@ import static org.hamcrest.Matchers.instanceOf; * check that the client can de-serialize a cluster state response based on the fact that the response should not contain customs that the * transport client does not understand based on the fact that it only presents the node-and-transport-client-feature. */ -@ESIntegTestCase.ClusterScope(scope = TEST) -public class ClusterStateIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = TEST) +public class ClusterStateIT extends OpenSearchIntegTestCase { public abstract static class Custom implements Metadata.Custom { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java index 435069847eb..aaa92fec6ad 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/MinimumMasterNodesIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsRequest; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.coordination.FailedToCommitClusterStateException; -import org.elasticsearch.cluster.coordination.NoMasterBlockService; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.client.Client; +import org.opensearch.cluster.coordination.FailedToCommitClusterStateException; +import org.opensearch.cluster.coordination.NoMasterBlockService; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.set.Sets; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.transport.MockTransportService; import java.util.ArrayList; import java.util.Arrays; @@ -52,8 +52,8 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.not; @@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class MinimumMasterNodesIT extends ESIntegTestCase { +public class MinimumMasterNodesIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/NoMasterNodeIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/NoMasterNodeIT.java index 7e163cf05f6..31f9be4838b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/NoMasterNodeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/NoMasterNodeIT.java @@ -17,37 +17,37 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.AutoCreateIndex; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.action.index.MappingUpdatedAction; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.coordination.NoMasterBlockService; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.discovery.MasterNotDiscoveredException; -import org.elasticsearch.plugins.Plugin; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.AutoCreateIndex; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.action.index.MappingUpdatedAction; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.coordination.NoMasterBlockService; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.discovery.MasterNotDiscoveredException; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption.IsolateAllNodes; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.NetworkDisruption.IsolateAllNodes; +import org.opensearch.test.transport.MockTransportService; import java.util.Collection; import java.util.Collections; @@ -55,14 +55,14 @@ import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertExists; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertExists; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class NoMasterNodeIT extends ESIntegTestCase { +public class NoMasterNodeIT extends OpenSearchIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/SimpleClusterStateIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/SimpleClusterStateIT.java index 92b60272e0d..ef281d57360 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/SimpleClusterStateIT.java @@ -17,44 +17,45 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.plugins.ClusterPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.CollectionAssertions; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.routing.RoutingTable; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.UUIDs; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.plugins.ClusterPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.script.ScriptService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.CollectionAssertions; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.watcher.ResourceWatcherService; + import org.junit.Before; import java.io.IOException; @@ -65,9 +66,9 @@ import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Supplier; -import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateExists; +import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateExists; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -77,7 +78,7 @@ import static org.hamcrest.Matchers.is; * Checking simple filtering capabilities of the cluster state * */ -public class SimpleClusterStateIT extends ESIntegTestCase { +public class SimpleClusterStateIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleDataNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/SimpleDataNodesIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleDataNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/SimpleDataNodesIT.java index d86f8c347b4..67c13d2daa5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleDataNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/SimpleDataNodesIT.java @@ -17,30 +17,31 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.UnavailableShardsException; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.client.Requests; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; + +import static org.opensearch.client.Requests.createIndexRequest; +import static org.opensearch.common.unit.TimeValue.timeValueSeconds; +import static org.opensearch.test.NodeRoles.dataNode; +import static org.opensearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.client.Requests.createIndexRequest; -import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds; -import static org.elasticsearch.test.NodeRoles.dataNode; -import static org.elasticsearch.test.NodeRoles.nonDataNode; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class SimpleDataNodesIT extends ESIntegTestCase { +public class SimpleDataNodesIT extends OpenSearchIntegTestCase { private static final String SOURCE = "{\"type1\":{\"id\":\"1\",\"name\":\"test\"}}"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java index a2f595fd075..e9edf08d787 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/SpecificMasterNodesIT.java @@ -17,31 +17,31 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.apache.lucene.search.join.ScoreMode; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.discovery.MasterNotDiscoveredException; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.discovery.MasterNotDiscoveredException; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; import java.io.IOException; -import static org.elasticsearch.test.NodeRoles.dataOnlyNode; -import static org.elasticsearch.test.NodeRoles.masterNode; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.NodeRoles.dataOnlyNode; +import static org.opensearch.test.NodeRoles.masterNode; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class SpecificMasterNodesIT extends ESIntegTestCase { +public class SpecificMasterNodesIT extends OpenSearchIntegTestCase { public void testSimpleOnlyMasterNodeElection() throws IOException { internalCluster().setBootstrapMasterNodeIndex(0); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/UpdateSettingsValidationIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/UpdateSettingsValidationIT.java index 7fce9ce2312..b45f8634620 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/UpdateSettingsValidationIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.cluster; +package org.opensearch.cluster; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonMasterNode; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class UpdateSettingsValidationIT extends ESIntegTestCase { +public class UpdateSettingsValidationIT extends OpenSearchIntegTestCase { public void testUpdateSettingsValidation() throws Exception { internalCluster().startNodes(nonDataNode(), nonMasterNode(), nonMasterNode()); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/action/shard/ShardStateActionIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/action/shard/ShardStateActionIT.java index 826a8da5832..a398ae4c811 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/action/shard/ShardStateActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/action/shard/ShardStateActionIT.java @@ -16,31 +16,32 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.action.shard; + +package org.opensearch.cluster.action.shard; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateUpdateTask; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; import java.util.Collection; import java.util.Collections; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class ShardStateActionIT extends ESIntegTestCase { +public class ShardStateActionIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/AwarenessAllocationIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/allocation/AwarenessAllocationIT.java index 6d071a6f60c..9891e1c855d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/AwarenessAllocationIT.java @@ -17,36 +17,36 @@ * under the License. */ -package org.elasticsearch.cluster.allocation; +package org.opensearch.cluster.allocation; import com.carrotsearch.hppc.ObjectIntHashMap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.IndexMetadata.State; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.IndexMetadata.State; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.decider.AwarenessAllocationDecider; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; -@ClusterScope(scope= ESIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2) -public class AwarenessAllocationIT extends ESIntegTestCase { +@ClusterScope(scope= OpenSearchIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2) +public class AwarenessAllocationIT extends OpenSearchIntegTestCase { private final Logger logger = LogManager.getLogger(AwarenessAllocationIT.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/ClusterRerouteIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/allocation/ClusterRerouteIT.java index 157419e2356..d8a357d390f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/ClusterRerouteIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cluster.allocation; +package org.opensearch.cluster.allocation; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; @@ -26,51 +26,51 @@ import org.apache.lucene.util.LuceneTestCase; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse; import org.opensearch.action.admin.cluster.reroute.TransportClusterRerouteAction; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.allocation.RerouteExplanation; -import org.elasticsearch.cluster.routing.allocation.RoutingExplanations; -import org.elasticsearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.command.AllocationCommand; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.decider.Decision; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation; -import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.io.FileSystemUtils; -import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.MockLogAppender; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.allocation.RerouteExplanation; +import org.opensearch.cluster.routing.allocation.RoutingExplanations; +import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; +import org.opensearch.cluster.routing.allocation.command.AllocationCommand; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.cluster.routing.allocation.decider.Decision; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation; +import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; +import org.opensearch.common.Priority; +import org.opensearch.common.io.FileSystemUtils; +import org.opensearch.common.logging.Loggers; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.Index; +import org.opensearch.index.shard.ShardId; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.MockLogAppender; import java.nio.file.Path; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -78,7 +78,7 @@ import static org.hamcrest.Matchers.hasSize; // testDelayWithALargeAmountOfShards does a lot of cluster state updates, and WindowsFS slows it down too much (#52000) @LuceneTestCase.SuppressFileSystems(value = "WindowsFS") @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ClusterRerouteIT extends ESIntegTestCase { +public class ClusterRerouteIT extends OpenSearchIntegTestCase { private final Logger logger = LogManager.getLogger(ClusterRerouteIT.class); public void testRerouteWithCommands_disableAllocationSettings() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/FilteringAllocationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/allocation/FilteringAllocationIT.java index 81fceea93d9..377d4f7fb86 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/FilteringAllocationIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.cluster.allocation; +package org.opensearch.cluster.allocation; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.AutoExpandReplicas; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider; -import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.AutoExpandReplicas; +import org.opensearch.cluster.metadata.IndexMetadata; +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.allocation.decider.FilterAllocationDecider; +import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class FilteringAllocationIT extends ESIntegTestCase { +public class FilteringAllocationIT extends OpenSearchIntegTestCase { public void testDecommissionNodeNoReplicas() { logger.info("--> starting 2 nodes"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/SimpleAllocationIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/allocation/SimpleAllocationIT.java index dbf426c6a08..7e84339ba55 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/allocation/SimpleAllocationIT.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.allocation; +package org.opensearch.cluster.allocation; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.RoutingNode; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.RoutingNode; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class SimpleAllocationIT extends ESIntegTestCase { +public class SimpleAllocationIT extends OpenSearchIntegTestCase { @Override protected int numberOfShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RareClusterStateIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RareClusterStateIT.java index 019ef0c19b6..b8a887c24b0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RareClusterStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RareClusterStateIT.java @@ -17,40 +17,41 @@ * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; + +import org.opensearch.OpenSearchParseException; +import org.opensearch.Version; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.Version; import org.opensearch.action.ActionFuture; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.ActionResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.block.ClusterBlocks; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.AllocationService; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.discovery.Discovery; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.mapper.DocumentMapper; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.BlockClusterStateProcessing; -import org.elasticsearch.transport.TransportSettings; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateUpdateTask; +import org.opensearch.cluster.block.ClusterBlocks; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.routing.RoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.AllocationService; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.discovery.Discovery; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.mapper.DocumentMapper; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.BlockClusterStateProcessing; +import org.opensearch.transport.TransportSettings; import java.util.List; import java.util.Map; @@ -59,15 +60,17 @@ import java.util.concurrent.TimeUnit; import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; import static org.opensearch.action.DocWriteResponse.Result.CREATED; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; + import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0) -public class RareClusterStateIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0) +public class RareClusterStateIT extends OpenSearchIntegTestCase { @Override protected int numberOfShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveCustomsCommandIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveCustomsCommandIT.java index e713f4ed211..6289a8ddffd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveCustomsCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveCustomsCommandIT.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import joptsimple.OptionSet; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cli.UserException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cli.UserException; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.Environment; +import org.opensearch.env.TestEnvironment; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.containsString; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class RemoveCustomsCommandIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) +public class RemoveCustomsCommandIT extends OpenSearchIntegTestCase { public void testRemoveCustomsAbortedByUser() throws Exception { internalCluster().setBootstrapMasterNodeIndex(0); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveSettingsCommandIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveSettingsCommandIT.java index 7d4fd04f71c..bc6a213f667 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/RemoveSettingsCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/RemoveSettingsCommandIT.java @@ -16,24 +16,24 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import joptsimple.OptionSet; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cli.UserException; -import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cli.UserException; +import org.opensearch.cluster.routing.allocation.DiskThresholdSettings; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.Environment; +import org.opensearch.env.TestEnvironment; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class RemoveSettingsCommandIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) +public class RemoveSettingsCommandIT extends OpenSearchIntegTestCase { public void testRemoveSettingsAbortedByUser() throws Exception { internalCluster().setBootstrapMasterNodeIndex(0); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java index fba1cf6710a..d51ac794626 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/UnsafeBootstrapAndDetachCommandIT.java @@ -16,43 +16,44 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; import joptsimple.OptionSet; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.DiscoverySettings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.gateway.GatewayMetaState; -import org.elasticsearch.gateway.PersistedClusterStateService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.DiscoverySettings; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.env.TestEnvironment; +import org.opensearch.gateway.GatewayMetaState; +import org.opensearch.gateway.PersistedClusterStateService; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Locale; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; +import static org.opensearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class UnsafeBootstrapAndDetachCommandIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) +public class UnsafeBootstrapAndDetachCommandIT extends OpenSearchIntegTestCase { private MockTerminal executeCommand(OpenSearchNodeCommand command, Environment environment, int nodeOrdinal, boolean abort) throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/VotingConfigurationIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/VotingConfigurationIT.java index af08a4c088c..298e731a5d1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/VotingConfigurationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/VotingConfigurationIT.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.Priority; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.Priority; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.Collection; import java.util.Collections; @@ -40,8 +40,8 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class VotingConfigurationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) +public class VotingConfigurationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/Zen1IT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/Zen1IT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/Zen1IT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/Zen1IT.java index 848e5a59fbd..28987f6b296 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/Zen1IT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/Zen1IT.java @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.coordination; + +package org.opensearch.cluster.coordination; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; @@ -26,27 +27,27 @@ import org.opensearch.action.admin.cluster.health.ClusterHealthRequest; import org.opensearch.action.admin.cluster.health.ClusterHealthRequestBuilder; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.create.CreateIndexRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Manifest; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.discovery.Discovery; -import org.elasticsearch.discovery.DiscoveryModule; -import org.elasticsearch.discovery.zen.ElectMasterService; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.gateway.MetaStateService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster.RestartCallback; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Manifest; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Allocation; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.discovery.Discovery; +import org.opensearch.discovery.DiscoveryModule; +import org.opensearch.discovery.zen.ElectMasterService; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.gateway.MetaStateService; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster.RestartCallback; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.Collection; import java.util.Collections; @@ -56,22 +57,22 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.StreamSupport; -import static org.elasticsearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; -import static org.elasticsearch.cluster.coordination.Coordinator.ZEN1_BWC_TERM; -import static org.elasticsearch.cluster.coordination.FollowersChecker.FOLLOWER_CHECK_ACTION_NAME; -import static org.elasticsearch.cluster.coordination.JoinHelper.START_JOIN_ACTION_NAME; -import static org.elasticsearch.cluster.coordination.PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME; -import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING; -import static org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider.CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING; -import static org.elasticsearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; -import static org.elasticsearch.node.Node.NODE_NAME_SETTING; -import static org.elasticsearch.test.InternalTestCluster.REMOVED_MINIMUM_MASTER_NODES; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.coordination.Coordinator.ZEN1_BWC_TERM; +import static org.opensearch.cluster.coordination.FollowersChecker.FOLLOWER_CHECK_ACTION_NAME; +import static org.opensearch.cluster.coordination.JoinHelper.START_JOIN_ACTION_NAME; +import static org.opensearch.cluster.coordination.PublicationTransportHandler.PUBLISH_STATE_ACTION_NAME; +import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE_SETTING; +import static org.opensearch.cluster.routing.allocation.decider.FilterAllocationDecider.CLUSTER_ROUTING_EXCLUDE_GROUP_SETTING; +import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK; +import static org.opensearch.node.Node.NODE_NAME_SETTING; +import static org.opensearch.test.InternalTestCluster.REMOVED_MINIMUM_MASTER_NODES; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class Zen1IT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class Zen1IT extends OpenSearchIntegTestCase { private static Settings ZEN1_SETTINGS = Coordinator.addZen1Attribute(true, Settings.builder() .put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), DiscoveryModule.ZEN_DISCOVERY_TYPE) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/ZenDiscoveryIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/coordination/ZenDiscoveryIT.java index b800fde98a1..9356dbc0be1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/coordination/ZenDiscoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/coordination/ZenDiscoveryIT.java @@ -17,27 +17,27 @@ * under the License. */ -package org.elasticsearch.cluster.coordination; +package org.opensearch.cluster.coordination; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.recovery.RecoveryResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.discovery.Discovery; -import org.elasticsearch.discovery.DiscoveryStats; -import org.elasticsearch.discovery.zen.FaultDetection; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.TestCustomMetadata; -import org.elasticsearch.transport.RemoteTransportException; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.discovery.Discovery; +import org.opensearch.discovery.DiscoveryStats; +import org.opensearch.discovery.zen.FaultDetection; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.TestCustomMetadata; +import org.opensearch.transport.RemoteTransportException; import java.util.EnumSet; import java.util.Optional; @@ -47,8 +47,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.DISCOVERY; -import static org.elasticsearch.test.NodeRoles.dataNode; -import static org.elasticsearch.test.NodeRoles.masterOnlyNode; +import static org.opensearch.test.NodeRoles.dataNode; +import static org.opensearch.test.NodeRoles.masterOnlyNode; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -56,8 +56,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class ZenDiscoveryIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) +public class ZenDiscoveryIT extends OpenSearchIntegTestCase { public void testNoShardRelocationsOccurWhenElectedMasterNodeFails() throws Exception { Settings defaultSettings = Settings.builder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/TemplateUpgradeServiceIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/metadata/TemplateUpgradeServiceIT.java index 9322cae9aed..012689de1af 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/TemplateUpgradeServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/TemplateUpgradeServiceIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.cluster.metadata; +package org.opensearch.cluster.metadata; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; +import org.opensearch.client.Client; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.script.ScriptService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.watcher.ResourceWatcherService; import java.util.Collection; import java.util.Collections; @@ -44,12 +44,12 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Supplier; import java.util.function.UnaryOperator; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class TemplateUpgradeServiceIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class TemplateUpgradeServiceIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/UpgradeIndexSettingsIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/metadata/UpgradeIndexSettingsIT.java index d6d509de073..7fb82a1dc7b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/metadata/UpgradeIndexSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/UpgradeIndexSettingsIT.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.cluster.metadata; +package org.opensearch.cluster.metadata; -import org.elasticsearch.Version; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESSingleNodeTestCase; +import org.opensearch.Version; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import static org.hamcrest.Matchers.equalTo; -public class UpgradeIndexSettingsIT extends ESSingleNodeTestCase { +public class UpgradeIndexSettingsIT extends OpenSearchSingleNodeTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/node/DiscoveryNodeRoleIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/node/DiscoveryNodeRoleIT.java index ea000954793..0ba39c04a65 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/node/DiscoveryNodeRoleIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/node/DiscoveryNodeRoleIT.java @@ -17,14 +17,15 @@ * under the License. */ -package org.elasticsearch.cluster.node; +package org.opensearch.cluster.node; import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.hamcrest.Matcher; import java.util.Collection; @@ -32,13 +33,13 @@ import java.util.Collections; import java.util.List; import java.util.Set; -import static org.elasticsearch.test.NodeRoles.addRoles; -import static org.elasticsearch.test.NodeRoles.removeRoles; +import static org.opensearch.test.NodeRoles.addRoles; +import static org.opensearch.test.NodeRoles.removeRoles; import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; -public class DiscoveryNodeRoleIT extends ESIntegTestCase { +public class DiscoveryNodeRoleIT extends OpenSearchIntegTestCase { public static class AdditionalRolePlugin extends Plugin { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/AllocationIdIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/AllocationIdIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/AllocationIdIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/AllocationIdIT.java index 4556aff673e..254a0d99bd0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/AllocationIdIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/AllocationIdIT.java @@ -17,35 +17,36 @@ * under the License. */ -package org.elasticsearch.cluster.routing; +package org.opensearch.cluster.routing; import org.apache.lucene.store.SimpleFSDirectory; + import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplanation; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.allocation.AllocationDecision; -import org.elasticsearch.cluster.routing.allocation.ShardAllocationDecision; -import org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.shard.RemoveCorruptedShardDataCommandIT; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.index.shard.ShardPath; -import org.elasticsearch.index.store.Store; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.DummyShardLock; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.allocation.AllocationDecision; +import org.opensearch.cluster.routing.allocation.ShardAllocationDecision; +import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.shard.RemoveCorruptedShardDataCommandIT; +import org.opensearch.index.shard.ShardId; +import org.opensearch.index.shard.ShardPath; +import org.opensearch.index.store.Store; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.DummyShardLock; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.transport.MockTransportService; import java.io.IOException; import java.nio.file.Path; @@ -54,16 +55,16 @@ import java.util.Collection; import java.util.Set; import java.util.stream.Collectors; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0) -public class AllocationIdIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 0) +public class AllocationIdIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/DelayedAllocationIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/DelayedAllocationIT.java index 1c644d58633..667fb90d456 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/DelayedAllocationIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.cluster.routing; +package org.opensearch.cluster.routing; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.Collections; import java.util.List; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class DelayedAllocationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class DelayedAllocationIT extends OpenSearchIntegTestCase { /** * Verifies that when there is no delay timeout, a 1/1 index shard will immediately diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/PrimaryAllocationIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/PrimaryAllocationIT.java index 4e960ec4933..9823008e28a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/PrimaryAllocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/PrimaryAllocationIT.java @@ -1,4 +1,4 @@ -package org.elasticsearch.cluster.routing; +package org.opensearch.cluster.routing; /* * Licensed to Elasticsearch under one or more contributor @@ -24,35 +24,35 @@ import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequestBuilder; import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateListener; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.ImmutableOpenIntMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.gateway.GatewayAllocator; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.engine.EngineTestCase; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardTestCase; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateListener; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; +import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Strings; +import org.opensearch.common.collect.ImmutableOpenIntMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.set.Sets; +import org.opensearch.gateway.GatewayAllocator; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.engine.EngineTestCase; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardTestCase; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions; +import org.opensearch.test.transport.MockTransportService; import java.util.ArrayList; import java.util.Arrays; @@ -67,12 +67,12 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; @@ -81,8 +81,8 @@ import static org.hamcrest.Matchers.in; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class PrimaryAllocationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class PrimaryAllocationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/ShardStateIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/ShardStateIT.java index a632d7afd70..d9d11cde249 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/ShardStateIT.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.routing.allocation; +package org.opensearch.cluster.routing.allocation; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexService; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.equalTo; -public class ShardStateIT extends ESIntegTestCase { +public class ShardStateIT extends OpenSearchIntegTestCase { public void testPrimaryFailureIncreasesTerm() throws Exception { internalCluster().ensureAtLeastNumDataNodes(2); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java index d84c3effea6..ff16707ac06 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderIT.java @@ -17,42 +17,44 @@ * under the License. */ -package org.elasticsearch.cluster.routing.allocation.decider; +package org.opensearch.cluster.routing.allocation.decider; import org.apache.lucene.mockfile.FilterFileStore; import org.apache.lucene.mockfile.FilterFileSystemProvider; import org.apache.lucene.mockfile.FilterPath; import org.apache.lucene.util.Constants; + import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.ClusterInfoService; -import org.elasticsearch.cluster.InternalClusterInfoService; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.monitor.fs.FsService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.snapshots.RestoreInfo; -import org.elasticsearch.snapshots.SnapshotInfo; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.ClusterInfoService; +import org.opensearch.cluster.InternalClusterInfoService; +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.opensearch.cluster.routing.allocation.DiskThresholdSettings; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.io.PathUtilsForTesting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.monitor.fs.FsService; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.fs.FsRepository; +import org.opensearch.snapshots.RestoreInfo; +import org.opensearch.snapshots.SnapshotInfo; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.hamcrest.Matcher; import org.junit.After; import org.junit.Before; @@ -77,9 +79,9 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import static org.elasticsearch.common.util.concurrent.ConcurrentCollections.newConcurrentMap; -import static org.elasticsearch.index.store.Store.INDEX_STORE_STATS_REFRESH_INTERVAL_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.util.concurrent.ConcurrentCollections.newConcurrentMap; +import static org.opensearch.index.store.Store.INDEX_STORE_STATS_REFRESH_INTERVAL_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -87,8 +89,8 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class DiskThresholdDeciderIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class DiskThresholdDeciderIT extends OpenSearchIntegTestCase { private static TestFileSystemProvider fileSystemProvider; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java index eda6c5e9d03..359bb1fb9e3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java @@ -16,24 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.routing.allocation.decider; + +package org.opensearch.cluster.routing.allocation.decider; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.cluster.ClusterInfoService; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.MockInternalClusterInfoService; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.RoutingNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.env.Environment; -import org.elasticsearch.monitor.fs.FsInfo; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.cluster.ClusterInfoService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.MockInternalClusterInfoService; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.RoutingNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.env.Environment; +import org.opensearch.monitor.fs.FsInfo; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.nio.file.Path; import java.util.Arrays; @@ -46,22 +47,22 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING; -import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING; -import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING; -import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING; -import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING; +import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING; +import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING; +import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING; +import static org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class MockDiskUsagesIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class MockDiskUsagesIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java index e4990a98e74..a79070a1b02 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/routing/allocation/decider/UpdateShardAllocationSettingsIT.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.routing.allocation.decider; +package org.opensearch.cluster.routing.allocation.decider; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Set; -import static org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider.CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.routing.allocation.decider.SameShardAllocationDecider.CLUSTER_ROUTING_ALLOCATION_SAME_HOST_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; /** * An integration test for testing updating shard allocation/routing settings and * ensuring the updated settings take effect as expected. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class UpdateShardAllocationSettingsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class UpdateShardAllocationSettingsIT extends OpenSearchIntegTestCase { /** * Tests that updating the {@link EnableAllocationDecider} related settings works as expected. diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/service/ClusterServiceIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/service/ClusterServiceIT.java index c1568b05dbb..99802d1bebf 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/service/ClusterServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/service/ClusterServiceIT.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.service; +package org.opensearch.cluster.service; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.admin.cluster.tasks.PendingClusterTasksResponse; -import org.elasticsearch.cluster.AckedClusterStateUpdateTask; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.cluster.AckedClusterStateUpdateTask; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateUpdateTask; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.Nullable; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.Arrays; import java.util.HashSet; @@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ClusterServiceIT extends ESIntegTestCase { +public class ClusterServiceIT extends OpenSearchIntegTestCase { public void testAckedUpdateTask() throws Exception { internalCluster().startNode(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/settings/ClusterSettingsIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/settings/ClusterSettingsIT.java index 1e1864adf5f..5dd91d9e864 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/settings/ClusterSettingsIT.java @@ -17,35 +17,36 @@ * under the License. */ -package org.elasticsearch.cluster.settings; +package org.opensearch.cluster.settings; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.indices.recovery.RecoverySettings; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.junit.After; import java.util.Arrays; -import static org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING; -import static org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.routing.allocation.DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING; +import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_INITIAL_PRIMARIES_RECOVERIES_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class ClusterSettingsIT extends ESIntegTestCase { +public class ClusterSettingsIT extends OpenSearchIntegTestCase { @After public void cleanup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/settings/SettingsFilteringIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/settings/SettingsFilteringIT.java index c7135bf9e1a..7a273763b05 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/settings/SettingsFilteringIT.java @@ -17,30 +17,32 @@ * under the License. */ -package org.elasticsearch.cluster.settings; +package org.opensearch.cluster.settings; import org.opensearch.action.admin.cluster.node.info.NodeInfo; import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; import java.util.Collection; import java.util.List; import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.SETTINGS; -import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; + +import static org.opensearch.test.OpenSearchIntegTestCase.Scope.SUITE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; + import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = SUITE, supportsDedicatedMasters = false, numDataNodes = 1) -public class SettingsFilteringIT extends ESIntegTestCase { +public class SettingsFilteringIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterSearchShardsIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterSearchShardsIT.java index a1645e31315..ab3b8ea8d1f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterSearchShardsIT.java @@ -16,29 +16,29 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.cluster.shards; +package org.opensearch.cluster.shards; import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsGroup; import org.opensearch.action.admin.cluster.shards.ClusterSearchShardsResponse; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope= Scope.SUITE, numDataNodes = 2) -public class ClusterSearchShardsIT extends ESIntegTestCase { +public class ClusterSearchShardsIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterShardLimitIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java rename to server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterShardLimitIT.java index 81c6aaebd87..7c0b63bf00c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/cluster/shards/ClusterShardLimitIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/shards/ClusterShardLimitIT.java @@ -17,38 +17,38 @@ * under the License. */ +package org.opensearch.cluster.shards; -package org.elasticsearch.cluster.shards; +import org.opensearch.Version; -import org.elasticsearch.Version; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.indices.ShardLimitValidator; -import org.elasticsearch.snapshots.SnapshotInfo; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.indices.ShardLimitValidator; +import org.opensearch.snapshots.SnapshotInfo; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collections; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.test.NodeRoles.dataNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.test.NodeRoles.dataNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class ClusterShardLimitIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class ClusterShardLimitIT extends OpenSearchIntegTestCase { private static final String shardsPerNodeKey = ShardLimitValidator.SETTING_CLUSTER_MAX_SHARDS_PER_NODE.getKey(); public void testSettingClusterMaxShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/common/settings/ConsistentSettingsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/common/settings/ConsistentSettingsIT.java index 2db1cdafa3e..88b4a85c0b5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/common/settings/ConsistentSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/common/settings/ConsistentSettingsIT.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.common.settings; +package org.opensearch.common.settings; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Setting.AffixSetting; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Setting.AffixSetting; +import org.opensearch.env.Environment; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Arrays; @@ -33,8 +33,8 @@ import java.util.List; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class ConsistentSettingsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class ConsistentSettingsIT extends OpenSearchIntegTestCase { static final Setting DUMMY_STRING_CONSISTENT_SETTING = SecureSetting .secureString("dummy.consistent.secure.string.setting", null, Setting.Property.Consistent); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/common/settings/UpgradeSettingsIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/common/settings/UpgradeSettingsIT.java index 1ea2bf3fbf9..28c3108c79b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/common/settings/UpgradeSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/common/settings/UpgradeSettingsIT.java @@ -17,15 +17,16 @@ * under the License. */ -package org.elasticsearch.common.settings; +package org.opensearch.common.settings; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequestBuilder; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.transport.RemoteClusterService; -import org.elasticsearch.transport.SniffConnectionStrategy; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchSingleNodeTestCase; +import org.opensearch.transport.RemoteClusterService; +import org.opensearch.transport.SniffConnectionStrategy; + import org.junit.After; import java.util.Arrays; @@ -37,7 +38,7 @@ import java.util.function.Function; import static org.hamcrest.Matchers.equalTo; -public class UpgradeSettingsIT extends ESSingleNodeTestCase { +public class UpgradeSettingsIT extends OpenSearchSingleNodeTestCase { @After public void cleanup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionCleanSettingsIT.java similarity index 78% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionCleanSettingsIT.java index 99f4e09899a..4dbea3bf990 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionCleanSettingsIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.indices.store.IndicesStoreIntegrationIT; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.indices.store.IndicesStoreIntegrationIT; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) -public class ClusterDisruptionCleanSettingsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +public class ClusterDisruptionCleanSettingsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java index 233133b45e3..73bdca4e4a2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/ClusterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterDisruptionIT.java @@ -17,40 +17,41 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.index.CorruptIndexException; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.ActionListener; import org.opensearch.action.NoShardAvailableActionException; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.action.shard.ShardStateAction; -import org.elasticsearch.cluster.coordination.ClusterBootstrapService; -import org.elasticsearch.cluster.coordination.LagDetector; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.Murmur3HashFunction; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.ConcurrentCollections; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardTestCase; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption.Bridge; -import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions; -import org.elasticsearch.test.disruption.ServiceDisruptionScheme; -import org.elasticsearch.test.junit.annotations.TestIssueLogging; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.action.shard.ShardStateAction; +import org.opensearch.cluster.coordination.ClusterBootstrapService; +import org.opensearch.cluster.coordination.LagDetector; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.Murmur3HashFunction; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.ConcurrentCollections; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.VersionType; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardTestCase; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.NetworkDisruption.Bridge; +import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions; +import org.opensearch.test.disruption.ServiceDisruptionScheme; +import org.opensearch.test.junit.annotations.TestIssueLogging; import java.util.ArrayList; import java.util.Collections; @@ -69,7 +70,7 @@ import java.util.stream.IntStream; import static org.opensearch.action.DocWriteResponse.Result.CREATED; import static org.opensearch.action.DocWriteResponse.Result.UPDATED; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -81,7 +82,7 @@ import static org.hamcrest.Matchers.oneOf; /** * Tests various cluster operations (e.g., indexing) during disruptions. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) public class ClusterDisruptionIT extends AbstractDisruptionTestCase { private enum ConflictMode { @@ -102,10 +103,10 @@ public class ClusterDisruptionIT extends AbstractDisruptionTestCase { *

* This test is a superset of tests run in the Jepsen test suite, with the exception of versioned updates */ - @TestIssueLogging(value = "_root:DEBUG,org.elasticsearch.action.bulk:TRACE,org.elasticsearch.action.get:TRACE," + - "org.elasticsearch.discovery:TRACE,org.elasticsearch.action.support.replication:TRACE," + - "org.elasticsearch.cluster.service:TRACE,org.elasticsearch.indices.recovery:TRACE," + - "org.elasticsearch.indices.cluster:TRACE,org.elasticsearch.index.shard:TRACE", + @TestIssueLogging(value = "_root:DEBUG,org.opensearch.action.bulk:TRACE,org.opensearch.action.get:TRACE," + + "org.opensearch.discovery:TRACE,org.opensearch.action.support.replication:TRACE," + + "org.opensearch.cluster.service:TRACE,org.opensearch.indices.recovery:TRACE," + + "org.opensearch.indices.cluster:TRACE,org.opensearch.index.shard:TRACE", issueUrl = "https://github.com/elastic/elasticsearch/issues/41068") public void testAckedIndexing() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java index 47e7170098d..1c2274f0449 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiscoveryDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/DiscoveryDisruptionIT.java @@ -17,38 +17,38 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.JoinHelper; -import org.elasticsearch.cluster.coordination.PublicationTransportHandler; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.zen.MembershipAction; -import org.elasticsearch.discovery.zen.PublishClusterStateAction; -import org.elasticsearch.discovery.zen.ZenDiscovery; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.ServiceDisruptionScheme; -import org.elasticsearch.test.disruption.SlowClusterStateProcessing; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.JoinHelper; +import org.opensearch.cluster.coordination.PublicationTransportHandler; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.zen.MembershipAction; +import org.opensearch.discovery.zen.PublishClusterStateAction; +import org.opensearch.discovery.zen.ZenDiscovery; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.ServiceDisruptionScheme; +import org.opensearch.test.disruption.SlowClusterStateProcessing; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportService; import java.util.HashSet; import java.util.Set; import java.util.concurrent.CountDownLatch; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_SHARDS_SETTING; import static org.hamcrest.Matchers.greaterThanOrEqualTo; /** * Tests for discovery during disruptions. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) public class DiscoveryDisruptionIT extends AbstractDisruptionTestCase { /** diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/DiskDisruptionIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/DiskDisruptionIT.java index da978dca747..cff338b4312 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/DiskDisruptionIT.java @@ -16,20 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import com.carrotsearch.randomizedtesting.RandomizedTest; import org.apache.lucene.mockfile.FilterFileSystemProvider; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.io.PathUtilsForTesting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.io.PathUtilsForTesting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; + import org.junit.After; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -45,10 +46,10 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.greaterThanOrEqualTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class DiskDisruptionIT extends AbstractDisruptionTestCase { private static DisruptTranslogFileSystemProvider disruptTranslogFileSystemProvider; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/MasterDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/MasterDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java index 8d15cd27fda..e5817e6164d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/MasterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/MasterDisruptionIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.NoMasterBlockService; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.discovery.zen.ZenDiscovery; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.BlockMasterServiceOnMaster; -import org.elasticsearch.test.disruption.IntermittentLongGCDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions; -import org.elasticsearch.test.disruption.ServiceDisruptionScheme; -import org.elasticsearch.test.disruption.SingleNodeDisruption; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.NoMasterBlockService; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.discovery.zen.ZenDiscovery; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.BlockMasterServiceOnMaster; +import org.opensearch.test.disruption.IntermittentLongGCDisruption; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions; +import org.opensearch.test.disruption.ServiceDisruptionScheme; +import org.opensearch.test.disruption.SingleNodeDisruption; import java.util.ArrayList; import java.util.HashSet; @@ -44,14 +44,14 @@ import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; /** * Tests relating to the loss of the master. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) public class MasterDisruptionIT extends AbstractDisruptionTestCase { /** diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/SettingsBasedSeedHostsProviderIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/SettingsBasedSeedHostsProviderIT.java index c009c7b07e7..85661b491cf 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/SettingsBasedSeedHostsProviderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/SettingsBasedSeedHostsProviderIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest; import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.transport.TransportInfo; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.transport.TransportInfo; -import static org.elasticsearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING; -import static org.elasticsearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; +import static org.opensearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING; +import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class SettingsBasedSeedHostsProviderIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) +public class SettingsBasedSeedHostsProviderIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/SnapshotDisruptionIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/SnapshotDisruptionIT.java index b43dca7f5ae..e896e875c85 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/SnapshotDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/SnapshotDisruptionIT.java @@ -16,40 +16,41 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.discovery; -import org.elasticsearch.ExceptionsHelper; +package org.opensearch.discovery; + +import org.opensearch.ExceptionsHelper; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.ClusterChangedEvent; -import org.elasticsearch.cluster.ClusterStateListener; -import org.elasticsearch.cluster.SnapshotsInProgress; -import org.elasticsearch.cluster.metadata.RepositoriesMetadata; -import org.elasticsearch.cluster.metadata.RepositoryMetadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.snapshots.AbstractSnapshotIntegTestCase; -import org.elasticsearch.snapshots.SnapshotException; -import org.elasticsearch.snapshots.SnapshotInfo; -import org.elasticsearch.snapshots.SnapshotMissingException; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.ClusterChangedEvent; +import org.opensearch.cluster.ClusterStateListener; +import org.opensearch.cluster.SnapshotsInProgress; +import org.opensearch.cluster.metadata.RepositoriesMetadata; +import org.opensearch.cluster.metadata.RepositoryMetadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.plugins.Plugin; +import org.opensearch.snapshots.AbstractSnapshotIntegTestCase; +import org.opensearch.snapshots.SnapshotException; +import org.opensearch.snapshots.SnapshotInfo; +import org.opensearch.snapshots.SnapshotMissingException; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.transport.MockTransportService; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; import static org.hamcrest.Matchers.either; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.is; @@ -57,7 +58,7 @@ import static org.hamcrest.Matchers.is; /** * Tests snapshot operations during disruptions. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) public class SnapshotDisruptionIT extends AbstractSnapshotIntegTestCase { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/StableMasterDisruptionIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/StableMasterDisruptionIT.java index f0021a1fc13..b38e95e329e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/StableMasterDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/StableMasterDisruptionIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.discovery; +package org.opensearch.discovery; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.admin.cluster.state.ClusterStateRequest; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.coordination.Coordinator; -import org.elasticsearch.cluster.coordination.FollowersChecker; -import org.elasticsearch.cluster.coordination.LeaderChecker; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.LongGCDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType; -import org.elasticsearch.test.disruption.NetworkDisruption.TwoPartitions; -import org.elasticsearch.test.disruption.SingleNodeDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateUpdateTask; +import org.opensearch.cluster.coordination.Coordinator; +import org.opensearch.cluster.coordination.FollowersChecker; +import org.opensearch.cluster.coordination.LeaderChecker; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.set.Sets; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.LongGCDisruption; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType; +import org.opensearch.test.disruption.NetworkDisruption.TwoPartitions; +import org.opensearch.test.disruption.SingleNodeDisruption; +import org.opensearch.test.transport.MockTransportService; import java.util.ArrayList; import java.util.Arrays; @@ -63,8 +63,8 @@ import static org.hamcrest.Matchers.equalTo; * Tests relating to the loss of the master, but which work with the default fault detection settings which are rather lenient and will * not detect a master failure too quickly. */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) -public class StableMasterDisruptionIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +public class StableMasterDisruptionIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java rename to server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java index 69c00447ee6..6ae27b46dc0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/single/SingleNodeDiscoveryIT.java @@ -17,25 +17,25 @@ * under the License. */ -package org.elasticsearch.discovery.single; +package org.opensearch.discovery.single; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.LogEvent; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.JoinHelper; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.logging.Loggers; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.DiscoverySettings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.MockHttpTransport; -import org.elasticsearch.test.MockLogAppender; -import org.elasticsearch.test.NodeConfigurationSource; -import org.elasticsearch.transport.RemoteTransportException; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.JoinHelper; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.logging.Loggers; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.DiscoverySettings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.MockHttpTransport; +import org.opensearch.test.MockLogAppender; +import org.opensearch.test.NodeConfigurationSource; +import org.opensearch.transport.RemoteTransportException; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.nio.file.Path; @@ -45,13 +45,13 @@ import java.util.function.Function; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope( - scope = ESIntegTestCase.Scope.TEST, +@OpenSearchIntegTestCase.ClusterScope( + scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 1, numClientNodes = 0, supportsDedicatedMasters = false, autoManageMasterNodes = false) -public class SingleNodeDiscoveryIT extends ESIntegTestCase { +public class SingleNodeDiscoveryIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java b/server/src/internalClusterTest/java/org/opensearch/document/AliasedIndexDocumentActionsIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/document/AliasedIndexDocumentActionsIT.java index e70fc812672..e233f0516d6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/document/AliasedIndexDocumentActionsIT.java @@ -17,11 +17,11 @@ * under the License. */ -package org.elasticsearch.document; +package org.opensearch.document; import org.opensearch.action.admin.indices.alias.Alias; -import static org.elasticsearch.client.Requests.createIndexRequest; +import static org.opensearch.client.Requests.createIndexRequest; public class AliasedIndexDocumentActionsIT extends DocumentActionsIT { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/document/DocumentActionsIT.java b/server/src/internalClusterTest/java/org/opensearch/document/DocumentActionsIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/document/DocumentActionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/document/DocumentActionsIT.java index 65969d1beca..a2c8a74eac1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/document/DocumentActionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/document/DocumentActionsIT.java @@ -17,44 +17,45 @@ * under the License. */ -package org.elasticsearch.document; +package org.opensearch.document; import org.opensearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse; import org.opensearch.action.admin.indices.flush.FlushResponse; import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.Strings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.io.IOException; import static org.opensearch.action.DocWriteRequest.OpType; -import static org.elasticsearch.client.Requests.clearIndicesCacheRequest; -import static org.elasticsearch.client.Requests.getRequest; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.client.Requests.refreshRequest; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.client.Requests.clearIndicesCacheRequest; +import static org.opensearch.client.Requests.getRequest; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.client.Requests.refreshRequest; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; + import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; /** * Integration test for document action like index, bulk, and get. It has a very long history: it was in the second commit of Elasticsearch. */ -public class DocumentActionsIT extends ESIntegTestCase { +public class DocumentActionsIT extends OpenSearchIntegTestCase { protected void createIndex() { - ElasticsearchAssertions.assertAcked(prepareCreate(getConcreteIndexName()).addMapping("type1", "name", "type=keyword,store=true")); + OpenSearchAssertions.assertAcked(prepareCreate(getConcreteIndexName()).addMapping("type1", "name", "type=keyword,store=true")); } protected String getConcreteIndexName() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/document/ShardInfoIT.java b/server/src/internalClusterTest/java/org/opensearch/document/ShardInfoIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/document/ShardInfoIT.java rename to server/src/internalClusterTest/java/org/opensearch/document/ShardInfoIT.java index def798c322d..fad40b7c6bb 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/document/ShardInfoIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/document/ShardInfoIT.java @@ -17,30 +17,31 @@ * under the License. */ -package org.elasticsearch.document; +package org.opensearch.document; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.recovery.RecoveryResponse; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.replication.ReplicationResponse; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.replication.ReplicationResponse; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class ShardInfoIT extends ESIntegTestCase { +public class ShardInfoIT extends OpenSearchIntegTestCase { private int numCopies; private int numNodes; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java b/server/src/internalClusterTest/java/org/opensearch/env/NodeEnvironmentIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java rename to server/src/internalClusterTest/java/org/opensearch/env/NodeEnvironmentIT.java index 3eb330e0ef0..94f76e45e9e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/env/NodeEnvironmentIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/env/NodeEnvironmentIT.java @@ -17,18 +17,18 @@ * under the License. */ -package org.elasticsearch.env; +package org.opensearch.env; -import org.elasticsearch.Version; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.common.CheckedConsumer; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.gateway.PersistedClusterStateService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.NodeRoles; +import org.opensearch.Version; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.common.CheckedConsumer; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.settings.Settings; +import org.opensearch.gateway.PersistedClusterStateService; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.NodeRoles; import java.io.IOException; import java.nio.file.Path; @@ -38,14 +38,14 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; -import static org.elasticsearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonDataNode; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.startsWith; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class NodeEnvironmentIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class NodeEnvironmentIT extends OpenSearchIntegTestCase { public void testStartFailureOnDataForNonDataNode() throws Exception { final String indexName = "test-fail-on-data"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/env/NodeRepurposeCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/env/NodeRepurposeCommandIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/env/NodeRepurposeCommandIT.java rename to server/src/internalClusterTest/java/org/opensearch/env/NodeRepurposeCommandIT.java index dadfa31a157..c6e94c0e94f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/env/NodeRepurposeCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/env/NodeRepurposeCommandIT.java @@ -16,15 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.env; -import org.elasticsearch.OpenSearchException; +package org.opensearch.env; + +import org.opensearch.OpenSearchException; import org.opensearch.action.NoShardAvailableActionException; -import org.elasticsearch.cluster.node.DiscoveryNodeRole; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.NodeRoles; +import org.opensearch.cluster.node.DiscoveryNodeRole; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.NodeRoles; + import org.hamcrest.Matcher; import java.util.Arrays; @@ -34,8 +36,8 @@ import java.util.HashSet; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class NodeRepurposeCommandIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class NodeRepurposeCommandIT extends OpenSearchIntegTestCase { public void testRepurpose() throws Exception { final String indexName = "test-repurpose"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/explain/ExplainActionIT.java b/server/src/internalClusterTest/java/org/opensearch/explain/ExplainActionIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/explain/ExplainActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/explain/ExplainActionIT.java index f66e3292500..63427e526b3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/explain/ExplainActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/explain/ExplainActionIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.explain; +package org.opensearch.explain; import org.apache.lucene.search.Explanation; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.explain.ExplainResponse; -import org.elasticsearch.common.io.stream.InputStreamStreamInput; -import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; -import org.elasticsearch.common.lucene.Lucene; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.explain.ExplainResponse; +import org.opensearch.common.io.stream.InputStreamStreamInput; +import org.opensearch.common.io.stream.OutputStreamStreamOutput; +import org.opensearch.common.lucene.Lucene; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -39,13 +39,13 @@ import java.util.Map; import java.util.Set; import static java.util.Collections.singleton; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -public class ExplainActionIT extends ESIntegTestCase { +public class ExplainActionIT extends OpenSearchIntegTestCase { public void testSimple() throws Exception { assertAcked(prepareCreate("test") .addAlias(new Alias("alias")) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/GatewayIndexStateIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/GatewayIndexStateIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/GatewayIndexStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/GatewayIndexStateIT.java index 7357bc497e6..71511bf0089 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/GatewayIndexStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/GatewayIndexStateIT.java @@ -17,41 +17,42 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; + +import org.opensearch.OpenSearchException; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexGraveyard; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.indices.IndexClosedException; -import org.elasticsearch.indices.ShardLimitValidator; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster.RestartCallback; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexGraveyard; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.cluster.metadata.Metadata; +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.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.indices.IndexClosedException; +import org.opensearch.indices.ShardLimitValidator; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster.RestartCallback; import java.io.IOException; import java.nio.file.Path; @@ -62,11 +63,11 @@ import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -74,7 +75,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class GatewayIndexStateIT extends ESIntegTestCase { +public class GatewayIndexStateIT extends OpenSearchIntegTestCase { private final Logger logger = LogManager.getLogger(GatewayIndexStateIT.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/MetadataNodesIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/MetadataNodesIT.java index db05d3d6235..d73df62be3e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/MetadataNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/MetadataNodesIT.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.cluster.coordination.Coordinator; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.Discovery; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.Index; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.InternalTestCluster.RestartCallback; +import org.opensearch.cluster.coordination.Coordinator; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.Discovery; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.Index; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.InternalTestCluster.RestartCallback; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class MetadataNodesIT extends ESIntegTestCase { +public class MetadataNodesIT extends OpenSearchIntegTestCase { public void testMetaWrittenAlsoOnDataNode() throws Exception { // this test checks that index state is written on data only nodes if they have a shard allocated String masterNode = internalCluster().startMasterOnlyNode(Settings.EMPTY); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/QuorumGatewayIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/QuorumGatewayIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/QuorumGatewayIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/QuorumGatewayIT.java index 592a1c9aa64..3b05ffacccd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/QuorumGatewayIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/QuorumGatewayIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster.RestartCallback; +import org.opensearch.client.Client; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster.RestartCallback; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.client.Requests.clusterHealthRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.client.Requests.clusterHealthRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; @ClusterScope(numDataNodes = 0, scope = Scope.TEST) -public class QuorumGatewayIT extends ESIntegTestCase { +public class QuorumGatewayIT extends OpenSearchIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoverAfterNodesIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/RecoverAfterNodesIT.java index 9a79b62de59..4abaa006aa4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoverAfterNodesIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.block.ClusterBlock; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.client.Client; +import org.opensearch.cluster.block.ClusterBlock; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.Set; -import static org.elasticsearch.test.NodeRoles.dataOnlyNode; -import static org.elasticsearch.test.NodeRoles.masterOnlyNode; +import static org.opensearch.test.NodeRoles.dataOnlyNode; +import static org.opensearch.test.NodeRoles.masterOnlyNode; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, autoManageMasterNodes = false) -public class RecoverAfterNodesIT extends ESIntegTestCase { +public class RecoverAfterNodesIT extends OpenSearchIntegTestCase { private static final TimeValue BLOCK_WAIT_TIMEOUT = TimeValue.timeValueSeconds(10); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java index e886e6d3ad9..446d3d911df 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java @@ -17,9 +17,10 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; import com.carrotsearch.hppc.cursors.ObjectCursor; + import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction; import org.opensearch.action.admin.cluster.configuration.AddVotingConfigExclusionsRequest; import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclusionsAction; @@ -27,35 +28,35 @@ import org.opensearch.action.admin.cluster.configuration.ClearVotingConfigExclus import org.opensearch.action.admin.indices.recovery.RecoveryResponse; import org.opensearch.action.admin.indices.stats.IndexStats; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.support.ActionTestUtils; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.ElectionSchedulerFactory; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MergePolicyConfig; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.index.shard.ShardPath; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster.RestartCallback; -import org.elasticsearch.test.store.MockFSIndexStore; +import org.opensearch.action.support.ActionTestUtils; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.coordination.ElectionSchedulerFactory; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MergePolicyConfig; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.shard.ShardId; +import org.opensearch.index.shard.ShardPath; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster.RestartCallback; +import org.opensearch.test.store.MockFSIndexStore; import java.nio.file.DirectoryStream; import java.nio.file.Files; @@ -70,15 +71,15 @@ import java.util.Map; import java.util.Set; import java.util.stream.IntStream; -import static org.elasticsearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.gateway.GatewayService.RECOVER_AFTER_NODES_SETTING; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.cluster.coordination.ClusterBootstrapService.INITIAL_MASTER_NODES_SETTING; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.gateway.GatewayService.RECOVER_AFTER_NODES_SETTING; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; @@ -87,7 +88,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; @ClusterScope(numDataNodes = 0, scope = Scope.TEST) -public class RecoveryFromGatewayIT extends ESIntegTestCase { +public class RecoveryFromGatewayIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/ReplicaShardAllocatorIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java rename to server/src/internalClusterTest/java/org/opensearch/gateway/ReplicaShardAllocatorIT.java index 46f0b778a94..2e2cb27621a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/gateway/ReplicaShardAllocatorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/ReplicaShardAllocatorIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.gateway; +package org.opensearch.gateway; import org.opensearch.action.admin.indices.flush.SyncedFlushResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.breaker.CircuitBreakingException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.seqno.ReplicationTracker; -import org.elasticsearch.index.seqno.RetentionLease; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.indices.recovery.RecoveryCleanFilesRequest; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.breaker.CircuitBreakingException; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.seqno.ReplicationTracker; +import org.opensearch.index.seqno.RetentionLease; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.indices.recovery.RecoveryCleanFilesRequest; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.Arrays; import java.util.Collection; @@ -55,7 +55,7 @@ import java.util.concurrent.Semaphore; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -63,8 +63,8 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class ReplicaShardAllocatorIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class ReplicaShardAllocatorIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -361,7 +361,7 @@ public class ReplicaShardAllocatorIT extends ESIntegTestCase { } /** - * If the recovery source is on an old node (before

{@link org.elasticsearch.Version#V_7_2_0}
) then the recovery target + * If the recovery source is on an old node (before
{@link org.opensearch.Version#V_7_2_0}
) then the recovery target * won't have the safe commit after phase1 because the recovery source does not send the global checkpoint in the clean_files * step. And if the recovery fails and retries, then the recovery stage might not transition properly. This test simulates * this behavior by changing the global checkpoint in phase1 to unassigned. diff --git a/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java b/server/src/internalClusterTest/java/org/opensearch/get/GetActionIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/get/GetActionIT.java index edc2d96abde..fd54f7c807a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/get/GetActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/get/GetActionIT.java @@ -17,31 +17,32 @@ * under the License. */ -package org.elasticsearch.get; +package org.opensearch.get; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.flush.FlushResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetRequestBuilder; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.get.MultiGetRequestBuilder; -import org.elasticsearch.action.get.MultiGetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.DefaultShardOperationFailedException; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.plugins.Plugin; + +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetRequestBuilder; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.get.MultiGetRequest; +import org.opensearch.action.get.MultiGetRequestBuilder; +import org.opensearch.action.get.MultiGetResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.DefaultShardOperationFailedException; +import org.opensearch.common.Nullable; +import org.opensearch.common.Strings; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.Collection; @@ -50,8 +51,8 @@ import java.util.HashSet; import java.util.Set; import static java.util.Collections.singleton; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasKey; @@ -61,7 +62,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.startsWith; -public class GetActionIT extends ESIntegTestCase { +public class GetActionIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/get/LegacyGetActionIT.java b/server/src/internalClusterTest/java/org/opensearch/get/LegacyGetActionIT.java similarity index 82% rename from server/src/internalClusterTest/java/org/elasticsearch/get/LegacyGetActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/get/LegacyGetActionIT.java index 096968180e4..6a74dac1f25 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/get/LegacyGetActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/get/LegacyGetActionIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.get; +package org.opensearch.get; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.get.GetResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.get.GetActionIT.indexOrAlias; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.get.GetActionIT.indexOrAlias; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class LegacyGetActionIT extends ESIntegTestCase { +public class LegacyGetActionIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java b/server/src/internalClusterTest/java/org/opensearch/index/FinalPipelineIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/FinalPipelineIT.java index 40633788c60..145c22a8a98 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/FinalPipelineIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/FinalPipelineIT.java @@ -17,41 +17,42 @@ * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; -import org.elasticsearch.action.get.GetRequestBuilder; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.ingest.DeletePipelineRequest; -import org.elasticsearch.action.ingest.GetPipelineRequest; -import org.elasticsearch.action.ingest.GetPipelineResponse; -import org.elasticsearch.action.ingest.PutPipelineRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.ingest.AbstractProcessor; -import org.elasticsearch.ingest.IngestDocument; -import org.elasticsearch.ingest.PipelineConfiguration; -import org.elasticsearch.ingest.Processor; -import org.elasticsearch.plugins.IngestPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoriesService; +import org.opensearch.action.get.GetRequestBuilder; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.ingest.DeletePipelineRequest; +import org.opensearch.action.ingest.GetPipelineRequest; +import org.opensearch.action.ingest.GetPipelineResponse; +import org.opensearch.action.ingest.PutPipelineRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.ingest.AbstractProcessor; +import org.opensearch.ingest.IngestDocument; +import org.opensearch.ingest.PipelineConfiguration; +import org.opensearch.ingest.Processor; +import org.opensearch.plugins.IngestPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoriesService; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.watcher.ResourceWatcherService; +import org.opensearch.script.ScriptService; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.watcher.ResourceWatcherService; + import org.junit.After; import java.io.IOException; @@ -66,7 +67,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.hasToString; -public class FinalPipelineIT extends ESIntegTestCase { +public class FinalPipelineIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/HiddenIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/index/HiddenIndexIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/index/HiddenIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/HiddenIndexIT.java index b1834313387..0e391d1eb26 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/HiddenIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/HiddenIndexIT.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequestBuilder; import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.indices.InvalidIndexTemplateException; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.indices.InvalidIndexTemplateException; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Collections; import java.util.Map; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; -public class HiddenIndexIT extends ESIntegTestCase { +public class HiddenIndexIT extends OpenSearchIntegTestCase { public void testHiddenIndexSearch() { assertAcked(client().admin().indices().prepareCreate("hidden-index") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexRequestBuilderIT.java b/server/src/internalClusterTest/java/org/opensearch/index/IndexRequestBuilderIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/index/IndexRequestBuilderIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/IndexRequestBuilderIT.java index 7fa769b2613..6ebca94ee19 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexRequestBuilderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/IndexRequestBuilderIT.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.util.HashMap; import java.util.Map; @@ -34,7 +34,7 @@ import java.util.concurrent.ExecutionException; import static org.hamcrest.Matchers.containsString; -public class IndexRequestBuilderIT extends ESIntegTestCase { +public class IndexRequestBuilderIT extends OpenSearchIntegTestCase { public void testSetSource() throws InterruptedException, ExecutionException { createIndex("test"); Map map = new HashMap<>(); @@ -50,7 +50,7 @@ public class IndexRequestBuilderIT extends ESIntegTestCase { }; indexRandom(true, builders); SearchResponse searchResponse = client().prepareSearch("test").setQuery(QueryBuilders.termQuery("test_field", "foobar")).get(); - ElasticsearchAssertions.assertHitCount(searchResponse, builders.length); + OpenSearchAssertions.assertHitCount(searchResponse, builders.length); } public void testOddNumberOfSourceObjects() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexSortIT.java b/server/src/internalClusterTest/java/org/opensearch/index/IndexSortIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/index/IndexSortIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/IndexSortIT.java index c981d88a3d1..ba9f901e4d4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexSortIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/IndexSortIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortedNumericSortField; import org.apache.lucene.search.SortedSetSortField; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.Matchers.containsString; -public class IndexSortIT extends ESIntegTestCase { +public class IndexSortIT extends OpenSearchIntegTestCase { private static final XContentBuilder TEST_MAPPING = createTestMapping(); private static XContentBuilder createTestMapping() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexingPressureIT.java b/server/src/internalClusterTest/java/org/opensearch/index/IndexingPressureIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/index/IndexingPressureIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/IndexingPressureIT.java index 56db75c34b0..b38f4367b98 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/IndexingPressureIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/IndexingPressureIT.java @@ -16,31 +16,31 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.bulk.TransportShardBulkAction; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.lease.Releasable; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.bulk.TransportShardBulkAction; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.UUIDs; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.lease.Releasable; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.EsRejectedExecutionException; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportService; import java.util.ArrayList; import java.util.Arrays; @@ -49,12 +49,12 @@ import java.util.Collections; import java.util.concurrent.CountDownLatch; import java.util.stream.Stream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.instanceOf; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 2, numClientNodes = 1, transportClientRatio = 0.0D) -public class IndexingPressureIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 2, numClientNodes = 1, transportClientRatio = 0.0D) +public class IndexingPressureIT extends OpenSearchIntegTestCase { public static final String INDEX_NAME = "test"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/SettingsListenerIT.java b/server/src/internalClusterTest/java/org/opensearch/index/SettingsListenerIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/index/SettingsListenerIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/SettingsListenerIT.java index 8b603420dfd..bd00a1aafeb 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/SettingsListenerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/SettingsListenerIT.java @@ -16,27 +16,27 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; -import org.elasticsearch.common.inject.AbstractModule; -import org.elasticsearch.common.inject.Module; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.common.inject.AbstractModule; +import org.opensearch.common.inject.Module; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.OpenSearchIntegTestCase.Scope.SUITE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; @ClusterScope(scope = SUITE, supportsDedicatedMasters = false, numDataNodes = 1, numClientNodes = 0) -public class SettingsListenerIT extends ESIntegTestCase { +public class SettingsListenerIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java b/server/src/internalClusterTest/java/org/opensearch/index/WaitUntilRefreshIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/WaitUntilRefreshIT.java index e84cabdf789..6f9c8b75afa 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/WaitUntilRefreshIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/WaitUntilRefreshIT.java @@ -17,25 +17,26 @@ * under the License. */ -package org.elasticsearch.index; +package org.opensearch.index; import org.opensearch.action.ActionFuture; import org.opensearch.action.DocWriteResponse; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.client.Requests; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.junit.Before; import java.util.Collection; @@ -47,15 +48,15 @@ import java.util.function.Function; import static java.util.Collections.emptyMap; import static java.util.Collections.singleton; import static java.util.Collections.singletonMap; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; /** * Tests that requests with RefreshPolicy.WAIT_UNTIL will be visible when they return. */ -public class WaitUntilRefreshIT extends ESIntegTestCase { +public class WaitUntilRefreshIT extends OpenSearchIntegTestCase { @Override public Settings indexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java b/server/src/internalClusterTest/java/org/opensearch/index/engine/InternalEngineMergeIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/engine/InternalEngineMergeIT.java index f24c7e401c2..69b13a3d22b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/engine/InternalEngineMergeIT.java @@ -16,27 +16,27 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.engine; +package org.opensearch.index.engine; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; @ClusterScope(supportsDedicatedMasters = false, numDataNodes = 1, scope = Scope.SUITE) -public class InternalEngineMergeIT extends ESIntegTestCase { +public class InternalEngineMergeIT extends OpenSearchIntegTestCase { public void testMergesHappening() throws Exception { final int numOfShards = randomIntBetween(1, 5); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java b/server/src/internalClusterTest/java/org/opensearch/index/engine/MaxDocsLimitIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/engine/MaxDocsLimitIT.java index 9c8040bf30d..d11b338bc93 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/engine/MaxDocsLimitIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/engine/MaxDocsLimitIT.java @@ -17,22 +17,24 @@ * under the License. */ -package org.elasticsearch.index.engine; +package org.opensearch.index.engine; import org.apache.lucene.index.IndexWriterMaxDocsChanger; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.index.translog.Translog; -import org.elasticsearch.plugins.EnginePlugin; -import org.elasticsearch.plugins.Plugin; + +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.MatchAllQueryBuilder; +import org.opensearch.index.translog.Translog; +import org.opensearch.plugins.EnginePlugin; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; + import org.junit.After; import org.junit.Before; @@ -43,14 +45,14 @@ import java.util.Optional; import java.util.concurrent.Phaser; import java.util.concurrent.atomic.AtomicInteger; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; -public class MaxDocsLimitIT extends ESIntegTestCase { +public class MaxDocsLimitIT extends OpenSearchIntegTestCase { private static final AtomicInteger maxDocs = new AtomicInteger(); @@ -105,7 +107,7 @@ public class MaxDocsLimitIT extends ESIntegTestCase { client().admin().indices().prepareRefresh("test").get(); SearchResponse searchResponse = client().prepareSearch("test").setQuery(new MatchAllQueryBuilder()) .setTrackTotalHitsUpTo(Integer.MAX_VALUE).setSize(0).get(); - ElasticsearchAssertions.assertNoFailures(searchResponse); + OpenSearchAssertions.assertNoFailures(searchResponse); assertThat(searchResponse.getHits().getTotalHits().value, equalTo((long) maxDocs.get())); if (randomBoolean()) { client().admin().indices().prepareFlush("test").get(); @@ -115,7 +117,7 @@ public class MaxDocsLimitIT extends ESIntegTestCase { ensureGreen("test"); searchResponse = client().prepareSearch("test").setQuery(new MatchAllQueryBuilder()) .setTrackTotalHitsUpTo(Integer.MAX_VALUE).setSize(0).get(); - ElasticsearchAssertions.assertNoFailures(searchResponse); + OpenSearchAssertions.assertNoFailures(searchResponse); assertThat(searchResponse.getHits().getTotalHits().value, equalTo((long) maxDocs.get())); } @@ -129,7 +131,7 @@ public class MaxDocsLimitIT extends ESIntegTestCase { client().admin().indices().prepareRefresh("test").get(); SearchResponse searchResponse = client().prepareSearch("test").setQuery(new MatchAllQueryBuilder()) .setTrackTotalHitsUpTo(Integer.MAX_VALUE).setSize(0).get(); - ElasticsearchAssertions.assertNoFailures(searchResponse); + OpenSearchAssertions.assertNoFailures(searchResponse); assertThat(searchResponse.getHits().getTotalHits().value, equalTo((long) indexingResult.numSuccess)); int totalSuccess = indexingResult.numSuccess; while (totalSuccess < maxDocs.get()) { @@ -144,7 +146,7 @@ public class MaxDocsLimitIT extends ESIntegTestCase { client().admin().indices().prepareRefresh("test").get(); searchResponse = client().prepareSearch("test").setQuery(new MatchAllQueryBuilder()) .setTrackTotalHitsUpTo(Integer.MAX_VALUE).setSize(0).get(); - ElasticsearchAssertions.assertNoFailures(searchResponse); + OpenSearchAssertions.assertNoFailures(searchResponse); assertThat(searchResponse.getHits().getTotalHits().value, equalTo((long) totalSuccess)); } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java b/server/src/internalClusterTest/java/org/opensearch/index/fielddata/FieldDataLoadingIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/fielddata/FieldDataLoadingIT.java index 4020fc10255..665e246c6b8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/fielddata/FieldDataLoadingIT.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.index.fielddata; +package org.opensearch.index.fielddata; import org.opensearch.action.admin.cluster.stats.ClusterStatsResponse; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.greaterThan; -public class FieldDataLoadingIT extends ESIntegTestCase { +public class FieldDataLoadingIT extends OpenSearchIntegTestCase { public void testEagerGlobalOrdinalsFieldDataLoading() throws Exception { assertAcked(prepareCreate("test") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/index/mapper/CopyToMapperIntegrationIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/mapper/CopyToMapperIntegrationIT.java index 28adee6782d..35ec254e70c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/CopyToMapperIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/mapper/CopyToMapperIntegrationIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.index.mapper; +package org.opensearch.index.mapper; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class CopyToMapperIntegrationIT extends ESIntegTestCase { +public class CopyToMapperIntegrationIT extends OpenSearchIntegTestCase { public void testDynamicTemplateCopyTo() throws Exception { assertAcked( client().admin().indices().prepareCreate("test-idx") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java b/server/src/internalClusterTest/java/org/opensearch/index/mapper/DynamicMappingIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/mapper/DynamicMappingIT.java index 8b2e5d94ba8..76e657bda4b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/mapper/DynamicMappingIT.java @@ -16,22 +16,23 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.mapper; +package org.opensearch.index.mapper; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateUpdateTask; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateUpdateTask; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.hamcrest.Matchers; import java.io.IOException; @@ -41,10 +42,10 @@ import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.index.mapper.MapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING; +import static org.opensearch.index.mapper.MapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING; import static org.hamcrest.Matchers.equalTo; -public class DynamicMappingIT extends ESIntegTestCase { +public class DynamicMappingIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/index/mapper/ExternalValuesMapperIntegrationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/mapper/ExternalValuesMapperIntegrationIT.java index 5472dd25ea0..0e272913a0f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/ExternalValuesMapperIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/mapper/ExternalValuesMapperIntegrationIT.java @@ -17,25 +17,25 @@ * under the License. */ -package org.elasticsearch.index.mapper; +package org.opensearch.index.mapper; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.geo.ShapeRelation; -import org.elasticsearch.common.geo.builders.EnvelopeBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.geo.ShapeRelation; +import org.opensearch.common.geo.builders.EnvelopeBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import org.locationtech.jts.geom.Coordinate; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; -public class ExternalValuesMapperIntegrationIT extends ESIntegTestCase { +public class ExternalValuesMapperIntegrationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Collections.singletonList(ExternalMapperPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/index/mapper/MultiFieldsIntegrationIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/mapper/MultiFieldsIntegrationIT.java index 8e5b9e2a543..b3295d97136 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/mapper/MultiFieldsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/mapper/MultiFieldsIntegrationIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.index.mapper; +package org.opensearch.index.mapper; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.unit.DistanceUnit; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.support.XContentMapValues; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Map; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.geoDistanceQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.geoDistanceQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class MultiFieldsIntegrationIT extends ESIntegTestCase { +public class MultiFieldsIntegrationIT extends OpenSearchIntegTestCase { @SuppressWarnings("unchecked") public void testMultiFields() throws Exception { assertAcked( diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java b/server/src/internalClusterTest/java/org/opensearch/index/query/plugin/CustomQueryParserIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/query/plugin/CustomQueryParserIT.java index a6e5f815cea..838101284c6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/query/plugin/CustomQueryParserIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.index.query.plugin; +package org.opensearch.index.query.plugin; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.Before; import java.util.Arrays; import java.util.Collection; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; -public class CustomQueryParserIT extends ESIntegTestCase { +public class CustomQueryParserIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(DummyQueryParserPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/index/search/MatchPhraseQueryIT.java similarity index 79% rename from server/src/internalClusterTest/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/search/MatchPhraseQueryIT.java index 95da36f6c70..14b6e61c041 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/search/MatchPhraseQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/search/MatchPhraseQueryIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.index.search; +package org.opensearch.index.search; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.MatchPhraseQueryBuilder; -import org.elasticsearch.index.search.MatchQuery.ZeroTermsQuery; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.MatchPhraseQueryBuilder; +import org.opensearch.index.search.MatchQuery.ZeroTermsQuery; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.Before; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; -public class MatchPhraseQueryIT extends ESIntegTestCase { +public class MatchPhraseQueryIT extends OpenSearchIntegTestCase { private static final String INDEX = "test"; @Before diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java b/server/src/internalClusterTest/java/org/opensearch/index/seqno/GlobalCheckpointSyncIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/seqno/GlobalCheckpointSyncIT.java index 235bb04d3af..6fe29760cef 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/GlobalCheckpointSyncIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/seqno/GlobalCheckpointSyncIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.index.seqno; +package org.opensearch.index.seqno; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.translog.Translog; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.client.Client; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.translog.Translog; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.ArrayList; import java.util.Collection; @@ -48,7 +48,7 @@ import java.util.stream.Stream; import static org.hamcrest.Matchers.equalTo; -public class GlobalCheckpointSyncIT extends ESIntegTestCase { +public class GlobalCheckpointSyncIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java b/server/src/internalClusterTest/java/org/opensearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java index f73affc41a1..5638fb2c476 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/seqno/PeerRecoveryRetentionLeaseCreationIT.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.seqno; +package org.opensearch.index.seqno; -import org.elasticsearch.Version; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.env.NodeMetadata; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.UUIDs; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.env.NodeMetadata; +import org.opensearch.index.IndexSettings; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.VersionUtils; import java.nio.file.Path; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(numDataNodes = 0) -public class PeerRecoveryRetentionLeaseCreationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 0) +public class PeerRecoveryRetentionLeaseCreationIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java b/server/src/internalClusterTest/java/org/opensearch/index/seqno/RetentionLeaseIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/seqno/RetentionLeaseIT.java index 12eaaaf3396..1c8252b495d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/seqno/RetentionLeaseIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.index.seqno; +package org.opensearch.index.seqno; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.action.support.replication.ReplicationResponse; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.action.support.replication.ReplicationResponse; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportService; import java.io.Closeable; import java.util.ArrayList; @@ -58,15 +58,15 @@ import java.util.function.Consumer; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_NETWORK_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_NETWORK_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class RetentionLeaseIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class RetentionLeaseIT extends OpenSearchIntegTestCase { public static final class RetentionLeaseSyncIntervalSettingPlugin extends Plugin { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java b/server/src/internalClusterTest/java/org/opensearch/index/shard/GlobalCheckpointListenersIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/shard/GlobalCheckpointListenersIT.java index fb77f327bce..b96516457a5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/GlobalCheckpointListenersIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/shard/GlobalCheckpointListenersIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.index.shard; +package org.opensearch.index.shard; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESSingleNodeTestCase; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexService; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import org.junit.After; import java.util.concurrent.CountDownLatch; @@ -35,13 +35,13 @@ import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -import static org.elasticsearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED; -import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO; +import static org.opensearch.index.seqno.SequenceNumbers.NO_OPS_PERFORMED; +import static org.opensearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.instanceOf; -public class GlobalCheckpointListenersIT extends ESSingleNodeTestCase { +public class GlobalCheckpointListenersIT extends OpenSearchSingleNodeTestCase { private final ExecutorService executor = Executors.newSingleThreadExecutor(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java b/server/src/internalClusterTest/java/org/opensearch/index/shard/IndexShardIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/shard/IndexShardIT.java index 8c16ff909b7..b128a7c8b5c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/shard/IndexShardIT.java @@ -16,73 +16,74 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.shard; +package org.opensearch.index.shard; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.store.LockObtainFailedException; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.Version; +import org.opensearch.ExceptionsHelper; +import org.opensearch.Version; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.stats.IndexStats; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.ClusterInfoService; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.InternalClusterInfoService; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.CheckedRunnable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.env.ShardLock; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.engine.CommitStats; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.engine.NoOpEngine; -import org.elasticsearch.index.engine.SegmentsStats; -import org.elasticsearch.index.flush.FlushStats; -import org.elasticsearch.index.mapper.SourceToParse; -import org.elasticsearch.index.seqno.RetentionLeaseSyncer; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.index.translog.TestTranslog; -import org.elasticsearch.index.translog.Translog; -import org.elasticsearch.index.translog.TranslogStats; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.breaker.CircuitBreakerService; -import org.elasticsearch.indices.breaker.CircuitBreakerStats; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.DummyShardLock; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.test.IndexSettingsModule; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.ClusterInfoService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.InternalClusterInfoService; +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.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.CheckedFunction; +import org.opensearch.common.CheckedRunnable; +import org.opensearch.common.Strings; +import org.opensearch.common.UUIDs; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.env.ShardLock; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.VersionType; +import org.opensearch.index.engine.CommitStats; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.engine.NoOpEngine; +import org.opensearch.index.engine.SegmentsStats; +import org.opensearch.index.flush.FlushStats; +import org.opensearch.index.mapper.SourceToParse; +import org.opensearch.index.seqno.RetentionLeaseSyncer; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.index.translog.TestTranslog; +import org.opensearch.index.translog.Translog; +import org.opensearch.index.translog.TranslogStats; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.breaker.CircuitBreakerService; +import org.opensearch.indices.breaker.CircuitBreakerStats; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.DummyShardLock; +import org.opensearch.test.OpenSearchSingleNodeTestCase; +import org.opensearch.test.IndexSettingsModule; +import org.opensearch.test.InternalSettingsPlugin; + import org.junit.Assert; import java.io.IOException; @@ -110,16 +111,17 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiLette import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.BREAKER; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.NONE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; -import static org.elasticsearch.index.shard.IndexShardTestCase.getTranslog; -import static org.elasticsearch.index.shard.IndexShardTestCase.recoverFromStore; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.NONE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting; +import static org.opensearch.index.shard.IndexShardTestCase.getTranslog; +import static org.opensearch.index.shard.IndexShardTestCase.recoverFromStore; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; + import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.either; @@ -129,7 +131,7 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; -public class IndexShardIT extends ESSingleNodeTestCase { +public class IndexShardIT extends OpenSearchSingleNodeTestCase { @Override protected Collection> getPlugins() { @@ -757,7 +759,7 @@ public class IndexShardIT extends ESSingleNodeTestCase { } /** - * Test that the {@link org.elasticsearch.index.engine.NoOpEngine} takes precedence over other + * Test that the {@link org.opensearch.index.engine.NoOpEngine} takes precedence over other * engine factories if the index is closed. */ public void testNoOpEngineFactoryTakesPrecedence() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java b/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java index adbdfa06b07..8527d6e0d69 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/RemoveCorruptedShardDataCommandIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommandIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.shard; +package org.opensearch.index.shard; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import com.carrotsearch.randomizedtesting.generators.RandomPicks; @@ -28,51 +28,53 @@ import org.apache.lucene.store.FSDirectory; import org.apache.lucene.store.Lock; import org.apache.lucene.store.LockObtainFailedException; import org.apache.lucene.store.NativeFSLockFactory; -import org.elasticsearch.ExceptionsHelper; + +import org.opensearch.ExceptionsHelper; + import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplanation; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.flush.FlushRequest; import org.opensearch.action.admin.indices.recovery.RecoveryResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.cli.MockTerminal; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.GroupShardsIterator; -import org.elasticsearch.cluster.routing.ShardIterator; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.allocation.AllocationDecision; -import org.elasticsearch.cluster.routing.allocation.ShardAllocationDecision; -import org.elasticsearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.env.TestEnvironment; -import org.elasticsearch.gateway.GatewayMetaState; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MergePolicyConfig; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.seqno.SeqNoStats; -import org.elasticsearch.index.translog.TestTranslog; -import org.elasticsearch.index.translog.TranslogCorruptedException; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.CorruptionUtils; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.engine.MockEngineSupport; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.cli.MockTerminal; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.routing.GroupShardsIterator; +import org.opensearch.cluster.routing.ShardIterator; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.allocation.AllocationDecision; +import org.opensearch.cluster.routing.allocation.ShardAllocationDecision; +import org.opensearch.cluster.routing.allocation.command.AllocateStalePrimaryAllocationCommand; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.env.TestEnvironment; +import org.opensearch.gateway.GatewayMetaState; +import org.opensearch.index.Index; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MergePolicyConfig; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.seqno.SeqNoStats; +import org.opensearch.index.translog.TestTranslog; +import org.opensearch.index.translog.TranslogCorruptedException; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.CorruptionUtils; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.engine.MockEngineSupport; +import org.opensearch.test.transport.MockTransportService; import java.io.IOException; import java.nio.file.Files; @@ -90,10 +92,11 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.FS; -import static org.elasticsearch.common.util.CollectionUtils.iterableAsArrayList; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.common.util.CollectionUtils.iterableAsArrayList; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; + import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -104,8 +107,8 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.startsWith; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) -public class RemoveCorruptedShardDataCommandIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) +public class RemoveCorruptedShardDataCommandIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/SearchIdleIT.java b/server/src/internalClusterTest/java/org/opensearch/index/shard/SearchIdleIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/index/shard/SearchIdleIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/shard/SearchIdleIT.java index 5c03ae3d5af..d92fcc595a0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/shard/SearchIdleIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/shard/SearchIdleIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.index.shard; +package org.opensearch.index.shard; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.get.GetRequest; -import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.test.ESSingleNodeTestCase; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.action.get.GetRequest; +import org.opensearch.action.get.MultiGetRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.test.OpenSearchSingleNodeTestCase; +import org.opensearch.threadpool.ThreadPool; import java.util.Arrays; import java.util.concurrent.CountDownLatch; @@ -38,11 +38,11 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.IntToLongFunction; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoSearchHits; import static org.hamcrest.Matchers.equalTo; -public class SearchIdleIT extends ESSingleNodeTestCase { +public class SearchIdleIT extends OpenSearchSingleNodeTestCase { public void testAutomaticRefreshSearch() throws InterruptedException { runTestAutomaticRefresh(numDocs -> client().prepareSearch("test").get().getHits().getTotalHits().value); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedFileIT.java b/server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedFileIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedFileIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedFileIT.java index 2273453b937..fc9e578b210 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedFileIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedFileIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.store; +package org.opensearch.index.store; import com.carrotsearch.hppc.cursors.IntObjectCursor; import com.carrotsearch.randomizedtesting.generators.RandomPicks; @@ -26,54 +26,55 @@ import org.apache.lucene.index.SegmentInfos; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.util.BytesRef; + import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.shards.IndicesShardStoresResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.GroupShardsIterator; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.ShardIterator; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.common.lucene.Lucene; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MergePolicyConfig; -import org.elasticsearch.index.shard.IndexEventListener; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardState; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.indices.recovery.RecoveryFileChunkRequest; -import org.elasticsearch.monitor.fs.FsInfo; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.test.CorruptionUtils; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.MockIndexEventListener; -import org.elasticsearch.test.store.MockFSIndexStore; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.GroupShardsIterator; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.cluster.routing.ShardIterator; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; +import org.opensearch.common.Nullable; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.io.PathUtils; +import org.opensearch.common.io.stream.BytesStreamOutput; +import org.opensearch.common.lucene.Lucene; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.Index; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MergePolicyConfig; +import org.opensearch.index.shard.IndexEventListener; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardState; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.indices.recovery.RecoveryFileChunkRequest; +import org.opensearch.monitor.fs.FsInfo; +import org.opensearch.plugins.Plugin; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.test.CorruptionUtils; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.MockIndexEventListener; +import org.opensearch.test.store.MockFSIndexStore; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.io.OutputStream; @@ -96,10 +97,11 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.FS; -import static org.elasticsearch.common.util.CollectionUtils.iterableAsArrayList; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.common.util.CollectionUtils.iterableAsArrayList; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; + import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -108,8 +110,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class CorruptedFileIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class CorruptedFileIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedTranslogIT.java b/server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedTranslogIT.java similarity index 74% rename from server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedTranslogIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedTranslogIT.java index 21172d4d08d..f8cad5885b1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/store/CorruptedTranslogIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/store/CorruptedTranslogIT.java @@ -17,33 +17,33 @@ * under the License. */ -package org.elasticsearch.index.store; +package org.opensearch.index.store; -import org.elasticsearch.ExceptionsHelper; +import org.opensearch.ExceptionsHelper; import org.opensearch.action.admin.cluster.allocation.ClusterAllocationExplainResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.translog.TestTranslog; -import org.elasticsearch.index.translog.TranslogCorruptedException; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.engine.MockEngineSupport; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.translog.TestTranslog; +import org.opensearch.index.translog.TranslogCorruptedException; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.engine.MockEngineSupport; +import org.opensearch.test.transport.MockTransportService; import java.nio.file.Path; import java.util.Arrays; import java.util.Collection; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; @@ -51,8 +51,8 @@ import static org.hamcrest.Matchers.nullValue; /** * Integration test for corrupted translog files */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0) -public class CorruptedTranslogIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 0) +public class CorruptedTranslogIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(MockTransportService.TestPlugin.class, MockEngineFactoryPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/store/ExceptionRetryIT.java b/server/src/internalClusterTest/java/org/opensearch/index/store/ExceptionRetryIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/index/store/ExceptionRetryIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/store/ExceptionRetryIT.java index 613bcc35291..527325bce86 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/store/ExceptionRetryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/store/ExceptionRetryIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.index.store; +package org.opensearch.index.store; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; @@ -24,21 +24,21 @@ import org.opensearch.action.admin.indices.stats.IndexShardStats; import org.opensearch.action.admin.indices.stats.IndexStats; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.bulk.TransportShardBulkAction; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.engine.SegmentsStats; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.ConnectTransportException; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.bulk.TransportShardBulkAction; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.engine.SegmentsStats; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.ConnectTransportException; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Arrays; @@ -49,17 +49,17 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2, +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, numDataNodes = 2, supportsDedicatedMasters = false, numClientNodes = 1, transportClientRatio = 0.0) -public class ExceptionRetryIT extends ESIntegTestCase { +public class ExceptionRetryIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/index/suggest/stats/SuggestStatsIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/index/suggest/stats/SuggestStatsIT.java index e54b71a017d..54f165c6b53 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/index/suggest/stats/SuggestStatsIT.java @@ -17,38 +17,38 @@ * under the License. */ -package org.elasticsearch.index.suggest.stats; +package org.opensearch.index.suggest.stats; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.GroupShardsIterator; -import org.elasticsearch.cluster.routing.ShardIterator; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.search.stats.SearchStats; -import org.elasticsearch.search.suggest.SuggestBuilder; -import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder; -import org.elasticsearch.search.suggest.term.TermSuggestionBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.GroupShardsIterator; +import org.opensearch.cluster.routing.ShardIterator; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.search.stats.SearchStats; +import org.opensearch.search.suggest.SuggestBuilder; +import org.opensearch.search.suggest.phrase.PhraseSuggestionBuilder; +import org.opensearch.search.suggest.term.TermSuggestionBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.HashSet; import java.util.Set; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SuggestStatsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SuggestStatsIT extends OpenSearchIntegTestCase { @Override protected int numberOfReplicas() { return 0; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indexing/IndexActionIT.java b/server/src/internalClusterTest/java/org/opensearch/indexing/IndexActionIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/indexing/IndexActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/indexing/IndexActionIT.java index ae2ac9c8fd2..c6823c718e9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indexing/IndexActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indexing/IndexActionIT.java @@ -16,19 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indexing; + +package org.opensearch.indexing; import org.opensearch.action.DocWriteResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.MetadataCreateIndexService; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.indices.InvalidIndexNameException; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.MetadataCreateIndexService; +import org.opensearch.index.VersionType; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.indices.InvalidIndexNameException; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.util.ArrayList; import java.util.List; @@ -43,7 +44,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; -public class IndexActionIT extends ESIntegTestCase { +public class IndexActionIT extends OpenSearchIntegTestCase { /** * This test tries to simulate load while creating an index and indexing documents * while the index is being created. @@ -70,7 +71,7 @@ public class IndexActionIT extends ESIntegTestCase { if (response.getHits().getTotalHits().value != numOfDocs) { final String message = "Count is " + response.getHits().getTotalHits().value + " but " + numOfDocs + " was expected. " + - ElasticsearchAssertions.formatShardStatus(response); + OpenSearchAssertions.formatShardStatus(response); logger.error("{}. search response: \n{}", message, response); fail(message); } @@ -86,7 +87,7 @@ public class IndexActionIT extends ESIntegTestCase { if (response.getHits().getTotalHits().value != numOfDocs) { final String message = "Count is " + response.getHits().getTotalHits().value + " but " + numOfDocs + " was expected. " + - ElasticsearchAssertions.formatShardStatus(response); + OpenSearchAssertions.formatShardStatus(response); logger.error("{}. search response: \n{}", message, response); fail(message); } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/DateMathIndexExpressionsIntegrationIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/DateMathIndexExpressionsIntegrationIT.java index 9f23bfb95cb..65ace92a198 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/DateMathIndexExpressionsIntegrationIT.java @@ -17,30 +17,31 @@ * under the License. */ -package org.elasticsearch.indices; +package org.opensearch.indices; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.get.MultiGetResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.get.MultiGetResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -public class DateMathIndexExpressionsIntegrationIT extends ESIntegTestCase { +public class DateMathIndexExpressionsIntegrationIT extends OpenSearchIntegTestCase { public void testIndexNameDateMathExpressions() { DateTime now = new DateTime(DateTimeZone.UTC); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/IndexingMemoryControllerIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/IndexingMemoryControllerIT.java index 7ba30b8ee8e..4e2c1ade860 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndexingMemoryControllerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/IndexingMemoryControllerIT.java @@ -16,32 +16,32 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices; +package org.opensearch.indices; import org.apache.logging.log4j.LogManager; import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.codec.CodecService; -import org.elasticsearch.index.engine.EngineConfig; -import org.elasticsearch.index.engine.EngineFactory; -import org.elasticsearch.index.engine.InternalEngine; -import org.elasticsearch.index.refresh.RefreshStats; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.plugins.EnginePlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESSingleNodeTestCase; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.codec.CodecService; +import org.opensearch.index.engine.EngineConfig; +import org.opensearch.index.engine.EngineFactory; +import org.opensearch.index.engine.InternalEngine; +import org.opensearch.index.refresh.RefreshStats; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.plugins.EnginePlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Optional; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.greaterThan; -public class IndexingMemoryControllerIT extends ESSingleNodeTestCase { +public class IndexingMemoryControllerIT extends OpenSearchSingleNodeTestCase { @Override protected Settings nodeSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesLifecycleListenerIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/IndicesLifecycleListenerIT.java index 5f00d47f57e..0325421de30 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesLifecycleListenerIT.java @@ -16,31 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; +package org.opensearch.indices; + +import org.opensearch.OpenSearchException; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.CheckedRunnable; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.shard.IndexEventListener; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardState; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.MockIndexEventListener; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.CheckedRunnable; +import org.opensearch.common.Nullable; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.Index; +import org.opensearch.index.shard.IndexEventListener; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardState; +import org.opensearch.index.shard.ShardId; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.MockIndexEventListener; + import org.hamcrest.Matchers; import java.util.Arrays; @@ -53,20 +55,20 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.shard.IndexShardState.CLOSED; -import static org.elasticsearch.index.shard.IndexShardState.CREATED; -import static org.elasticsearch.index.shard.IndexShardState.POST_RECOVERY; -import static org.elasticsearch.index.shard.IndexShardState.RECOVERING; -import static org.elasticsearch.index.shard.IndexShardState.STARTED; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.shard.IndexShardState.CLOSED; +import static org.opensearch.index.shard.IndexShardState.CREATED; +import static org.opensearch.index.shard.IndexShardState.POST_RECOVERY; +import static org.opensearch.index.shard.IndexShardState.RECOVERING; +import static org.opensearch.index.shard.IndexShardState.STARTED; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.hasSize; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndicesLifecycleListenerIT extends ESIntegTestCase { +public class IndicesLifecycleListenerIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java index 7cf0dca59dd..50e410b10f2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesOptionsIntegrationIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices; +package org.opensearch.indices; import org.opensearch.action.ActionRequestBuilder; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder; @@ -35,37 +35,37 @@ import org.opensearch.action.admin.indices.settings.get.GetSettingsRequestBuilde import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsRequestBuilder; import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequestBuilder; -import org.elasticsearch.action.search.MultiSearchRequestBuilder; -import org.elasticsearch.action.search.MultiSearchResponse; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.search.MultiSearchRequestBuilder; +import org.opensearch.action.search.MultiSearchResponse; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.function.Function; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.startsWith; -public class IndicesOptionsIntegrationIT extends ESIntegTestCase { +public class IndicesOptionsIntegrationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesRequestCacheIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesRequestCacheIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesRequestCacheIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/IndicesRequestCacheIT.java index 7c9eb52492b..f882d209cc6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/IndicesRequestCacheIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/IndicesRequestCacheIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.indices; +package org.opensearch.indices; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.index.cache.request.RequestCacheStats; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.index.cache.request.RequestCacheStats; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.time.ZoneId; import java.time.ZoneOffset; @@ -43,15 +43,15 @@ import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateRange; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.dateRange; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -public class IndicesRequestCacheIT extends ESIntegTestCase { +public class IndicesRequestCacheIT extends OpenSearchIntegTestCase { // One of the primary purposes of the query cache is to cache aggs results public void testCacheAggs() throws Exception { @@ -117,7 +117,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); ensureSearchable("index"); @@ -128,7 +128,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // to ensure that query is executed even if it rewrites to match_no_docs .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 5); @@ -136,7 +136,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-20").lte("2016-03-26")) .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r2); + OpenSearchAssertions.assertAllSuccessful(r2); assertThat(r2.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 3, 7); @@ -144,7 +144,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-21").lte("2016-03-27")) .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r3); + OpenSearchAssertions.assertAllSuccessful(r3); assertThat(r3.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 6, 9); } @@ -168,7 +168,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); ensureSearchable("index"); @@ -176,19 +176,19 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { final SearchResponse r1 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-19").lte("2016-03-28")).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index", 0, 1); final SearchResponse r2 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-19").lte("2016-03-28")).get(); - ElasticsearchAssertions.assertAllSuccessful(r2); + OpenSearchAssertions.assertAllSuccessful(r2); assertThat(r2.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index", 1, 1); final SearchResponse r3 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-19").lte("2016-03-28")).get(); - ElasticsearchAssertions.assertAllSuccessful(r3); + OpenSearchAssertions.assertAllSuccessful(r3); assertThat(r3.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index", 2, 1); } @@ -212,7 +212,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); ensureSearchable("index"); @@ -224,7 +224,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // to ensure that query is executed even if it rewrites to match_no_docs .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(9L)); assertCacheState(client, "index", 0, 1); @@ -233,7 +233,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setQuery(QueryBuilders.rangeQuery("d").gte("2013-01-01T00:00:00").lte("now")) .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r2); + OpenSearchAssertions.assertAllSuccessful(r2); assertThat(r2.getHits().getTotalHits().value, equalTo(9L)); assertCacheState(client, "index", 1, 1); @@ -242,7 +242,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setQuery(QueryBuilders.rangeQuery("d").gte("2013-01-01T00:00:00").lte("now")) .addAggregation(new GlobalAggregationBuilder("global")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r3); + OpenSearchAssertions.assertAllSuccessful(r3); assertThat(r3.getHits().getTotalHits().value, equalTo(9L)); assertCacheState(client, "index", 2, 1); } @@ -276,7 +276,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index-1", "index-2", "index-3").setFlush(true) .get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); ensureSearchable("index-1", "index-2", "index-3"); @@ -288,7 +288,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setSearchType(SearchType.QUERY_THEN_FETCH) .setSize(0) .setQuery(QueryBuilders.rangeQuery("d").gte("now-7d/d").lte("now")).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index-1", 0, 1); assertCacheState(client, "index-2", 0, 1); @@ -302,7 +302,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setSize(0) .setQuery(QueryBuilders.rangeQuery("d").gte("now-7d/d").lte("now")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r2); + OpenSearchAssertions.assertAllSuccessful(r2); assertThat(r2.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index-1", 1, 1); assertCacheState(client, "index-2", 1, 1); @@ -313,7 +313,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setSize(0) .setQuery(QueryBuilders.rangeQuery("d").gte("now-7d/d").lte("now")) .get(); - ElasticsearchAssertions.assertAllSuccessful(r3); + OpenSearchAssertions.assertAllSuccessful(r3); assertThat(r3.getHits().getTotalHits().value, equalTo(8L)); assertCacheState(client, "index-1", 2, 1); assertCacheState(client, "index-2", 2, 1); @@ -342,7 +342,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); ensureSearchable("index"); @@ -351,14 +351,14 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // If size > 0 we should no cache by default final SearchResponse r1 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(1) .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-19").lte("2016-03-25")).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 0); // If search type is DFS_QUERY_THEN_FETCH we should not cache final SearchResponse r2 = client.prepareSearch("index").setSearchType(SearchType.DFS_QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-20").lte("2016-03-26")).get(); - ElasticsearchAssertions.assertAllSuccessful(r2); + OpenSearchAssertions.assertAllSuccessful(r2); assertThat(r2.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 0); @@ -366,7 +366,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { // the cache flag is explicitly set on the request final SearchResponse r3 = client.prepareSearch("index").setSearchType(SearchType.DFS_QUERY_THEN_FETCH).setSize(0) .setRequestCache(true).setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-20").lte("2016-03-26")).get(); - ElasticsearchAssertions.assertAllSuccessful(r3); + OpenSearchAssertions.assertAllSuccessful(r3); assertThat(r3.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 0); @@ -374,14 +374,14 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { final SearchResponse r5 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setRequestCache(true).setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-20").lte("2016-03-26")) .addAggregation(dateRange("foo").field("s").addRange("now-10y", "now")).get(); - ElasticsearchAssertions.assertAllSuccessful(r5); + OpenSearchAssertions.assertAllSuccessful(r5); assertThat(r5.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 0); // If size > 1 and cache flag is set on the request we should cache final SearchResponse r6 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(1) .setRequestCache(true).setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-21").lte("2016-03-27")).get(); - ElasticsearchAssertions.assertAllSuccessful(r6); + OpenSearchAssertions.assertAllSuccessful(r6); assertThat(r6.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 2); @@ -389,7 +389,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { final SearchResponse r4 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setRequestCache(true).setQuery(QueryBuilders.rangeQuery("s").gte("2016-03-20").lte("2016-03-26")) .addAggregation(filter("foo", QueryBuilders.rangeQuery("s").from("now-10y").to("now"))).get(); - ElasticsearchAssertions.assertAllSuccessful(r4); + OpenSearchAssertions.assertAllSuccessful(r4); assertThat(r4.getHits().getTotalHits().value, equalTo(7L)); assertCacheState(client, "index", 0, 4); } @@ -407,30 +407,30 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { DateTimeFormatter.ISO_LOCAL_DATE.format(now)).get(); // Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get(); - ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse); + OpenSearchAssertions.assertAllSuccessful(forceMergeResponse); refresh(); assertCacheState(client, "index", 0, 0); SearchResponse r1 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("created_at").gte("now-7d/d")).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(1L)); assertCacheState(client, "index", 0, 1); r1 = client.prepareSearch("index").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0) .setQuery(QueryBuilders.rangeQuery("created_at").gte("now-7d/d")).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(1L)); assertCacheState(client, "index", 1, 1); r1 = client.prepareSearch("last_week").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(1L)); assertCacheState(client, "index", 1, 2); r1 = client.prepareSearch("last_week").setSearchType(SearchType.QUERY_THEN_FETCH).setSize(0).get(); - ElasticsearchAssertions.assertAllSuccessful(r1); + OpenSearchAssertions.assertAllSuccessful(r1); assertThat(r1.getHits().getTotalHits().value, equalTo(1L)); assertCacheState(client, "index", 2, 2); } @@ -461,7 +461,7 @@ public class IndicesRequestCacheIT extends ESIntegTestCase { .setQuery(QueryBuilders.termQuery("k", "hello")) .get(); assertSearchResponse(resp); - ElasticsearchAssertions.assertAllSuccessful(resp); + OpenSearchAssertions.assertAllSuccessful(resp); assertThat(resp.getHits().getTotalHits().value, equalTo(1L)); if (profile == false) { if (i == 1) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java index 01790a04dc6..427094a8a91 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.indices.analysis; +package org.opensearch.indices.analysis; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.elasticsearch.Version; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.Version; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -33,13 +33,13 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.VersionUtils.randomVersion; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.VersionUtils.randomVersion; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class PreBuiltAnalyzerIntegrationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class PreBuiltAnalyzerIntegrationIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/analyze/AnalyzeActionIT.java similarity index 98% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/analyze/AnalyzeActionIT.java index 209a825f3e3..c26947b35d6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/analyze/AnalyzeActionIT.java @@ -16,16 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.analyze; + +package org.opensearch.indices.analyze; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.analyze.AnalyzeAction; import org.opensearch.action.admin.indices.analyze.AnalyzeRequestBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.MockKeywordPlugin; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.MockKeywordPlugin; import org.hamcrest.core.IsNull; import java.io.IOException; @@ -36,14 +37,14 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.startsWith; @ClusterScope(minNumDataNodes = 2) -public class AnalyzeActionIT extends ESIntegTestCase { +public class AnalyzeActionIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/exists/indices/IndicesExistsIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/exists/indices/IndicesExistsIT.java index 3a4a08d7657..a03a401ca83 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/exists/indices/IndicesExistsIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.indices.exists.indices; +package org.opensearch.indices.exists.indices; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequest; import org.opensearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class IndicesExistsIT extends ESIntegTestCase { +public class IndicesExistsIT extends OpenSearchIntegTestCase { // Indices exists never throws IndexMissingException, the indices options control its behaviour (return true or false) public void testIndicesExists() throws Exception { assertFalse(client().admin().indices().prepareExists("foo").get().isExists()); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/exists/types/TypesExistsIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/exists/types/TypesExistsIT.java index 31e6492f362..09bd602f083 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/exists/types/TypesExistsIT.java @@ -16,31 +16,31 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.exists.types; +package org.opensearch.indices.exists.types; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.admin.indices.exists.types.TypesExistsResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; -public class TypesExistsIT extends ESIntegTestCase { +public class TypesExistsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/flush/FlushIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/flush/FlushIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/flush/FlushIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/flush/FlushIT.java index 83b88b87fc7..e4eacb7793f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/flush/FlushIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/flush/FlushIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.flush; +package org.opensearch.indices.flush; import org.apache.lucene.index.Term; import org.opensearch.action.ActionListener; @@ -25,35 +25,35 @@ import org.opensearch.action.admin.indices.flush.FlushResponse; import org.opensearch.action.admin.indices.flush.SyncedFlushResponse; import org.opensearch.action.admin.indices.stats.IndexStats; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.ValidationException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.engine.InternalEngine; -import org.elasticsearch.index.engine.InternalEngineTests; -import org.elasticsearch.index.mapper.ParsedDocument; -import org.elasticsearch.index.mapper.Uid; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardTestCase; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndexingMemoryController; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.common.UUIDs; +import org.opensearch.common.ValidationException; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.engine.InternalEngine; +import org.opensearch.index.engine.InternalEngineTests; +import org.opensearch.index.mapper.ParsedDocument; +import org.opensearch.index.mapper.Uid; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardTestCase; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndexingMemoryController; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; import java.io.IOException; import java.util.Arrays; @@ -68,7 +68,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.emptyArray; import static org.hamcrest.Matchers.emptyIterable; @@ -76,8 +76,8 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class FlushIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class FlushIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/ConcurrentDynamicTemplateIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/ConcurrentDynamicTemplateIT.java index 95d8e1079b6..35219f01391 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/ConcurrentDynamicTemplateIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.HashMap; import java.util.List; @@ -32,11 +32,11 @@ import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.emptyIterable; -public class ConcurrentDynamicTemplateIT extends ESIntegTestCase { +public class ConcurrentDynamicTemplateIT extends OpenSearchIntegTestCase { private final String mappingType = "test-mapping"; // see #3544 diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java index 280aa5be8bf..da525006366 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; import org.junit.Before; -import static org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import static org.elasticsearch.test.ESIntegTestCase.Scope; +import static org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import static org.opensearch.test.OpenSearchIntegTestCase.Scope; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java index c9403851486..17205fe4ce8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/LegacyUpdateMappingIntegrationIT.java @@ -17,18 +17,18 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Map; @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.not; -public class LegacyUpdateMappingIntegrationIT extends ESIntegTestCase { +public class LegacyUpdateMappingIntegrationIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetFieldMappingsIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetFieldMappingsIT.java index 2a75264a44c..56ea3d92f88 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetFieldMappingsIT.java @@ -17,19 +17,18 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetadata; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.hamcrest.Matchers; +import org.opensearch.common.Strings; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.Arrays; @@ -38,21 +37,21 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class SimpleGetFieldMappingsIT extends ESIntegTestCase { +public class SimpleGetFieldMappingsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetMappingsIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetMappingsIT.java index 60761fb5ef4..56b6d28790d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/SimpleGetMappingsIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.common.Priority; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_METADATA_BLOCK; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -public class SimpleGetMappingsIT extends ESIntegTestCase { +public class SimpleGetMappingsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/UpdateMappingIntegrationIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/mapping/UpdateMappingIntegrationIT.java index 3adb652b0c6..549c85ddc83 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/mapping/UpdateMappingIntegrationIT.java @@ -17,30 +17,31 @@ * under the License. */ -package org.elasticsearch.indices.mapping; +package org.opensearch.indices.mapping; import org.opensearch.action.admin.indices.mapping.get.GetMappingsResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.action.index.MappingUpdatedAction; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.mapper.MappedFieldType; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.action.index.MappingUpdatedAction; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.Priority; +import org.opensearch.common.collect.ImmutableOpenMap; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.common.xcontent.support.XContentMapValues; +import org.opensearch.index.IndexService; +import org.opensearch.index.mapper.MappedFieldType; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.hamcrest.Matchers; import java.util.ArrayList; @@ -54,17 +55,17 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -public class UpdateMappingIntegrationIT extends ESIntegTestCase { +public class UpdateMappingIntegrationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerNoopIT.java similarity index 79% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerNoopIT.java index b609bc98654..6c99db32199 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerNoopIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.indices.memory.breaker; +package org.opensearch.indices.memory.breaker; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.client.Client; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.breaker.HierarchyCircuitBreakerService; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.cardinality; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; /** Tests for the noop breakers, which are non-dynamic settings */ -@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE, numDataNodes=0) -public class CircuitBreakerNoopIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope= OpenSearchIntegTestCase.Scope.SUITE, numDataNodes=0) +public class CircuitBreakerNoopIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerServiceIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerServiceIT.java index df8dc345f2e..2a3011173e9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/CircuitBreakerServiceIT.java @@ -17,36 +17,37 @@ * under the License. */ -package org.elasticsearch.indices.memory.breaker; +package org.opensearch.indices.memory.breaker; -import org.elasticsearch.ExceptionsHelper; +import org.opensearch.ExceptionsHelper; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.breaker.CircuitBreakingException; -import org.elasticsearch.common.breaker.NoopCircuitBreaker; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.indices.breaker.CircuitBreakerStats; -import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.breaker.CircuitBreakingException; +import org.opensearch.common.breaker.NoopCircuitBreaker; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.indices.breaker.CircuitBreakerStats; +import org.opensearch.indices.breaker.HierarchyCircuitBreakerService; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; + import org.junit.After; import org.junit.Before; @@ -57,13 +58,14 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Stream; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.BREAKER; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.cardinality; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.OpenSearchIntegTestCase.Scope.TEST; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; + import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.Matchers.equalTo; @@ -74,7 +76,7 @@ import static org.hamcrest.Matchers.nullValue; * Integration tests for InternalCircuitBreakerService */ @ClusterScope(scope = TEST, numClientNodes = 0, maxNumDataNodes = 1) -public class CircuitBreakerServiceIT extends ESIntegTestCase { +public class CircuitBreakerServiceIT extends OpenSearchIntegTestCase { /** Reset all breaker settings back to their defaults */ private void reset() { logger.info("--> resetting breaker settings"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java index a80de88ada6..21ff48aa28c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java @@ -17,35 +17,36 @@ * under the License. */ -package org.elasticsearch.indices.memory.breaker; +package org.opensearch.indices.memory.breaker; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.FilterDirectoryReader; import org.apache.lucene.index.LeafReader; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.engine.MockEngineSupport; -import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.common.Strings; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.fielddata.cache.IndicesFieldDataCache; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.engine.MockEngineSupport; +import org.opensearch.test.engine.ThrowingLeafReaderWrapper; import java.io.IOException; import java.util.ArrayList; @@ -56,13 +57,14 @@ import java.util.Random; import java.util.concurrent.ExecutionException; import static org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest.Metric.BREAKER; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; + import static org.hamcrest.Matchers.equalTo; /** * Tests for the circuit breaker while random exceptions are happening */ -public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase { +public class RandomExceptionCircuitBreakerIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(RandomExceptionDirectoryReaderWrapper.TestPlugin.class); @@ -241,7 +243,7 @@ public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase { private final double lowLevelRatio; ThrowingSubReaderWrapper(Settings settings) { - final long seed = ESIntegTestCase.INDEX_TEST_SEED_SETTING.get(settings); + final long seed = OpenSearchIntegTestCase.INDEX_TEST_SEED_SETTING.get(settings); this.topLevelRatio = EXCEPTION_TOP_LEVEL_RATIO_SETTING.get(settings); this.lowLevelRatio = EXCEPTION_LOW_LEVEL_RATIO_SETTING.get(settings); this.random = new Random(seed); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/DanglingIndicesIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/recovery/DanglingIndicesIT.java index c83cc0aedea..088f9c93f36 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/DanglingIndicesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/DanglingIndicesIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.indices.recovery; +package org.opensearch.indices.recovery; import org.opensearch.action.admin.indices.dangling.DanglingIndexInfo; import org.opensearch.action.admin.indices.dangling.delete.DeleteDanglingIndexRequest; @@ -25,22 +25,22 @@ import org.opensearch.action.admin.indices.dangling.import_index.ImportDanglingI import org.opensearch.action.admin.indices.dangling.list.ListDanglingIndicesRequest; import org.opensearch.action.admin.indices.dangling.list.ListDanglingIndicesResponse; import org.opensearch.action.admin.indices.dangling.list.NodeListDanglingIndicesResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.IndicesService; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.IndicesService; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.InternalTestCluster; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.cluster.metadata.IndexGraveyard.SETTING_MAX_TOMBSTONES; -import static org.elasticsearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexGraveyard.SETTING_MAX_TOMBSTONES; +import static org.opensearch.gateway.DanglingIndicesState.AUTO_IMPORT_DANGLING_INDICES_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -56,10 +56,10 @@ import static org.hamcrest.Matchers.notNullValue; *

See also DanglingIndicesRestIT in the qa:smoke-test-http * project. * - * @see org.elasticsearch.action.admin.indices.dangling + * @see org.opensearch.action.admin.indices.dangling */ -@ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.TEST) -public class DanglingIndicesIT extends ESIntegTestCase { +@ClusterScope(numDataNodes = 0, scope = OpenSearchIntegTestCase.Scope.TEST) +public class DanglingIndicesIT extends OpenSearchIntegTestCase { private static final String INDEX_NAME = "test-idx-1"; private static final String OTHER_INDEX_NAME = INDEX_NAME + "-other"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexPrimaryRelocationIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexPrimaryRelocationIT.java index 02ad4d147a4..2ea9241f65e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexPrimaryRelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexPrimaryRelocationIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.indices.recovery; +package org.opensearch.indices.recovery; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.hotthreads.NodeHotThreads; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class IndexPrimaryRelocationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class IndexPrimaryRelocationIT extends OpenSearchIntegTestCase { private static final int RELOCATION_COUNT = 15; @@ -108,8 +108,8 @@ public class IndexPrimaryRelocationIT extends ESIntegTestCase { finished.set(true); indexingThread.join(); refresh("test"); - ElasticsearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true).get(), numAutoGenDocs.get()); - ElasticsearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true)// extra paranoia ;) + OpenSearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true).get(), numAutoGenDocs.get()); + OpenSearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true)// extra paranoia ;) .setQuery(QueryBuilders.termQuery("auto", true)).get(), numAutoGenDocs.get()); } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java index 42f4dd9df5f..89242e9cd7d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/IndexRecoveryIT.java @@ -17,12 +17,13 @@ * under the License. */ -package org.elasticsearch.indices.recovery; +package org.opensearch.indices.recovery; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.SetOnce; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; + +import org.opensearch.OpenSearchException; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; @@ -34,88 +35,88 @@ import org.opensearch.action.admin.indices.recovery.RecoveryResponse; import org.opensearch.action.admin.indices.stats.CommonStatsFlags; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.action.support.replication.ReplicationResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.NodeConnectionsService; -import org.elasticsearch.cluster.action.shard.ShardStateAction; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.RecoverySource.PeerRecoverySource; -import org.elasticsearch.cluster.routing.RecoverySource.SnapshotRecoverySource; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.breaker.CircuitBreakingException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.analysis.AbstractTokenFilterFactory; -import org.elasticsearch.index.analysis.TokenFilterFactory; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.index.recovery.RecoveryStats; -import org.elasticsearch.index.seqno.ReplicationTracker; -import org.elasticsearch.index.seqno.RetentionLeases; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.index.store.Store; -import org.elasticsearch.index.store.StoreStats; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.NodeIndicesStats; -import org.elasticsearch.indices.analysis.AnalysisModule; -import org.elasticsearch.indices.flush.SyncedFlushUtil; -import org.elasticsearch.indices.recovery.RecoveryState.Stage; -import org.elasticsearch.node.NodeClosedException; -import org.elasticsearch.node.RecoverySettingsChunkSizePlugin; -import org.elasticsearch.plugins.AnalysisPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.repositories.Repository; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.snapshots.Snapshot; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.tasks.Task; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.engine.MockEngineSupport; -import org.elasticsearch.test.store.MockFSIndexStore; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.test.transport.StubbableTransport; -import org.elasticsearch.transport.ConnectTransportException; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportChannel; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestHandler; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.action.support.replication.ReplicationResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.NodeConnectionsService; +import org.opensearch.cluster.action.shard.ShardStateAction; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.cluster.routing.RecoverySource; +import org.opensearch.cluster.routing.RecoverySource.PeerRecoverySource; +import org.opensearch.cluster.routing.RecoverySource.SnapshotRecoverySource; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.routing.allocation.command.AllocateEmptyPrimaryAllocationCommand; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.breaker.CircuitBreakingException; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.EsRejectedExecutionException; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.analysis.AbstractTokenFilterFactory; +import org.opensearch.index.analysis.TokenFilterFactory; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.index.recovery.RecoveryStats; +import org.opensearch.index.seqno.ReplicationTracker; +import org.opensearch.index.seqno.RetentionLeases; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.ShardId; +import org.opensearch.index.store.Store; +import org.opensearch.index.store.StoreStats; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.NodeIndicesStats; +import org.opensearch.indices.analysis.AnalysisModule; +import org.opensearch.indices.flush.SyncedFlushUtil; +import org.opensearch.indices.recovery.RecoveryState.Stage; +import org.opensearch.node.NodeClosedException; +import org.opensearch.node.RecoverySettingsChunkSizePlugin; +import org.opensearch.plugins.AnalysisPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.repositories.Repository; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.snapshots.Snapshot; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.tasks.Task; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.engine.MockEngineSupport; +import org.opensearch.test.store.MockFSIndexStore; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.test.transport.StubbableTransport; +import org.opensearch.transport.ConnectTransportException; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportChannel; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestHandler; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.ArrayList; @@ -141,9 +142,10 @@ import static java.util.Collections.singletonMap; import static java.util.stream.Collectors.toList; import static org.opensearch.action.DocWriteResponse.Result.CREATED; import static org.opensearch.action.DocWriteResponse.Result.UPDATED; -import static org.elasticsearch.node.RecoverySettingsChunkSizePlugin.CHUNK_SIZE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.node.RecoverySettingsChunkSizePlugin.CHUNK_SIZE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; + import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; @@ -156,7 +158,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.not; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndexRecoveryIT extends ESIntegTestCase { +public class IndexRecoveryIT extends OpenSearchIntegTestCase { private static final String INDEX_NAME = "test-idx-1"; private static final String INDEX_TYPE = "test-type-1"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/ReplicaToPrimaryPromotionIT.java similarity index 82% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/recovery/ReplicaToPrimaryPromotionIT.java index 75024a79d04..759afdc19c4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/ReplicaToPrimaryPromotionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/recovery/ReplicaToPrimaryPromotionIT.java @@ -16,27 +16,27 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.recovery; +package org.opensearch.indices.recovery; import org.opensearch.action.admin.indices.close.CloseIndexResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.Locale; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(numDataNodes = 2) -public class ReplicaToPrimaryPromotionIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 2) +public class ReplicaToPrimaryPromotionIT extends OpenSearchIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/GetSettingsBlocksIT.java similarity index 74% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/settings/GetSettingsBlocksIT.java index 11db230bad5..ea6368d9922 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/GetSettingsBlocksIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.indices.settings; +package org.opensearch.indices.settings; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.mapper.FieldMapper; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.mapper.FieldMapper; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; -public class GetSettingsBlocksIT extends ESIntegTestCase { +public class GetSettingsBlocksIT extends OpenSearchIntegTestCase { public void testGetSettingsWithBlocks() throws Exception { assertAcked(prepareCreate("test") .setSettings(Settings.builder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/InternalSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/InternalSettingsIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/settings/InternalSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/settings/InternalSettingsIT.java index cc2e5dc044b..2e4fb0d96a3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/InternalSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/InternalSettingsIT.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.indices.settings; +package org.opensearch.indices.settings; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasToString; -public class InternalSettingsIT extends ESIntegTestCase { +public class InternalSettingsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java index 2552f4d3a77..1ecd6432041 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/PrivateSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/PrivateSettingsIT.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.indices.settings; +package org.opensearch.indices.settings; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.common.ValidationException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.ValidationException; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasToString; import static org.hamcrest.Matchers.instanceOf; -public class PrivateSettingsIT extends ESIntegTestCase { +public class PrivateSettingsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateNumberOfReplicasIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateNumberOfReplicasIT.java index 4ec6d598f2d..a807899807f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateNumberOfReplicasIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.indices.settings; +package org.opensearch.indices.settings; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.EnumSet; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class UpdateNumberOfReplicasIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class UpdateNumberOfReplicasIT extends OpenSearchIntegTestCase { @Override protected int maximumNumberOfReplicas() { return 1; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateSettingsIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateSettingsIT.java index b9ec401e2ab..4fa14533534 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/settings/UpdateSettingsIT.java @@ -17,44 +17,44 @@ * under the License. */ -package org.elasticsearch.indices.settings; +package org.opensearch.indices.settings; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.IndexModule; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.IndexModule; +import org.opensearch.index.IndexService; +import org.opensearch.index.VersionType; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.threadpool.ThreadPool; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.nullValue; -public class UpdateSettingsIT extends ESIntegTestCase { +public class UpdateSettingsIT extends OpenSearchIntegTestCase { public void testInvalidUpdateOnClosedIndex() { createIndex("test"); assertAcked(client().admin().indices().prepareClose("test").get()); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexDisableCloseAllIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexDisableCloseAllIT.java index 7d6a2fbca24..6aad6f65a39 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexDisableCloseAllIT.java @@ -16,18 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.state; +package org.opensearch.indices.state; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.close.TransportCloseIndexAction; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.junit.After; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -public class CloseIndexDisableCloseAllIT extends ESIntegTestCase { +public class CloseIndexDisableCloseAllIT extends OpenSearchIntegTestCase { @After public void afterTest() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexIT.java index cd1e3155648..e3001550d3a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseIndexIT.java @@ -16,34 +16,35 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.state; -import org.elasticsearch.ExceptionsHelper; +package org.opensearch.indices.state; + +import org.opensearch.ExceptionsHelper; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.admin.indices.close.CloseIndexRequestBuilder; import org.opensearch.action.admin.indices.close.CloseIndexResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MetadataIndexStateService; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.indices.IndexClosedException; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MetadataIndexStateService; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.util.set.Sets; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.indices.IndexClosedException; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.ArrayList; import java.util.Arrays; @@ -55,10 +56,10 @@ import java.util.stream.IntStream; import static java.util.Collections.emptySet; import static java.util.stream.Collectors.toList; -import static org.elasticsearch.action.support.IndicesOptions.lenientExpandOpen; -import static org.elasticsearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.action.support.IndicesOptions.lenientExpandOpen; +import static org.opensearch.search.internal.SearchContext.TRACK_TOTAL_HITS_ACCURATE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; @@ -68,7 +69,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class CloseIndexIT extends ESIntegTestCase { +public class CloseIndexIT extends OpenSearchIntegTestCase { private static final int MAX_DOCS = 25_000; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseWhileRelocatingShardsIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/CloseWhileRelocatingShardsIT.java index a4403dc3b41..af47f675e77 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/CloseWhileRelocatingShardsIT.java @@ -16,34 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.state; +package org.opensearch.indices.state; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.allocation.command.AllocationCommands; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance; -import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.ConcurrentCollections; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.recovery.PeerRecoverySourceService; -import org.elasticsearch.indices.recovery.StartRecoveryRequest; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.test.transport.StubbableTransport; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.allocation.command.AllocationCommands; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider.Rebalance; +import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.ConcurrentCollections; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.recovery.PeerRecoverySourceService; +import org.opensearch.indices.recovery.StartRecoveryRequest; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.test.transport.StubbableTransport; +import org.opensearch.transport.TransportService; import java.util.ArrayList; import java.util.Collection; @@ -56,15 +56,15 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; import static java.util.Collections.singletonList; -import static org.elasticsearch.indices.state.CloseIndexIT.assertException; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsClosed; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsOpened; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.indices.state.CloseIndexIT.assertException; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsClosed; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsOpened; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class CloseWhileRelocatingShardsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class CloseWhileRelocatingShardsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/OpenCloseIndexIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/OpenCloseIndexIT.java index 37825f873f8..1b7eed650d2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/OpenCloseIndexIT.java @@ -17,51 +17,51 @@ * under the License. */ -package org.elasticsearch.indices.state; +package org.opensearch.indices.state; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.open.OpenIndexResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.QueryBuilders; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.QueryBuilders; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Arrays; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsClosed; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsOpened; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_METADATA; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_READ; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_BLOCKS_WRITE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_READ_ONLY_ALLOW_DELETE; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsClosed; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsOpened; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -public class OpenCloseIndexIT extends ESIntegTestCase { +public class OpenCloseIndexIT extends OpenSearchIntegTestCase { public void testSimpleCloseOpen() { Client client = client(); createIndex("test1"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/ReopenWhileClosingIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/ReopenWhileClosingIT.java index d5a361a20aa..5bcbc227f8b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/ReopenWhileClosingIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.indices.state; +package org.opensearch.indices.state; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.indices.close.CloseIndexResponse; import org.opensearch.action.admin.indices.close.TransportVerifyShardBeforeCloseAction; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.Glob; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.lease.Releasable; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.RunOnce; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.Glob; +import org.opensearch.common.Strings; +import org.opensearch.common.lease.Releasable; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.RunOnce; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.ArrayList; import java.util.Collection; @@ -43,16 +43,16 @@ import java.util.concurrent.TimeUnit; import static java.util.Collections.emptySet; import static java.util.Collections.singletonList; -import static org.elasticsearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsClosed; -import static org.elasticsearch.indices.state.CloseIndexIT.assertIndexIsOpened; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsClosed; +import static org.opensearch.indices.state.CloseIndexIT.assertIndexIsOpened; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class ReopenWhileClosingIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class ReopenWhileClosingIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/state/SimpleIndexStateIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/state/SimpleIndexStateIT.java index f15843f46d1..a6d1b8298a2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/state/SimpleIndexStateIT.java @@ -17,29 +17,31 @@ * under the License. */ -package org.elasticsearch.indices.state; +package org.opensearch.indices.state; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; + import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.admin.indices.open.OpenIndexResponse; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.indices.IndexClosedException; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.indices.IndexClosedException; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SimpleIndexStateIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SimpleIndexStateIT extends OpenSearchIntegTestCase { private final Logger logger = LogManager.getLogger(SimpleIndexStateIT.class); public void testSimpleOpenClose() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/IndexStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/stats/IndexStatsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/stats/IndexStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/stats/IndexStatsIT.java index eac9e004aeb..cfb6e663932 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/IndexStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/stats/IndexStatsIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.indices.stats; +package org.opensearch.indices.stats; import org.apache.lucene.util.LuceneTestCase.SuppressCodecs; import org.opensearch.action.DocWriteResponse; @@ -32,37 +32,37 @@ import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; import org.opensearch.action.admin.indices.stats.IndicesStatsRequestBuilder; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.support.DefaultShardOperationFailedException; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexModule; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.MergePolicyConfig; -import org.elasticsearch.index.MergeSchedulerConfig; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.cache.query.QueryCacheStats; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.translog.Translog; -import org.elasticsearch.indices.IndicesQueryCache; -import org.elasticsearch.indices.IndicesRequestCache; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.support.DefaultShardOperationFailedException; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.BytesStreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexModule; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.MergePolicyConfig; +import org.opensearch.index.MergeSchedulerConfig; +import org.opensearch.index.VersionType; +import org.opensearch.index.cache.query.QueryCacheStats; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.translog.Translog; +import org.opensearch.indices.IndicesQueryCache; +import org.opensearch.indices.IndicesRequestCache; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.ArrayList; @@ -83,11 +83,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -98,7 +98,7 @@ import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = Scope.SUITE, numDataNodes = 2, numClientNodes = 0) @SuppressCodecs("*") // requires custom completion format -public class IndexStatsIT extends ESIntegTestCase { +public class IndexStatsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -431,7 +431,7 @@ public class IndexStatsIT extends ESIntegTestCase { } // Optimize & flush and wait; else we sometimes get a "Delete Index failed - not acked" - // when ESIntegTestCase.after tries to remove indices created by the test: + // when OpenSearchIntegTestCase.after tries to remove indices created by the test: logger.info("test: now optimize"); client().admin().indices().prepareForceMerge("test").get(); flush(); @@ -1111,7 +1111,7 @@ public class IndexStatsIT extends ESIntegTestCase { * Test that we can safely concurrently index and get stats. This test was inspired by a serialization issue that arose due to a race * getting doc stats during heavy indexing. The race could lead to deleted docs being negative which would then be serialized as a * variable-length long. Since serialization of negative longs using a variable-length format was unsupported - * ({@link org.elasticsearch.common.io.stream.StreamOutput#writeVLong(long)}), the stream would become corrupted. Here, we want to test + * ({@link org.opensearch.common.io.stream.StreamOutput#writeVLong(long)}), the stream would become corrupted. Here, we want to test * that we can continue to get stats while indexing. */ public void testConcurrentIndexingAndStatsRequests() throws BrokenBarrierException, InterruptedException, ExecutionException { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/stats/LegacyIndexStatsIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/stats/LegacyIndexStatsIT.java index e1c19401970..e94acd5ebbf 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/stats/LegacyIndexStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/stats/LegacyIndexStatsIT.java @@ -17,23 +17,24 @@ * under the License. */ -package org.elasticsearch.indices.stats; +package org.opensearch.indices.stats; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.admin.indices.stats.IndicesStatsRequestBuilder; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; -public class LegacyIndexStatsIT extends ESIntegTestCase { +public class LegacyIndexStatsIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/store/IndicesStoreIntegrationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/store/IndicesStoreIntegrationIT.java index 04989962b63..0da6a137cb5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/store/IndicesStoreIntegrationIT.java @@ -17,44 +17,44 @@ * under the License. */ -package org.elasticsearch.indices.store; +package org.opensearch.indices.store; import org.apache.logging.log4j.Logger; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.cluster.routing.RoutingNode; -import org.elasticsearch.cluster.routing.RoutingTable; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.TestShardRouting; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.service.ClusterApplier.ClusterApplyListener; -import org.elasticsearch.cluster.service.ClusterApplierService; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.env.Environment; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.disruption.BlockClusterStateProcessing; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.ConnectTransportException; -import org.elasticsearch.transport.TransportMessageListener; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.cluster.routing.RoutingNode; +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.command.MoveAllocationCommand; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.service.ClusterApplier.ClusterApplyListener; +import org.opensearch.cluster.service.ClusterApplierService; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.env.Environment; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.Index; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.disruption.BlockClusterStateProcessing; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.ConnectTransportException; +import org.opensearch.transport.TransportMessageListener; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.nio.file.Files; @@ -66,13 +66,13 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import static java.lang.Thread.sleep; -import static org.elasticsearch.test.NodeRoles.nonDataNode; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.NodeRoles.nonDataNode; +import static org.opensearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndicesStoreIntegrationIT extends ESIntegTestCase { +public class IndicesStoreIntegrationIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { // simplify this and only use a single data path return Settings.builder().put(super.nodeSettings(nodeOrdinal)).put(Environment.PATH_DATA_SETTING.getKey(), createTempDir()) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/template/ComposableTemplateIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/template/ComposableTemplateIT.java index 35fdb76b862..f5462ccb821 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/ComposableTemplateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/template/ComposableTemplateIT.java @@ -17,27 +17,28 @@ * under the License. */ -package org.elasticsearch.indices.template; +package org.opensearch.indices.template; import org.opensearch.action.admin.indices.template.put.PutComponentTemplateAction; import org.opensearch.action.admin.indices.template.put.PutComposableIndexTemplateAction; -import org.elasticsearch.cluster.metadata.ComponentTemplate; -import org.elasticsearch.cluster.metadata.ComposableIndexTemplate; -import org.elasticsearch.cluster.metadata.Template; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.collect.List; -import org.elasticsearch.common.compress.CompressedXContent; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; + +import org.opensearch.cluster.metadata.ComponentTemplate; +import org.opensearch.cluster.metadata.ComposableIndexTemplate; +import org.opensearch.cluster.metadata.Template; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.collect.List; +import org.opensearch.common.compress.CompressedXContent; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Collections; import static org.hamcrest.Matchers.equalTo; -public class ComposableTemplateIT extends ESIntegTestCase { +public class ComposableTemplateIT extends OpenSearchIntegTestCase { // See: https://github.com/elastic/elasticsearch/issues/58643 public void testComponentTemplatesCanBeUpdatedAfterRestart() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/template/IndexTemplateBlocksIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/template/IndexTemplateBlocksIT.java index c648caaae85..19d6ae06c3f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/template/IndexTemplateBlocksIT.java @@ -17,22 +17,23 @@ * under the License. */ -package org.elasticsearch.indices.template; +package org.opensearch.indices.template; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; + +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.io.IOException; import java.util.Collections; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertBlocked; import static org.hamcrest.Matchers.hasSize; -@ClusterScope(scope = ESIntegTestCase.Scope.TEST) -public class IndexTemplateBlocksIT extends ESIntegTestCase { +@ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST) +public class IndexTemplateBlocksIT extends OpenSearchIntegTestCase { public void testIndexTemplatesWithBlocks() throws IOException { // creates a simple index template client().admin().indices().preparePutTemplate("template_blocks") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/template/SimpleIndexTemplateIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java rename to server/src/internalClusterTest/java/org/opensearch/indices/template/SimpleIndexTemplateIT.java index a99de8ae2fc..b4581e300e7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/template/SimpleIndexTemplateIT.java @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.indices.template; + +package org.opensearch.indices.template; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.admin.indices.alias.Alias; @@ -24,23 +25,25 @@ import org.opensearch.action.admin.indices.alias.get.GetAliasesResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse; import org.opensearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.AliasMetadata; -import org.elasticsearch.common.ParsingException; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.indices.InvalidAliasNameException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; + +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.AliasMetadata; +import org.opensearch.common.ParsingException; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.indices.InvalidAliasNameException; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.junit.After; import java.io.IOException; @@ -52,11 +55,11 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; @@ -68,7 +71,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class SimpleIndexTemplateIT extends ESIntegTestCase { +public class SimpleIndexTemplateIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestClientIT.java b/server/src/internalClusterTest/java/org/opensearch/ingest/IngestClientIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestClientIT.java rename to server/src/internalClusterTest/java/org/opensearch/ingest/IngestClientIT.java index b68410e9a47..091ae0bd6cd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestClientIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/ingest/IngestClientIT.java @@ -17,33 +17,33 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.ExceptionsHelper; +import org.opensearch.OpenSearchException; +import org.opensearch.OpenSearchParseException; +import org.opensearch.ExceptionsHelper; import org.opensearch.action.DocWriteResponse; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.ingest.DeletePipelineRequest; -import org.elasticsearch.action.ingest.GetPipelineRequest; -import org.elasticsearch.action.ingest.GetPipelineResponse; -import org.elasticsearch.action.ingest.PutPipelineRequest; -import org.elasticsearch.action.ingest.SimulateDocumentBaseResult; -import org.elasticsearch.action.ingest.SimulatePipelineRequest; -import org.elasticsearch.action.ingest.SimulatePipelineResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.action.update.UpdateRequest; -import org.elasticsearch.client.Requests; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.ingest.DeletePipelineRequest; +import org.opensearch.action.ingest.GetPipelineRequest; +import org.opensearch.action.ingest.GetPipelineResponse; +import org.opensearch.action.ingest.PutPipelineRequest; +import org.opensearch.action.ingest.SimulateDocumentBaseResult; +import org.opensearch.action.ingest.SimulatePipelineRequest; +import org.opensearch.action.ingest.SimulatePipelineResponse; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.action.update.UpdateRequest; +import org.opensearch.client.Requests; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Collection; @@ -51,16 +51,16 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.NodeRoles.nonIngestNode; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.NodeRoles.nonIngestNode; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class IngestClientIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class IngestClientIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java index a37706e1730..907f25532c6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/ingest/IngestProcessorNotInstalledOnAllNodesIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.node.NodeService; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchParseException; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.node.NodeService; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(numDataNodes = 0, numClientNodes = 0, scope = ESIntegTestCase.Scope.TEST) -public class IngestProcessorNotInstalledOnAllNodesIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 0, numClientNodes = 0, scope = OpenSearchIntegTestCase.Scope.TEST) +public class IngestProcessorNotInstalledOnAllNodesIT extends OpenSearchIntegTestCase { private final BytesReference pipelineSource; private volatile boolean installPlugin; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/mget/SimpleMgetIT.java b/server/src/internalClusterTest/java/org/opensearch/mget/SimpleMgetIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/mget/SimpleMgetIT.java rename to server/src/internalClusterTest/java/org/opensearch/mget/SimpleMgetIT.java index eccf08ce2da..e12a3ddee99 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/mget/SimpleMgetIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/mget/SimpleMgetIT.java @@ -16,34 +16,35 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.mget; -import org.elasticsearch.OpenSearchException; +package org.opensearch.mget; + +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.get.MultiGetItemResponse; -import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.get.MultiGetRequestBuilder; -import org.elasticsearch.action.get.MultiGetResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.search.fetch.subphase.FetchSourceContext; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.get.MultiGetItemResponse; +import org.opensearch.action.get.MultiGetRequest; +import org.opensearch.action.get.MultiGetRequestBuilder; +import org.opensearch.action.get.MultiGetResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.search.fetch.subphase.FetchSourceContext; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Map; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; -public class SimpleMgetIT extends ESIntegTestCase { +public class SimpleMgetIT extends OpenSearchIntegTestCase { public void testThatMgetShouldWorkWithOneIndexMissing() throws IOException { createIndex("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java b/server/src/internalClusterTest/java/org/opensearch/nodesinfo/SimpleNodesInfoIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java rename to server/src/internalClusterTest/java/org/opensearch/nodesinfo/SimpleNodesInfoIT.java index 2f2107af8c8..f47077c882d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/nodesinfo/SimpleNodesInfoIT.java @@ -17,29 +17,31 @@ * under the License. */ -package org.elasticsearch.nodesinfo; +package org.opensearch.nodesinfo; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.node.info.NodesInfoResponse; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.concurrent.EsExecutors; -import org.elasticsearch.monitor.os.OsInfo; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.concurrent.EsExecutors; +import org.opensearch.monitor.os.OsInfo; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.util.List; import static org.opensearch.action.admin.cluster.node.info.NodesInfoRequest.Metric.INDICES; -import static org.elasticsearch.client.Requests.nodesInfoRequest; + +import static org.opensearch.client.Requests.nodesInfoRequest; + import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; @ClusterScope(scope= Scope.TEST, numDataNodes = 0) -public class SimpleNodesInfoIT extends ESIntegTestCase { +public class SimpleNodesInfoIT extends OpenSearchIntegTestCase { public void testNodesInfos() throws Exception { List nodesIds = internalCluster().startNodes(2); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java b/server/src/internalClusterTest/java/org/opensearch/operateAllIndices/DestructiveOperationsIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java rename to server/src/internalClusterTest/java/org/opensearch/operateAllIndices/DestructiveOperationsIT.java index 156c5fd25cb..067b01ffdaf 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/operateAllIndices/DestructiveOperationsIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.operateAllIndices; +package org.opensearch.operateAllIndices; import com.carrotsearch.hppc.cursors.ObjectObjectCursor; -import org.elasticsearch.action.support.DestructiveOperations; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.DestructiveOperations; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.After; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class DestructiveOperationsIT extends ESIntegTestCase { +public class DestructiveOperationsIT extends OpenSearchIntegTestCase { @After public void afterTest() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java b/server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorFullRestartIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java rename to server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorFullRestartIT.java index ab2820e5b2d..ed0211782a8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorFullRestartIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorFullRestartIT.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.common.UUIDs; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Collection; @@ -35,8 +35,8 @@ import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, minNumDataNodes = 1) -public class PersistentTasksExecutorFullRestartIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, minNumDataNodes = 1) +public class PersistentTasksExecutorFullRestartIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java b/server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java rename to server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorIT.java index 77c3fa90f65..1c3ff483210 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/persistent/PersistentTasksExecutorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/persistent/PersistentTasksExecutorIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; -import org.elasticsearch.ResourceAlreadyExistsException; -import org.elasticsearch.ResourceNotFoundException; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; -import org.elasticsearch.persistent.PersistentTasksService.WaitForPersistentTaskListener; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.State; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestTasksRequestBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.tasks.TaskId; -import org.elasticsearch.tasks.TaskInfo; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ResourceAlreadyExistsException; +import org.opensearch.ResourceNotFoundException; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.common.UUIDs; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.persistent.PersistentTasksService.WaitForPersistentTaskListener; +import org.opensearch.persistent.TestPersistentTasksPlugin.State; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestTasksRequestBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.tasks.TaskId; +import org.opensearch.tasks.TaskInfo; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.After; import org.junit.Before; @@ -43,7 +43,7 @@ import java.util.Collections; import java.util.List; import java.util.Objects; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -51,8 +51,8 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.Is.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, minNumDataNodes = 2) -public class PersistentTasksExecutorIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, minNumDataNodes = 2) +public class PersistentTasksExecutorIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java b/server/src/internalClusterTest/java/org/opensearch/persistent/decider/EnableAssignmentDeciderIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java rename to server/src/internalClusterTest/java/org/opensearch/persistent/decider/EnableAssignmentDeciderIT.java index 041f7be2233..fafdc92d3b6 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/persistent/decider/EnableAssignmentDeciderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/persistent/decider/EnableAssignmentDeciderIT.java @@ -16,32 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent.decider; + +package org.opensearch.persistent.decider; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata; -import org.elasticsearch.persistent.PersistentTasksService; -import org.elasticsearch.persistent.TestPersistentTasksPlugin; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestParams; -import org.elasticsearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.persistent.PersistentTasksCustomMetadata; +import org.opensearch.persistent.PersistentTasksService; +import org.opensearch.persistent.TestPersistentTasksPlugin; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestParams; +import org.opensearch.persistent.TestPersistentTasksPlugin.TestPersistentTasksExecutor; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.concurrent.CountDownLatch; import static java.util.Collections.singletonList; -import static org.elasticsearch.persistent.decider.EnableAssignmentDecider.Allocation; -import static org.elasticsearch.persistent.decider.EnableAssignmentDecider.CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.persistent.decider.EnableAssignmentDecider.Allocation; +import static org.opensearch.persistent.decider.EnableAssignmentDecider.CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 1) -public class EnableAssignmentDeciderIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 1) +public class EnableAssignmentDeciderIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/recovery/FullRollingRestartIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/recovery/FullRollingRestartIT.java rename to server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java index 98f1b239a2c..0ea16972f8b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/recovery/FullRollingRestartIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/FullRollingRestartIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.recovery; +package org.opensearch.recovery; import org.opensearch.action.admin.cluster.health.ClusterHealthRequestBuilder; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.recovery.RecoveryResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.RecoverySource; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.common.Priority; +import org.opensearch.common.collect.MapBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0.0) -public class FullRollingRestartIT extends ESIntegTestCase { +public class FullRollingRestartIT extends OpenSearchIntegTestCase { protected void assertTimeout(ClusterHealthRequestBuilder requestBuilder) { ClusterHealthResponse clusterHealth = requestBuilder.get(); if (clusterHealth.isTimedOut()) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/RecoveryWhileUnderLoadIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java rename to server/src/internalClusterTest/java/org/opensearch/recovery/RecoveryWhileUnderLoadIT.java index 4d302d336cf..faf7e22f501 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/RecoveryWhileUnderLoadIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.recovery; +package org.opensearch.recovery; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.admin.indices.refresh.RefreshResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.CollectionUtils; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.shard.DocsStats; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.index.translog.Translog; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.CollectionUtils; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.shard.DocsStats; +import org.opensearch.index.shard.ShardId; +import org.opensearch.index.translog.Translog; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Collection; @@ -53,15 +53,15 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout; -public class RecoveryWhileUnderLoadIT extends ESIntegTestCase { +public class RecoveryWhileUnderLoadIT extends OpenSearchIntegTestCase { private final Logger logger = LogManager.getLogger(RecoveryWhileUnderLoadIT.class); public static final class RetentionLeaseSyncIntervalSettingPlugin extends Plugin { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/recovery/RelocationIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/RelocationIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/recovery/RelocationIT.java rename to server/src/internalClusterTest/java/org/opensearch/recovery/RelocationIT.java index 3f362e29656..be4163e5e74 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/recovery/RelocationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/RelocationIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.recovery; +package org.opensearch.recovery; import com.carrotsearch.hppc.IntHashSet; import com.carrotsearch.hppc.cursors.ObjectCursor; @@ -28,49 +28,49 @@ import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.seqno.ReplicationTracker; -import org.elasticsearch.index.seqno.RetentionLease; -import org.elasticsearch.index.shard.IndexEventListener; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.IndexShardState; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.indices.recovery.RecoveryFileChunkRequest; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.test.BackgroundIndexer; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.MockIndexEventListener; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.test.transport.StubbableTransport; -import org.elasticsearch.transport.Transport; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.allocation.command.MoveAllocationCommand; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Nullable; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.index.IndexService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.seqno.ReplicationTracker; +import org.opensearch.index.seqno.RetentionLease; +import org.opensearch.index.shard.IndexEventListener; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.IndexShardState; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.indices.recovery.RecoveryFileChunkRequest; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.test.BackgroundIndexer; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.MockIndexEventListener; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.test.transport.StubbableTransport; +import org.opensearch.transport.Transport; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.nio.file.FileVisitResult; @@ -91,11 +91,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.in; @@ -103,7 +103,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class RelocationIT extends ESIntegTestCase { +public class RelocationIT extends OpenSearchIntegTestCase { private final TimeValue ACCEPTABLE_RELOCATION_TIME = new TimeValue(5, TimeUnit.MINUTES); @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/recovery/SimpleRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/SimpleRecoveryIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/recovery/SimpleRecoveryIT.java rename to server/src/internalClusterTest/java/org/opensearch/recovery/SimpleRecoveryIT.java index b1c0ec5beab..4010a6ec216 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/recovery/SimpleRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/SimpleRecoveryIT.java @@ -17,23 +17,24 @@ * under the License. */ -package org.elasticsearch.recovery; +package org.opensearch.recovery; import org.opensearch.action.admin.indices.flush.FlushResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.get.GetResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.client.Requests.flushRequest; +import static org.opensearch.client.Requests.getRequest; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.client.Requests.refreshRequest; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.client.Requests.flushRequest; -import static org.elasticsearch.client.Requests.getRequest; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.client.Requests.refreshRequest; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; -public class SimpleRecoveryIT extends ESIntegTestCase { +public class SimpleRecoveryIT extends OpenSearchIntegTestCase { @Override public Settings indexSettings() { return Settings.builder().put(super.indexSettings()).put(recoverySettings()).build(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java b/server/src/internalClusterTest/java/org/opensearch/recovery/TruncatedRecoveryIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java rename to server/src/internalClusterTest/java/org/opensearch/recovery/TruncatedRecoveryIT.java index 01dd36023d8..df9fb997cfa 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/recovery/TruncatedRecoveryIT.java @@ -17,25 +17,25 @@ * under the License. */ -package org.elasticsearch.recovery; +package org.opensearch.recovery; import org.apache.lucene.util.English; import org.apache.lucene.util.LuceneTestCase.SuppressCodecs; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.indices.recovery.RecoveryFileChunkRequest; -import org.elasticsearch.node.RecoverySettingsChunkSizePlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.indices.recovery.RecoveryFileChunkRequest; +import org.opensearch.node.RecoverySettingsChunkSizePlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportService; import java.util.ArrayList; import java.util.Arrays; @@ -45,14 +45,14 @@ import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.node.RecoverySettingsChunkSizePlugin.CHUNK_SIZE_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.node.RecoverySettingsChunkSizePlugin.CHUNK_SIZE_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.greaterThanOrEqualTo; -@ESIntegTestCase.ClusterScope(numDataNodes = 2, numClientNodes = 0, scope = ESIntegTestCase.Scope.TEST) +@OpenSearchIntegTestCase.ClusterScope(numDataNodes = 2, numClientNodes = 0, scope = OpenSearchIntegTestCase.Scope.TEST) @SuppressCodecs("*") // test relies on exact file extensions -public class TruncatedRecoveryIT extends ESIntegTestCase { +public class TruncatedRecoveryIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/repositories/RepositoriesServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/repositories/RepositoriesServiceIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/repositories/RepositoriesServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/repositories/RepositoriesServiceIT.java index 8a9bedb4b4c..a94b30c6c38 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/repositories/RepositoriesServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/repositories/RepositoriesServiceIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.repositories; +package org.opensearch.repositories; import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.RepositoryMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.RepositoryMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.fs.FsRepository; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.sameInstance; -public class RepositoriesServiceIT extends ESIntegTestCase { +public class RepositoriesServiceIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java b/server/src/internalClusterTest/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java rename to server/src/internalClusterTest/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java index 78f17f34488..836a091e1c7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/repositories/blobstore/BlobStoreRepositoryCleanupIT.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.repositories.blobstore; +package org.opensearch.repositories.blobstore; import org.opensearch.action.ActionRunnable; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.RepositoryCleanupInProgress; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.snapshots.AbstractSnapshotIntegTestCase; -import org.elasticsearch.snapshots.SnapshotState; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.cluster.RepositoryCleanupInProgress; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.snapshots.AbstractSnapshotIntegTestCase; +import org.opensearch.snapshots.SnapshotState; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.ByteArrayInputStream; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class BlobStoreRepositoryCleanupIT extends AbstractSnapshotIntegTestCase { public void testMasterFailoverDuringCleanup() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java b/server/src/internalClusterTest/java/org/opensearch/repositories/fs/FsBlobStoreRepositoryIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java rename to server/src/internalClusterTest/java/org/opensearch/repositories/fs/FsBlobStoreRepositoryIT.java index 17ec86924fd..4c5086a8d39 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/repositories/fs/FsBlobStoreRepositoryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/repositories/fs/FsBlobStoreRepositoryIT.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.repositories.fs; +package org.opensearch.repositories.fs; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.common.blobstore.BlobContainer; -import org.elasticsearch.common.blobstore.BlobPath; -import org.elasticsearch.common.blobstore.fs.FsBlobStore; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.repositories.blobstore.ESBlobStoreRepositoryIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.common.blobstore.BlobContainer; +import org.opensearch.common.blobstore.BlobPath; +import org.opensearch.common.blobstore.fs.FsBlobStore; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.repositories.blobstore.ESBlobStoreRepositoryIntegTestCase; import java.io.IOException; import java.nio.file.Files; @@ -35,8 +35,8 @@ import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.util.stream.Stream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.instanceOf; public class FsBlobStoreRepositoryIT extends ESBlobStoreRepositoryIntegTestCase { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasResolveRoutingIT.java b/server/src/internalClusterTest/java/org/opensearch/routing/AliasResolveRoutingIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/routing/AliasResolveRoutingIT.java rename to server/src/internalClusterTest/java/org/opensearch/routing/AliasResolveRoutingIT.java index 27cba0cf4ac..1275e19d1db 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasResolveRoutingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/routing/AliasResolveRoutingIT.java @@ -17,27 +17,27 @@ * under the License. */ -package org.elasticsearch.routing; +package org.opensearch.routing; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.common.Priority; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.common.Priority; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.common.util.set.Sets.newHashSet; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.common.util.set.Sets.newHashSet; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -public class AliasResolveRoutingIT extends ESIntegTestCase { +public class AliasResolveRoutingIT extends OpenSearchIntegTestCase { // see https://github.com/elastic/elasticsearch/issues/13278 public void testSearchClosedWildcardIndex() throws ExecutionException, InterruptedException { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasRoutingIT.java b/server/src/internalClusterTest/java/org/opensearch/routing/AliasRoutingIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/routing/AliasRoutingIT.java rename to server/src/internalClusterTest/java/org/opensearch/routing/AliasRoutingIT.java index d780d3f36d8..f158a4aa9b5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/routing/AliasRoutingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/routing/AliasRoutingIT.java @@ -17,26 +17,27 @@ * under the License. */ -package org.elasticsearch.routing; +package org.opensearch.routing; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.client.Requests; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; /** * Test aliases with routing. */ -public class AliasRoutingIT extends ESIntegTestCase { +public class AliasRoutingIT extends OpenSearchIntegTestCase { @Override protected int minimumNumberOfShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/routing/PartitionedRoutingIT.java b/server/src/internalClusterTest/java/org/opensearch/routing/PartitionedRoutingIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/routing/PartitionedRoutingIT.java rename to server/src/internalClusterTest/java/org/opensearch/routing/PartitionedRoutingIT.java index 248ced106b3..5f90ccce32f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/routing/PartitionedRoutingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/routing/PartitionedRoutingIT.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.routing; +package org.opensearch.routing; import org.apache.lucene.util.Constants; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; import org.mockito.internal.util.collections.Sets; import java.util.HashMap; @@ -33,7 +33,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -public class PartitionedRoutingIT extends ESIntegTestCase { +public class PartitionedRoutingIT extends OpenSearchIntegTestCase { public void testVariousPartitionSizes() throws Exception { for (int shards = 1; shards <= 4; shards++) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java b/server/src/internalClusterTest/java/org/opensearch/routing/SimpleRoutingIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java rename to server/src/internalClusterTest/java/org/opensearch/routing/SimpleRoutingIT.java index bf11c2aa6f6..b39bbf748d4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/routing/SimpleRoutingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/routing/SimpleRoutingIT.java @@ -17,41 +17,41 @@ * under the License. */ -package org.elasticsearch.routing; +package org.opensearch.routing; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.DocWriteRequest; import org.opensearch.action.RoutingMissingException; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.explain.ExplainResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.get.MultiGetRequest; -import org.elasticsearch.action.get.MultiGetResponse; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.action.termvectors.MultiTermVectorsResponse; -import org.elasticsearch.action.termvectors.TermVectorsRequest; -import org.elasticsearch.action.termvectors.TermVectorsResponse; -import org.elasticsearch.action.update.UpdateRequest; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.OperationRouting; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.shard.ShardId; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.explain.ExplainResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.get.MultiGetRequest; +import org.opensearch.action.get.MultiGetResponse; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.action.termvectors.MultiTermVectorsResponse; +import org.opensearch.action.termvectors.TermVectorsRequest; +import org.opensearch.action.termvectors.TermVectorsResponse; +import org.opensearch.action.update.UpdateRequest; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.client.Requests; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.OperationRouting; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.shard.ShardId; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.nullValue; -public class SimpleRoutingIT extends ESIntegTestCase { +public class SimpleRoutingIT extends OpenSearchIntegTestCase { @Override protected int minimumNumberOfShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/script/StoredScriptsIT.java b/server/src/internalClusterTest/java/org/opensearch/script/StoredScriptsIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/script/StoredScriptsIT.java rename to server/src/internalClusterTest/java/org/opensearch/script/StoredScriptsIT.java index a1a82c88819..87b6cb6e9b9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/script/StoredScriptsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/script/StoredScriptsIT.java @@ -16,13 +16,13 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.script; +package org.opensearch.script; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Collection; @@ -30,9 +30,9 @@ import java.util.Collections; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -public class StoredScriptsIT extends ESIntegTestCase { +public class StoredScriptsIT extends OpenSearchIntegTestCase { private static final int SCRIPT_MAX_SIZE_IN_BYTES = 64; private static final String LANG = MockScriptEngine.NAME; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java b/server/src/internalClusterTest/java/org/opensearch/search/SearchCancellationIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/SearchCancellationIT.java index 32de1bf19d4..20ba34213b2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/SearchCancellationIT.java @@ -17,34 +17,35 @@ * under the License. */ -package org.elasticsearch.search; +package org.opensearch.search; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.ExceptionsHelper; + +import org.opensearch.ExceptionsHelper; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.search.MultiSearchAction; -import org.elasticsearch.action.search.MultiSearchResponse; -import org.elasticsearch.action.search.SearchAction; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchScrollAction; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.PluginsService; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.lookup.LeafFieldsLookup; -import org.elasticsearch.tasks.TaskCancelledException; -import org.elasticsearch.tasks.TaskInfo; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.search.MultiSearchAction; +import org.opensearch.action.search.MultiSearchResponse; +import org.opensearch.action.search.SearchAction; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchScrollAction; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.PluginsService; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.lookup.LeafFieldsLookup; +import org.opensearch.tasks.TaskCancelledException; +import org.opensearch.tasks.TaskInfo; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Collection; @@ -55,17 +56,17 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; -import static org.elasticsearch.index.query.QueryBuilders.scriptQuery; -import static org.elasticsearch.search.SearchCancellationIT.ScriptedBlockPlugin.SCRIPT_NAME; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.index.query.QueryBuilders.scriptQuery; +import static org.opensearch.search.SearchCancellationIT.ScriptedBlockPlugin.SCRIPT_NAME; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class SearchCancellationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class SearchCancellationIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java b/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java similarity index 79% rename from server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java index f3d4d12c93f..d38ccc6c556 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchTimeoutIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/SearchTimeoutIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.search; +package org.opensearch.search; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -35,13 +35,13 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Function; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.index.query.QueryBuilders.scriptQuery; -import static org.elasticsearch.search.SearchTimeoutIT.ScriptedTimeoutPlugin.SCRIPT_NAME; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.index.query.QueryBuilders.scriptQuery; +import static org.opensearch.search.SearchTimeoutIT.ScriptedTimeoutPlugin.SCRIPT_NAME; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class SearchTimeoutIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class SearchTimeoutIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithRejectionsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/SearchWithRejectionsIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithRejectionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/SearchWithRejectionsIT.java index 11d87c828b9..cd5eadb070a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/SearchWithRejectionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/SearchWithRejectionsIT.java @@ -17,22 +17,23 @@ * under the License. */ -package org.elasticsearch.search; +package org.opensearch.search; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; + +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class SearchWithRejectionsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class SearchWithRejectionsIT extends OpenSearchIntegTestCase { @Override public Settings nodeSettings(int nodeOrdinal) { return Settings.builder().put(super.nodeSettings(nodeOrdinal)) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/StressSearchServiceReaperIT.java b/server/src/internalClusterTest/java/org/opensearch/search/StressSearchServiceReaperIT.java similarity index 73% rename from server/src/internalClusterTest/java/org/elasticsearch/search/StressSearchServiceReaperIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/StressSearchServiceReaperIT.java index 95d873b3e7a..ee870b98857 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/StressSearchServiceReaperIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/StressSearchServiceReaperIT.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search; +package org.opensearch.search; import org.apache.lucene.util.English; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.OpenSearchIntegTestCase.Scope.SUITE; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; @ClusterScope(scope = SUITE) -public class StressSearchServiceReaperIT extends ESIntegTestCase { +public class StressSearchServiceReaperIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/AggregationsIntegrationIT.java similarity index 78% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/AggregationsIntegrationIT.java index 1aabeb60af3..3a20df66120 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/AggregationsIntegrationIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; -@ESIntegTestCase.SuiteScopeTestCase -public class AggregationsIntegrationIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class AggregationsIntegrationIT extends OpenSearchIntegTestCase { static int numDocs; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/CombiIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/CombiIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/CombiIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/CombiIT.java index 4e2394ac458..0a1fdf5d934 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/CombiIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/CombiIT.java @@ -17,31 +17,31 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; import com.carrotsearch.hppc.IntIntHashMap; import com.carrotsearch.hppc.IntIntMap; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.missing.Missing; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.missing.Missing; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.missing; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.missing; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.core.IsNull.notNullValue; -public class CombiIT extends ESIntegTestCase { +public class CombiIT extends OpenSearchIntegTestCase { /** * Making sure that if there are multiple aggregations, working on the same field, yet require different diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/EquivalenceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/EquivalenceIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/EquivalenceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/EquivalenceIT.java index d7500f15b78..e3ddc7349a3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/EquivalenceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/EquivalenceIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; import com.carrotsearch.hppc.IntHashSet; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket; -import org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.range.Range.Bucket; +import org.opensearch.search.aggregations.bucket.range.RangeAggregationBuilder; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregatorFactory; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.After; import org.junit.Before; @@ -53,20 +53,20 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.min; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentiles; -import static org.elasticsearch.search.aggregations.AggregationBuilders.range; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.min; +import static org.opensearch.search.aggregations.AggregationBuilders.percentiles; +import static org.opensearch.search.aggregations.AggregationBuilders.range; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; @@ -74,7 +74,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * Additional tests that aim at testing more complex aggregation trees on larger random datasets, so that things like * the growth of dynamic arrays is tested. */ -public class EquivalenceIT extends ESIntegTestCase { +public class EquivalenceIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/FiltersAggsRewriteIT.java similarity index 77% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/FiltersAggsRewriteIT.java index 56441e90a2d..b2390bdba80 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/FiltersAggsRewriteIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/FiltersAggsRewriteIT.java @@ -17,25 +17,25 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.WrapperQueryBuilder; -import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregator; -import org.elasticsearch.search.aggregations.bucket.filter.InternalFilters; -import org.elasticsearch.test.ESSingleNodeTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.WrapperQueryBuilder; +import org.opensearch.search.aggregations.bucket.filter.FiltersAggregationBuilder; +import org.opensearch.search.aggregations.bucket.filter.FiltersAggregator; +import org.opensearch.search.aggregations.bucket.filter.InternalFilters; +import org.opensearch.test.OpenSearchSingleNodeTestCase; import java.io.IOException; import java.util.HashMap; import java.util.Map; -public class FiltersAggsRewriteIT extends ESSingleNodeTestCase { +public class FiltersAggsRewriteIT extends OpenSearchSingleNodeTestCase { public void testWrapperQueryIsRewritten() throws IOException { createIndex("test", Settings.EMPTY, "test", "title", "type=text"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MetadataIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/MetadataIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MetadataIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/MetadataIT.java index dc55a264004..9201f946538 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MetadataIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/MetadataIT.java @@ -17,28 +17,28 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.InternalBucketMetricValue; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.InternalBucketMetricValue; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.maxBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.maxBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; -public class MetadataIT extends ESIntegTestCase { +public class MetadataIT extends OpenSearchIntegTestCase { public void testMetadataSetOnAggregationResult() throws Exception { assertAcked(client().admin().indices().prepareCreate("idx") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MissingValueIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/MissingValueIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MissingValueIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/MissingValueIT.java index 1b0fbf5bbcd..9eabb95e704 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/MissingValueIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/MissingValueIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations; +package org.opensearch.search.aggregations; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; -import org.elasticsearch.search.aggregations.metrics.Cardinality; -import org.elasticsearch.search.aggregations.metrics.GeoBounds; -import org.elasticsearch.search.aggregations.metrics.GeoCentroid; -import org.elasticsearch.search.aggregations.metrics.Percentiles; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; +import org.opensearch.search.aggregations.metrics.Cardinality; +import org.opensearch.search.aggregations.metrics.GeoBounds; +import org.opensearch.search.aggregations.metrics.GeoCentroid; +import org.opensearch.search.aggregations.metrics.Percentiles; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geoBounds; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geoCentroid; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentiles; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.search.aggregations.AggregationBuilders.cardinality; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.geoBounds; +import static org.opensearch.search.aggregations.AggregationBuilders.geoCentroid; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.percentiles; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; -@ESIntegTestCase.SuiteScopeTestCase -public class MissingValueIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class MissingValueIT extends OpenSearchIntegTestCase { @Override protected int maximumNumberOfShards() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/AdjacencyMatrixIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/AdjacencyMatrixIT.java index 570bfde0b5b..4eafa442384 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/AdjacencyMatrixIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/AdjacencyMatrixIT.java @@ -17,45 +17,45 @@ * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrix; -import org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrix.Bucket; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.adjacency.AdjacencyMatrix; +import org.opensearch.search.aggregations.bucket.adjacency.AdjacencyMatrix.Bucket; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.adjacencyMatrix; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.adjacencyMatrix; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class AdjacencyMatrixIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class AdjacencyMatrixIT extends OpenSearchIntegTestCase { static int numDocs, numSingleTag1Docs, numSingleTag2Docs, numTag1Docs, numTag2Docs, numMultiTagDocs; static final int MAX_NUM_FILTERS = 3; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/BooleanTermsIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/BooleanTermsIT.java index 8cbdcc41a98..ad762e2dbf0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/BooleanTermsIT.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class BooleanTermsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class BooleanTermsIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "b_value"; private static final String MULTI_VALUED_FIELD_NAME = "b_values"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramIT.java index 1415e7f6e83..34178ff7d49 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramIT.java @@ -16,36 +16,36 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.bootstrap.JavaVersion; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.time.DateFormatters; -import org.elasticsearch.common.time.DateMathParser; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.index.query.MatchNoneQueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationExecutionException; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.LongBounds; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.bootstrap.JavaVersion; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.time.DateFormatters; +import org.opensearch.common.time.DateMathParser; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.mapper.DateFieldMapper; +import org.opensearch.index.query.MatchNoneQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationExecutionException; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.LongBounds; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.histogram.InternalDateHistogram; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import org.junit.After; @@ -66,24 +66,24 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class DateHistogramIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class DateHistogramIT extends OpenSearchIntegTestCase { static Map> expectedMultiSortBuckets; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramOffsetIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramOffsetIT.java index 0fab4073e33..9070372c2ee 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateHistogramOffsetIT.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.time.DateFormatters; -import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.time.DateFormatters; +import org.opensearch.index.mapper.DateFieldMapper; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.After; import org.junit.Before; @@ -34,9 +34,9 @@ import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; @@ -46,9 +46,9 @@ import static org.hamcrest.core.IsNull.notNullValue; * DateHistogramTests so the AssertingLocalTransport for these tests can be set to only use versions 1.4 onwards while keeping the other * tests using all versions */ -@ESIntegTestCase.SuiteScopeTestCase -@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE) -public class DateHistogramOffsetIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.ClusterScope(scope= OpenSearchIntegTestCase.Scope.SUITE) +public class DateHistogramOffsetIT extends OpenSearchIntegTestCase { private static final String DATE_FORMAT = "yyyy-MM-dd:hh-mm-ss"; private static final DateFormatter FORMATTER = DateFormatter.forPattern(DATE_FORMAT); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateRangeIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateRangeIT.java index e676532e859..aa42c085d91 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DateRangeIT.java @@ -16,23 +16,23 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.DateRangeAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.DateRangeAggregationBuilder; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.range.Range.Bucket; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.time.ZoneId; @@ -48,13 +48,13 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateRange; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.dateRange; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; @@ -62,8 +62,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class DateRangeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class DateRangeIT extends OpenSearchIntegTestCase { private static IndexRequestBuilder indexDoc(int month, int day, int value) throws Exception { return client().prepareIndex("idx", "type").setSource(jsonBuilder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DiversifiedSamplerIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DiversifiedSamplerIT.java index b72d017f921..ca450751b34 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DiversifiedSamplerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DiversifiedSamplerIT.java @@ -16,33 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; import org.opensearch.action.admin.indices.refresh.RefreshRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.sampler.Sampler; -import org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregator; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.TermQueryBuilder; +import org.opensearch.search.aggregations.bucket.sampler.DiversifiedAggregationBuilder; +import org.opensearch.search.aggregations.bucket.sampler.Sampler; +import org.opensearch.search.aggregations.bucket.sampler.SamplerAggregator; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sampler; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.sampler; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -51,8 +51,8 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * Tests the Sampler aggregation */ -@ESIntegTestCase.SuiteScopeTestCase -public class DiversifiedSamplerIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class DiversifiedSamplerIT extends OpenSearchIntegTestCase { public static final int NUM_SHARDS = 2; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java index 567778d4c5a..b7c129a6631 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/DoubleTermsIT.java @@ -16,30 +16,30 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.ExtendedStats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -55,24 +55,24 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class DoubleTermsIT extends AbstractTermsTestCase { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FilterIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FilterIT.java index c9a10105695..63f15557941 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FilterIT.java @@ -16,38 +16,38 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class FilterIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class FilterIT extends OpenSearchIntegTestCase { static int numDocs, numTag1Docs; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FiltersIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FiltersIT.java index 0a99aec3836..7d9a55acc3b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/FiltersIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filters; -import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregator.KeyedFilter; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filters; +import org.opensearch.search.aggregations.bucket.filter.FiltersAggregator.KeyedFilter; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.ArrayList; @@ -40,20 +40,20 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filters; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.filters; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class FiltersIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class FiltersIT extends OpenSearchIntegTestCase { static int numDocs, numTag1Docs, numTag2Docs, numOtherDocs; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoDistanceIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoDistanceIT.java index b843b6d3725..3fa57e541e3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoDistanceIT.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.Version; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.DistanceUnit; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.range.Range.Bucket; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import org.hamcrest.Matchers; import java.util.ArrayList; @@ -43,12 +43,12 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geoDistance; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.geoDistance; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; @@ -56,8 +56,8 @@ import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class GeoDistanceIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class GeoDistanceIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { @@ -459,7 +459,7 @@ public class GeoDistanceIT extends ESIntegTestCase { .addAggregation(geoDistance("amsterdam_rings", new GeoPoint(52.3760, 4.894)) .field("location") .unit(DistanceUnit.KILOMETERS) - .distanceType(org.elasticsearch.common.geo.GeoDistance.ARC) + .distanceType(org.opensearch.common.geo.GeoDistance.ARC) .addUnboundedTo(500) .addRange(500, 1000) .addUnboundedFrom(1000)) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoHashGridIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoHashGridIT.java index d9f0fb99e99..067d63b0fd7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GeoHashGridIT.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; import com.carrotsearch.hppc.ObjectIntHashMap; import com.carrotsearch.hppc.ObjectIntMap; import com.carrotsearch.hppc.cursors.ObjectIntCursor; -import org.elasticsearch.Version; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.GeoBoundingBoxQueryBuilder; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.geogrid.GeoGrid; -import org.elasticsearch.search.aggregations.bucket.geogrid.GeoGrid.Bucket; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.GeoBoundingBoxQueryBuilder; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.geogrid.GeoGrid; +import org.opensearch.search.aggregations.bucket.geogrid.GeoGrid.Bucket; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.util.ArrayList; import java.util.Arrays; @@ -44,17 +44,17 @@ import java.util.List; import java.util.Random; import java.util.Set; -import static org.elasticsearch.geometry.utils.Geohash.PRECISION; -import static org.elasticsearch.geometry.utils.Geohash.stringEncode; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geohashGrid; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.geometry.utils.Geohash.PRECISION; +import static org.opensearch.geometry.utils.Geohash.stringEncode; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.geohashGrid; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.SuiteScopeTestCase -public class GeoHashGridIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class GeoHashGridIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GlobalIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GlobalIT.java index cf9269a159a..cca6ebf59a7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/GlobalIT.java @@ -16,31 +16,31 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class GlobalIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class GlobalIT extends OpenSearchIntegTestCase { static int numDocs; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/HistogramIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/HistogramIT.java index 9b2bbdad6ea..a35236d73bc 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/HistogramIT.java @@ -16,31 +16,31 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; import com.carrotsearch.hppc.LongHashSet; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationExecutionException; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.histogram.DoubleBounds; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationExecutionException; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.histogram.DoubleBounds; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.io.IOException; @@ -53,16 +53,16 @@ import java.util.Map; import java.util.function.Function; import static java.util.Collections.emptyMap; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -70,8 +70,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class HistogramIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class HistogramIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; private static final String MULTI_VALUED_FIELD_NAME = "l_values"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpRangeIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpRangeIT.java index efc9ba4eda8..f6c06f871ba 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpRangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpRangeIT.java @@ -16,18 +16,18 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Collection; @@ -35,13 +35,13 @@ import java.util.Collections; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.instanceOf; -@ESIntegTestCase.SuiteScopeTestCase -public class IpRangeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class IpRangeIT extends OpenSearchIntegTestCase { public static class DummyScriptPlugin extends MockScriptPlugin { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpTermsIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpTermsIT.java index dd09e2e79c5..bc48c000d3e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/IpTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/IpTermsIT.java @@ -16,24 +16,24 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.bucket.terms.Terms; import java.util.Collection; import java.util.Collections; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; public class IpTermsIT extends AbstractTermsTestCase { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java index 695ba88c3e1..33b11b52d6b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/LongTermsIT.java @@ -16,30 +16,30 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.ExtendedStats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -55,22 +55,22 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class LongTermsIT extends AbstractTermsTestCase { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/MinDocCountIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/MinDocCountIT.java index b09277aca6c..8c01e0703d9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/MinDocCountIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; import com.carrotsearch.randomizedtesting.generators.RandomStrings; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -56,14 +56,14 @@ import java.util.function.Function; import java.util.regex.Matcher; import java.util.regex.Pattern; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class MinDocCountIT extends AbstractTermsTestCase { private static final QueryBuilder QUERY = QueryBuilders.termQuery("match", true); @@ -152,7 +152,7 @@ public class MinDocCountIT extends AbstractTermsTestCase { YES { @Override TermsAggregationBuilder apply(TermsAggregationBuilder builder, String field) { - return builder.script(new org.elasticsearch.script.Script(ScriptType.INLINE, + return builder.script(new org.opensearch.script.Script(ScriptType.INLINE, CustomScriptPlugin.NAME, "doc['" + field + "']", Collections.emptyMap())); } }; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NaNSortingIT.java similarity index 78% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NaNSortingIT.java index ef0b7420b50..21eb61fb935 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NaNSortingIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.util.Comparators; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.search.aggregations.Aggregation; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.AvgAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats; -import org.elasticsearch.search.aggregations.metrics.ExtendedStatsAggregationBuilder; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.support.ValuesSource; -import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.util.Comparators; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.search.aggregations.Aggregation; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.AvgAggregationBuilder; +import org.opensearch.search.aggregations.metrics.ExtendedStats; +import org.opensearch.search.aggregations.metrics.ExtendedStatsAggregationBuilder; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.support.ValuesSource; +import org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class NaNSortingIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class NaNSortingIT extends OpenSearchIntegTestCase { private enum SubAggregation { AVG("avg") { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NestedIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NestedIT.java index bcbe1ea55e2..602edd6a0db 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/NestedIT.java @@ -16,63 +16,65 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; import org.apache.lucene.search.join.ScoreMode; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.InnerHitBuilder; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.InnerHitBuilder; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.nested.Nested; -import org.elasticsearch.search.aggregations.bucket.terms.LongTerms; -import org.elasticsearch.search.aggregations.bucket.terms.StringTerms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.nested.Nested; +import org.opensearch.search.aggregations.bucket.terms.LongTerms; +import org.opensearch.search.aggregations.bucket.terms.StringTerms; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.hamcrest.Matchers; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.nested; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.nested; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class NestedIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class NestedIT extends OpenSearchIntegTestCase { private static int numParents; private static int[] numChildren; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java index 3cdd5a4e9e4..729b0988dd3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/RangeIT.java @@ -16,25 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.range.Range.Bucket; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.ArrayList; @@ -45,22 +45,22 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.range; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.range; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class RangeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class RangeIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; private static final String MULTI_VALUED_FIELD_NAME = "l_values"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ReverseNestedIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ReverseNestedIT.java index df26b88ae3f..2c16e84db27 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ReverseNestedIT.java @@ -16,48 +16,48 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.nested.Nested; -import org.elasticsearch.search.aggregations.bucket.nested.ReverseNested; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.ValueCount; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.nested.Nested; +import org.opensearch.search.aggregations.bucket.nested.ReverseNested; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.ValueCount; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.count; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.nested; -import static org.elasticsearch.search.aggregations.AggregationBuilders.reverseNested; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.count; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.nested; +import static org.opensearch.search.aggregations.AggregationBuilders.reverseNested; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class ReverseNestedIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class ReverseNestedIT extends OpenSearchIntegTestCase { @Override public void setupSuiteScopeCluster() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SamplerIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SamplerIT.java index c53f3881f1c..ba7f62e1aeb 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SamplerIT.java @@ -16,31 +16,32 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; + +package org.opensearch.search.aggregations.bucket; import org.opensearch.action.admin.indices.refresh.RefreshRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.search.aggregations.bucket.sampler.Sampler; -import org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregator; -import org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.metrics.Max; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.TermQueryBuilder; +import org.opensearch.search.aggregations.bucket.sampler.Sampler; +import org.opensearch.search.aggregations.bucket.sampler.SamplerAggregator; +import org.opensearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.metrics.Max; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sampler; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.sampler; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -49,8 +50,8 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * Tests the Sampler aggregation */ -@ESIntegTestCase.SuiteScopeTestCase -public class SamplerIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class SamplerIT extends OpenSearchIntegTestCase { public static final int NUM_SHARDS = 2; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardReduceIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardReduceIT.java index 97ed2b03d72..297e784d32b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardReduceIT.java @@ -16,39 +16,39 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.geometry.utils.Geohash; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.geogrid.GeoGrid; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.missing.Missing; -import org.elasticsearch.search.aggregations.bucket.nested.Nested; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.geometry.utils.Geohash; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.geogrid.GeoGrid; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.missing.Missing; +import org.opensearch.search.aggregations.bucket.nested.Nested; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateRange; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geohashGrid; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geotileGrid; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.ipRange; -import static org.elasticsearch.search.aggregations.AggregationBuilders.missing; -import static org.elasticsearch.search.aggregations.AggregationBuilders.nested; -import static org.elasticsearch.search.aggregations.AggregationBuilders.range; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.dateRange; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.geohashGrid; +import static org.opensearch.search.aggregations.AggregationBuilders.geotileGrid; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.ipRange; +import static org.opensearch.search.aggregations.AggregationBuilders.missing; +import static org.opensearch.search.aggregations.AggregationBuilders.nested; +import static org.opensearch.search.aggregations.AggregationBuilders.range; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; /** @@ -57,8 +57,8 @@ import static org.hamcrest.Matchers.equalTo; * compute empty buckets, its {@code reduce()} method must be called. So by adding the date histogram under other buckets, * we can make sure that the reduce is properly propagated by checking that empty buckets were created. */ -@ESIntegTestCase.SuiteScopeTestCase -public class ShardReduceIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class ShardReduceIT extends OpenSearchIntegTestCase { private IndexRequestBuilder indexDoc(String date, int value) throws Exception { return client().prepareIndex("idx", "type").setSource(jsonBuilder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardSizeTermsIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardSizeTermsIT.java index 2953324c58c..ef3b9c580d9 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/ShardSizeTermsIT.java @@ -16,19 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.BucketOrder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.BucketOrder; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; import static org.hamcrest.Matchers.equalTo; public class ShardSizeTermsIT extends ShardSizeTestCase { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java index f1eba9623f0..4bdd003bdfe 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java @@ -16,39 +16,39 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.Aggregation; -import org.elasticsearch.search.aggregations.AggregationBuilder; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.bucket.filter.InternalFilter; -import org.elasticsearch.search.aggregations.bucket.terms.SignificantTerms; -import org.elasticsearch.search.aggregations.bucket.terms.SignificantTermsAggregatorFactory; -import org.elasticsearch.search.aggregations.bucket.terms.StringTerms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.ChiSquare; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.GND; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.MutualInformation; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.ScriptHeuristic; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.search.aggregations.bucket.SharedSignificantTermsTestMethods; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.SearchPlugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.Aggregation; +import org.opensearch.search.aggregations.AggregationBuilder; +import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.search.aggregations.bucket.filter.InternalFilter; +import org.opensearch.search.aggregations.bucket.terms.SignificantTerms; +import org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregatorFactory; +import org.opensearch.search.aggregations.bucket.terms.StringTerms; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.heuristic.ChiSquare; +import org.opensearch.search.aggregations.bucket.terms.heuristic.GND; +import org.opensearch.search.aggregations.bucket.terms.heuristic.MutualInformation; +import org.opensearch.search.aggregations.bucket.terms.heuristic.ScriptHeuristic; +import org.opensearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.search.aggregations.bucket.SharedSignificantTermsTestMethods; import java.io.IOException; import java.util.ArrayList; @@ -62,21 +62,21 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.function.Function; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.significantTerms; -import static org.elasticsearch.search.aggregations.AggregationBuilders.significantText; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.significantTerms; +import static org.opensearch.search.aggregations.AggregationBuilders.significantText; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class SignificantTermsSignificanceScoreIT extends OpenSearchIntegTestCase { static final String INDEX_NAME = "testidx"; static final String DOC_TYPE = "_doc"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsDocCountErrorIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsDocCountErrorIT.java index bb330926abe..6ba52619a1c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsDocCountErrorIT.java @@ -17,38 +17,38 @@ * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class TermsDocCountErrorIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class TermsDocCountErrorIT extends OpenSearchIntegTestCase { private static final String STRING_FIELD_NAME = "s_value"; private static final String LONG_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsShardMinDocCountIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsShardMinDocCountIT.java index 444f9b70bac..615146ba5fd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/TermsShardMinDocCountIT.java @@ -16,33 +16,33 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket; +package org.opensearch.search.aggregations.bucket; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.filter.InternalFilter; -import org.elasticsearch.search.aggregations.bucket.terms.SignificantTerms; -import org.elasticsearch.search.aggregations.bucket.terms.SignificantTermsAggregatorFactory; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.filter.InternalFilter; +import org.opensearch.search.aggregations.bucket.terms.SignificantTerms; +import org.opensearch.search.aggregations.bucket.terms.SignificantTermsAggregatorFactory; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.significantTerms; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.significantTerms; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; -public class TermsShardMinDocCountIT extends ESIntegTestCase { +public class TermsShardMinDocCountIT extends OpenSearchIntegTestCase { private static final String index = "someindex"; private static final String type = "testtype"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/terms/StringTermsIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/terms/StringTermsIT.java index 9ba6137384a..dbd09d74408 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/terms/StringTermsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/bucket/terms/StringTermsIT.java @@ -16,37 +16,37 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.bucket.terms; +package org.opensearch.search.aggregations.bucket.terms; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentParseException; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.mapper.IndexFieldMapper; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationExecutionException; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.AbstractTermsTestCase; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.support.ValueType; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentParseException; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.mapper.IndexFieldMapper; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationExecutionException; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.AbstractTermsTestCase; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.metrics.ExtendedStats; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.support.ValueType; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.After; import org.junit.Before; @@ -63,23 +63,23 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class StringTermsIT extends AbstractTermsTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "s_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityIT.java index aa13c6a1dd9..f5cbb298eb4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -40,19 +40,19 @@ import java.util.Map; import java.util.function.Function; import static java.util.Collections.emptyMap; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.cardinality; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class CardinalityIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class CardinalityIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java similarity index 73% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java index 20fcb125c53..f3538ac39a3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/CardinalityWithRequestBreakerIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.common.breaker.CircuitBreakingException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; -import org.elasticsearch.search.aggregations.Aggregator; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.common.breaker.CircuitBreakingException; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.breaker.HierarchyCircuitBreakerService; +import org.opensearch.search.aggregations.Aggregator; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.stream.IntStream; -import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.AggregationBuilders.cardinality; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; -public class CardinalityWithRequestBreakerIT extends ESIntegTestCase { +public class CardinalityWithRequestBreakerIT extends OpenSearchIntegTestCase { /** * Test that searches using cardinality aggregations returns all request breaker memory. @@ -46,7 +46,7 @@ public class CardinalityWithRequestBreakerIT extends ESIntegTestCase { indexRandom(true, IntStream.range(0, randomIntBetween(10, 1000)) .mapToObj(i -> client().prepareIndex("test", "_doc").setId("id_" + i) - .setSource(org.elasticsearch.common.collect.Map.of("field0", randomAlphaOfLength(5), "field1", randomAlphaOfLength(5))) + .setSource(org.opensearch.common.collect.Map.of("field0", randomAlphaOfLength(5), "field1", randomAlphaOfLength(5))) ).toArray(IndexRequestBuilder[]::new)); client().admin().cluster().prepareUpdateSettings() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ExtendedStatsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ExtendedStatsIT.java index 6164a318fd6..58ea8533d33 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ExtendedStatsIT.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.missing.Missing; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats.Bounds; -import org.elasticsearch.search.aggregations.BucketOrder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.missing.Missing; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.ExtendedStats.Bounds; +import org.opensearch.search.aggregations.BucketOrder; import java.util.Collection; import java.util.Collections; @@ -39,17 +39,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.extendedStats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.missing; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.extendedStats; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.missing; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoBoundsIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoBoundsIT.java index baf9aab19dc..0232abdea6d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoBoundsIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.util.BigArray; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.util.BigArray; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.Terms.Bucket; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.List; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geoBounds; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.geoBounds; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.sameInstance; -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class GeoBoundsIT extends AbstractGeoTestCase { private static final String aggName = "geoBounds"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoCentroidIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoCentroidIT.java index 9e9af4e6506..c155c6793a0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/GeoCentroidIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/GeoCentroidIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.geogrid.GeoGrid; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.geogrid.GeoGrid; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.List; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geoCentroid; -import static org.elasticsearch.search.aggregations.AggregationBuilders.geohashGrid; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.geoCentroid; +import static org.opensearch.search.aggregations.AggregationBuilders.geohashGrid; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.sameInstance; /** * Integration Test for GeoCentroid metric aggregator */ -@ESIntegTestCase.SuiteScopeTestCase +@OpenSearchIntegTestCase.SuiteScopeTestCase public class GeoCentroidIT extends AbstractGeoTestCase { private static final String aggName = "geoCentroid"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentileRanksIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentileRanksIT.java index 04d784a3f3b..93e373903fc 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentileRanksIT.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.BucketOrder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.BucketOrder; import java.util.Arrays; import java.util.Collection; @@ -40,17 +40,17 @@ import java.util.List; import java.util.Map; import static java.util.Collections.emptyMap; -import static org.elasticsearch.common.util.CollectionUtils.iterableAsArrayList; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentileRanks; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.util.CollectionUtils.iterableAsArrayList; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.percentileRanks; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentilesIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentilesIT.java index 854667a5fc2..d2cbabcbdd5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/HDRPercentilesIT.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.CollectionUtils; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.CollectionUtils; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; import java.util.Arrays; import java.util.Collection; @@ -43,16 +43,16 @@ import java.util.Map; import java.util.Set; import static java.util.Collections.emptyMap; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentiles; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.percentiles; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java index 0f0921ff9d4..1a63d70f305 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/MedianAbsoluteDeviationIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.bucket.terms.Terms; import java.util.ArrayList; import java.util.Arrays; @@ -45,21 +45,21 @@ import java.util.function.Supplier; import java.util.stream.LongStream; import static java.util.Collections.emptyMap; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.range; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregatorTests.IsCloseToRelative.closeToRelative; -import static org.elasticsearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregatorTests.ExactMedianAbsoluteDeviation.calculateMAD; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.range; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregatorTests.IsCloseToRelative.closeToRelative; +import static org.opensearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregatorTests.ExactMedianAbsoluteDeviation.calculateMAD; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.sameInstance; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ScriptedMetricIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ScriptedMetricIT.java index 2e799b2903b..4bcded2f891 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ScriptedMetricIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.Aggregation; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.support.XContentMapValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.Aggregation; +import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import org.junit.Before; import java.io.IOException; @@ -54,13 +54,13 @@ import java.util.Map; import java.util.function.Consumer; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.scriptedMetric; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.scriptedMetric; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -73,8 +73,8 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.sameInstance; @ClusterScope(scope = Scope.SUITE) -@ESIntegTestCase.SuiteScopeTestCase -public class ScriptedMetricIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class ScriptedMetricIT extends OpenSearchIntegTestCase { private static long numDocs; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/StatsIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/StatsIT.java index 8327a55cd36..6252524c629 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/StatsIT.java @@ -16,37 +16,37 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.BucketOrder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.BucketOrder; import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/SumIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/SumIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/SumIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/SumIT.java index 088b35b8b32..c65d69dba73 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/SumIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/SumIT.java @@ -16,20 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; import org.hamcrest.core.IsNull; import java.util.ArrayList; @@ -37,19 +37,19 @@ import java.util.Collection; import java.util.Collections; import java.util.List; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.METRIC_SCRIPT_ENGINE; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.RANDOM_SCRIPT; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.VALUE_SCRIPT; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.METRIC_SCRIPT_ENGINE; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.RANDOM_SCRIPT; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.VALUE_SCRIPT; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentileRanksIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentileRanksIT.java index b96212fd3c0..0e2571cd25b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentileRanksIT.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.CollectionUtils; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.BucketOrder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.CollectionUtils; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.BucketOrder; import java.util.Arrays; import java.util.Collection; @@ -41,16 +41,16 @@ import java.util.List; import java.util.Map; import static java.util.Collections.emptyMap; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentileRanks; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.percentileRanks; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentilesIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentilesIT.java index c48d7b93b47..f15c0104f47 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TDigestPercentilesIT.java @@ -16,22 +16,22 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.logging.log4j.LogManager; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.CollectionUtils; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.CollectionUtils; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationTestScriptsPlugin; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; import java.util.Arrays; import java.util.Collection; @@ -43,16 +43,16 @@ import java.util.Map; import java.util.Set; import static java.util.Collections.emptyMap; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.percentiles; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.percentiles; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TopHitsIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TopHitsIT.java index 6931c313340..645b0d15964 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/TopHitsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/TopHitsIT.java @@ -16,44 +16,44 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.util.ArrayUtil; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.document.DocumentField; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.seqno.SequenceNumbers; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptEngine; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.nested.Nested; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightField; -import org.elasticsearch.search.rescore.QueryRescorerBuilder; -import org.elasticsearch.search.sort.ScriptSortBuilder.ScriptSortType; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.document.DocumentField; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.MatchAllQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.seqno.SequenceNumbers; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptEngine; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.nested.Nested; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; +import org.opensearch.search.fetch.subphase.highlight.HighlightField; +import org.opensearch.search.rescore.QueryRescorerBuilder; +import org.opensearch.search.sort.ScriptSortBuilder.ScriptSortType; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Collection; @@ -63,23 +63,23 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.common.xcontent.XContentFactory.smileBuilder; -import static org.elasticsearch.common.xcontent.XContentFactory.yamlBuilder; -import static org.elasticsearch.common.xcontent.support.XContentMapValues.extractValue; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.nested; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.AggregationBuilders.topHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.common.xcontent.XContentFactory.smileBuilder; +import static org.opensearch.common.xcontent.XContentFactory.yamlBuilder; +import static org.opensearch.common.xcontent.support.XContentMapValues.extractValue; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.nested; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.AggregationBuilders.topHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -91,8 +91,8 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.sameInstance; -@ESIntegTestCase.SuiteScopeTestCase() -public class TopHitsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase() +public class TopHitsIT extends OpenSearchIntegTestCase { private static final String TERMS_AGGS_FIELD = "terms"; private static final String SORT_FIELD = "sort"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ValueCountIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ValueCountIT.java index bd52b085dca..2ed371d78ea 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/metrics/ValueCountIT.java @@ -16,45 +16,45 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.aggregations.metrics; +package org.opensearch.search.aggregations.metrics; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.count; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.global; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.METRIC_SCRIPT_ENGINE; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.RANDOM_SCRIPT; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.SUM_FIELD_PARAMS_SCRIPT; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.SUM_VALUES_FIELD_SCRIPT; -import static org.elasticsearch.search.aggregations.metrics.MetricAggScriptPlugin.VALUE_FIELD_SCRIPT; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.count; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.global; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.METRIC_SCRIPT_ENGINE; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.RANDOM_SCRIPT; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.SUM_FIELD_PARAMS_SCRIPT; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.SUM_VALUES_FIELD_SCRIPT; +import static org.opensearch.search.aggregations.metrics.MetricAggScriptPlugin.VALUE_FIELD_SCRIPT; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class ValueCountIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class ValueCountIT extends OpenSearchIntegTestCase { @Override public void setupSuiteScopeCluster() throws Exception { createIndex("idx"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/AvgBucketIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/AvgBucketIT.java index e5504ab02d3..6bbfabd4aa0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/AvgBucketIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.avgBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.avgBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class AvgBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class AvgBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketScriptIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketScriptIT.java index 841a0ce7d66..43737ef935d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketScriptIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -44,19 +44,19 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateRange; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.bucketScript; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.dateRange; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketScript; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class BucketScriptIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class BucketScriptIT extends OpenSearchIntegTestCase { private static final String FIELD_1_NAME = "field1"; private static final String FIELD_2_NAME = "field2"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSelectorIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSelectorIT.java index b02aae8031d..362195ec16a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSelectorIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -43,21 +43,21 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.bucketSelector; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.derivative; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketSelector; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.derivative; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class BucketSelectorIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class BucketSelectorIT extends OpenSearchIntegTestCase { private static final String FIELD_1_NAME = "field1"; private static final String FIELD_2_NAME = "field2"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSortIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSortIT.java index 442a34a6c81..85a076c2a52 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/BucketSortIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/BucketSortIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; import org.opensearch.action.ActionRequestValidationException; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.sort.FieldSortBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.time.ZonedDateTime; @@ -39,14 +39,14 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.bucketSort; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.bucketSort; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -54,8 +54,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class BucketSortIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class BucketSortIT extends OpenSearchIntegTestCase { private static final String INDEX = "bucket-sort-it-data-index"; private static final String INDEX_WITH_GAPS = "bucket-sort-it-data-index-with-gaps"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DateDerivativeIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DateDerivativeIT.java index 8de113b3239..37d7cba143d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DateDerivativeIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.time.DateFormatters; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.InternalMultiBucketAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.support.AggregationPath; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.time.DateFormatters; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.InternalMultiBucketAggregation; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.support.AggregationPath; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matcher; import org.junit.After; @@ -44,19 +44,19 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.derivative; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.dateHistogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.derivative; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class DateDerivativeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class DateDerivativeIT extends OpenSearchIntegTestCase { // some index names used during these tests private static final String IDX_DST_START = "idx_dst_start"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DerivativeIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DerivativeIT.java index df88ba95f53..1e640779821 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/DerivativeIT.java @@ -17,47 +17,47 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.InternalMultiBucketAggregation; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.metrics.Stats; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.search.aggregations.support.AggregationPath; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.InternalMultiBucketAggregation; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.metrics.Stats; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.search.aggregations.support.AggregationPath; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filters; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.stats; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.derivative; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.movingAvg; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filters; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.stats; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.derivative; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.movingAvg; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class DerivativeIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class DerivativeIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java index 9155947e3b6..997d76d52aa 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/ExtendedStatsBucketIT.java @@ -17,38 +17,38 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.ExtendedStats.Bounds; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.ExtendedStats.Bounds; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.extendedStatsBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.extendedStatsBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class ExtendedStatsBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class ExtendedStatsBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MaxBucketIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MaxBucketIT.java index 3317fa8f37c..31705fce0eb 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MaxBucketIT.java @@ -17,49 +17,49 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.PipelineAggregatorBuilders; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.PipelineAggregatorBuilders; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder; +import org.opensearch.search.aggregations.bucket.histogram.DateHistogramInterval; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.metrics.SumAggregationBuilder; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.maxBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.aggregations.AggregationBuilders.filter; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.maxBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class MaxBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class MaxBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MinBucketIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MinBucketIT.java index 6f024ef5633..193192878fd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MinBucketIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.minBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.minBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class MinBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class MinBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MovAvgIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MovAvgIT.java index 2c41b2ce2ae..aab294c925d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/MovAvgIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/MovAvgIT.java @@ -17,22 +17,23 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; import org.opensearch.action.ActionRequestValidationException; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.collect.EvictingQueue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.metrics.Avg; -import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.client.Client; +import org.opensearch.common.collect.EvictingQueue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.metrics.Avg; +import org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.hamcrest.Matchers; import java.util.ArrayList; @@ -43,22 +44,22 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.min; -import static org.elasticsearch.search.aggregations.AggregationBuilders.range; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.derivative; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.movingAvg; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.min; +import static org.opensearch.search.aggregations.AggregationBuilders.range; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.derivative; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.movingAvg; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class MovAvgIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class MovAvgIT extends OpenSearchIntegTestCase { private static final String INTERVAL_FIELD = "l_value"; private static final String VALUE_FIELD = "v_value"; private static final String VALUE_FIELD2 = "v_value2"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/PercentilesBucketIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/PercentilesBucketIT.java index 546104b0064..a037a8c584e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/PercentilesBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/PercentilesBucketIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Percentile; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Percentile; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Arrays; @@ -37,19 +37,19 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.percentilesBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.percentilesBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class PercentilesBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class PercentilesBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; private static final double[] PERCENTS = {0.0, 1.0, 25.0, 50.0, 75.0, 99.0, 100.0}; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SerialDiffIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SerialDiffIT.java index ab664b2e0c1..ce80d4e75c1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SerialDiffIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SerialDiffIT.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.collect.EvictingQueue; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.collect.EvictingQueue; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.support.ValuesSourceAggregationBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.ArrayList; @@ -34,21 +34,21 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.min; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.diff; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.min; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.diff; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class SerialDiffIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class SerialDiffIT extends OpenSearchIntegTestCase { private static final String INTERVAL_FIELD = "l_value"; private static final String VALUE_FIELD = "v_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/StatsBucketIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/StatsBucketIT.java index ce6e2782ad5..b0137844059 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/StatsBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/StatsBucketIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.statsBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.statsBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class StatsBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class StatsBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SumBucketIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SumBucketIT.java index 2eaa6708085..b9c755d7052 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/aggregations/pipeline/SumBucketIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.search.aggregations.pipeline; +package org.opensearch.search.aggregations.pipeline; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; -import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket; -import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.search.aggregations.metrics.Sum; -import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.histogram.Histogram; +import org.opensearch.search.aggregations.bucket.histogram.Histogram.Bucket; +import org.opensearch.search.aggregations.bucket.terms.IncludeExclude; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.search.aggregations.metrics.Sum; +import org.opensearch.search.aggregations.pipeline.BucketHelpers.GapPolicy; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.sum; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.aggregations.PipelineAggregatorBuilders.sumBucket; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.sum; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.aggregations.PipelineAggregatorBuilders.sumBucket; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class SumBucketIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class SumBucketIT extends OpenSearchIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchRedStateIndexIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/SearchRedStateIndexIT.java index 912d028e26a..9b7b3dcc285 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchRedStateIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchRedStateIndexIT.java @@ -17,32 +17,34 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.common.settings.Settings; + +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.common.settings.Settings; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.SearchService; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.SearchService; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.junit.After; import java.util.List; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThan; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SearchRedStateIndexIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchRedStateIndexIT extends OpenSearchIntegTestCase { public void testAllowPartialsWithRedState() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileCreatingIndexIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileCreatingIndexIT.java index d92a42e70b7..c2553bd8383 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileCreatingIndexIT.java @@ -17,23 +17,24 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; + +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.greaterThanOrEqualTo; /** * This test basically verifies that search with a single shard active (cause we indexed to it) and other * shards possibly not active at all (cause they haven't allocated) will still work. */ -public class SearchWhileCreatingIndexIT extends ESIntegTestCase { +public class SearchWhileCreatingIndexIT extends OpenSearchIntegTestCase { public void testIndexCausesIndexCreation() throws Exception { searchWhileCreatingIndex(false, 1); // 1 replica in our default... } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileRelocatingIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileRelocatingIT.java index eacf3e69b30..00fdc314945 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWhileRelocatingIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Priority; +import org.opensearch.common.settings.Settings; +import org.opensearch.search.SearchHits; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicBoolean; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.formatShardStatus; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoTimeout; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.formatShardStatus; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SearchWhileRelocatingIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchWhileRelocatingIT extends OpenSearchIntegTestCase { public void testSearchAndRelocateConcurrentlyRandomReplicas() throws Exception { testSearchAndRelocateConcurrently(randomIntBetween(0, 1)); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomExceptionsIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomExceptionsIT.java index c23e8a72632..435546490c4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomExceptionsIT.java @@ -17,33 +17,34 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.FilterDirectoryReader; import org.apache.lucene.index.LeafReader; import org.apache.lucene.util.English; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.Settings.Builder; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.MockEngineFactoryPlugin; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.engine.MockEngineSupport; -import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.settings.Settings.Builder; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.MockEngineFactoryPlugin; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.engine.MockEngineSupport; +import org.opensearch.test.engine.ThrowingLeafReaderWrapper; import java.io.IOException; import java.util.ArrayList; @@ -53,9 +54,9 @@ import java.util.List; import java.util.Random; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -public class SearchWithRandomExceptionsIT extends ESIntegTestCase { +public class SearchWithRandomExceptionsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -194,7 +195,7 @@ public class SearchWithRandomExceptionsIT extends ESIntegTestCase { private final double lowLevelRatio; ThrowingSubReaderWrapper(Settings settings) { - final long seed = ESIntegTestCase.INDEX_TEST_SEED_SETTING.get(settings); + final long seed = OpenSearchIntegTestCase.INDEX_TEST_SEED_SETTING.get(settings); this.topLevelRatio = settings.getAsDouble(EXCEPTION_TOP_LEVEL_RATIO_KEY, 0.1d); this.lowLevelRatio = settings.getAsDouble(EXCEPTION_LOW_LEVEL_RATIO_KEY, 0.1d); this.random = new Random(seed); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomIOExceptionsIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomIOExceptionsIT.java index eebf3e39242..4a7e3302a0e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/SearchWithRandomIOExceptionsIT.java @@ -17,37 +17,39 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; import org.apache.lucene.util.English; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.store.MockFSDirectoryFactory; -import org.elasticsearch.test.store.MockFSIndexStore; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Requests; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.store.MockFSDirectoryFactory; +import org.opensearch.test.store.MockFSIndexStore; + import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; -public class SearchWithRandomIOExceptionsIT extends ESIntegTestCase { +public class SearchWithRandomIOExceptionsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -151,7 +153,7 @@ public class SearchWithRandomIOExceptionsIT extends ESIntegTestCase { } } - ESIntegTestCase.NumShards numShards = getNumShards("test"); + OpenSearchIntegTestCase.NumShards numShards = getNumShards("test"); logger.info("Start Refresh"); // don't assert on failures here final RefreshResponse refreshResponse = client().admin().indices().prepareRefresh("test").execute().get(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/TransportSearchFailuresIT.java similarity index 84% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/TransportSearchFailuresIT.java index 86d2f3d3059..dea11de303e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/TransportSearchFailuresIT.java @@ -17,34 +17,34 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.health.ClusterHealthResponse; import org.opensearch.action.admin.indices.refresh.RefreshResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.Requests; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.client.Requests; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.Priority; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.client.Requests.clusterHealthRequest; -import static org.elasticsearch.client.Requests.refreshRequest; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.client.Requests.clusterHealthRequest; +import static org.opensearch.client.Requests.refreshRequest; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; -public class TransportSearchFailuresIT extends ESIntegTestCase { +public class TransportSearchFailuresIT extends OpenSearchIntegTestCase { @Override protected int maximumNumberOfReplicas() { return 1; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/basic/TransportTwoNodesSearchIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/basic/TransportTwoNodesSearchIT.java index c165929f22b..ebe14a2c940 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/basic/TransportTwoNodesSearchIT.java @@ -17,52 +17,52 @@ * under the License. */ -package org.elasticsearch.search.basic; +package org.opensearch.search.basic; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.search.MultiSearchResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Requests; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.ScriptScoreFunctionBuilder; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.bucket.filter.Filter; -import org.elasticsearch.search.aggregations.bucket.global.Global; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.OpenSearchException; +import org.opensearch.action.search.MultiSearchResponse; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Requests; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.functionscore.ScriptScoreFunctionBuilder; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.bucket.filter.Filter; +import org.opensearch.search.aggregations.bucket.global.Global; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.Collections; import java.util.Set; import java.util.TreeSet; -import static org.elasticsearch.action.search.SearchType.DFS_QUERY_THEN_FETCH; -import static org.elasticsearch.action.search.SearchType.QUERY_THEN_FETCH; -import static org.elasticsearch.client.Requests.createIndexRequest; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.action.search.SearchType.DFS_QUERY_THEN_FETCH; +import static org.opensearch.action.search.SearchType.QUERY_THEN_FETCH; +import static org.opensearch.client.Requests.createIndexRequest; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.startsWith; -public class TransportTwoNodesSearchIT extends ESIntegTestCase { +public class TransportTwoNodesSearchIT extends OpenSearchIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/ccs/CrossClusterSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/ccs/CrossClusterSearchIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/search/ccs/CrossClusterSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/ccs/CrossClusterSearchIT.java index ac1a895a2ae..f37f5b57ba3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/ccs/CrossClusterSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/ccs/CrossClusterSearchIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.search.ccs; +package org.opensearch.search.ccs; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexModule; -import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.index.shard.SearchOperationListener; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.internal.SearchContext; -import org.elasticsearch.test.AbstractMultiClustersTestCase; +import org.opensearch.action.search.SearchRequest; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexModule; +import org.opensearch.index.query.MatchAllQueryBuilder; +import org.opensearch.index.shard.SearchOperationListener; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.internal.SearchContext; +import org.opensearch.test.AbstractMultiClustersTestCase; import org.junit.Before; import java.util.ArrayList; @@ -41,7 +41,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; public class CrossClusterSearchIT extends AbstractMultiClustersTestCase { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fetch/FetchSubPhasePluginIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fetch/FetchSubPhasePluginIT.java index 8cceff52ddf..144c51d49f4 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fetch/FetchSubPhasePluginIT.java @@ -17,27 +17,27 @@ * under the License. */ -package org.elasticsearch.search.fetch; +package org.opensearch.search.fetch; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.PostingsEnum; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.ParsingException; -import org.elasticsearch.common.document.DocumentField; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.search.SearchExtBuilder; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.ParsingException; +import org.opensearch.common.document.DocumentField; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.SearchPlugin; +import org.opensearch.search.SearchExtBuilder; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import java.io.IOException; import java.util.ArrayList; @@ -49,13 +49,13 @@ import java.util.Map; import java.util.Objects; import static java.util.Collections.singletonList; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.CoreMatchers.equalTo; @ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 2) -public class FetchSubPhasePluginIT extends ESIntegTestCase { +public class FetchSubPhasePluginIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Collections.singletonList(FetchTermVectorsPlugin.class); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/InnerHitsIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/InnerHitsIT.java index 653b8c1481c..eeb1693ecf8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/InnerHitsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/InnerHitsIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.search.fetch.subphase; +package org.opensearch.search.fetch.subphase; import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.util.ArrayUtil; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.InnerHitBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptEngine; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.InnerHitBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptEngine; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; +import org.opensearch.search.sort.FieldSortBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.util.ArrayList; import java.util.Arrays; @@ -52,26 +52,26 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class InnerHitsIT extends ESIntegTestCase { +public class InnerHitsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/MatchedQueriesIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/MatchedQueriesIT.java index 761f9798d72..acd212be619 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/MatchedQueriesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/MatchedQueriesIT.java @@ -17,33 +17,33 @@ * under the License. */ -package org.elasticsearch.search.fetch.subphase; +package org.opensearch.search.fetch.subphase; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.TermQueryBuilder; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.QueryBuilders.termsQuery; -import static org.elasticsearch.index.query.QueryBuilders.wrapperQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.rangeQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.QueryBuilders.termsQuery; +import static org.opensearch.index.query.QueryBuilders.wrapperQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItemInArray; -public class MatchedQueriesIT extends ESIntegTestCase { +public class MatchedQueriesIT extends OpenSearchIntegTestCase { public void testSimpleMatchedQueryFromFilteredQuery() throws Exception { createIndex("test"); ensureGreen(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java similarity index 89% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java index b7eac260cd8..c04c3246876 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/CustomHighlighterSearchIT.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.fetch.subphase.highlight; +package org.opensearch.search.fetch.subphase.highlight; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; import org.junit.Before; import java.io.IOException; @@ -33,14 +33,14 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHighlight; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHighlight; import static org.hamcrest.Matchers.equalTo; /** * Integration test for highlighters registered by a plugin. */ @ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 1) -public class CustomHighlighterSearchIT extends ESIntegTestCase { +public class CustomHighlighterSearchIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/HighlighterSearchIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/HighlighterSearchIT.java index 59db9872f52..ecd334fd8aa 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fetch/subphase/highlight/HighlighterSearchIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.fetch.subphase.highlight; +package org.opensearch.search.fetch.subphase.highlight; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import org.apache.lucene.analysis.Analyzer; @@ -26,42 +26,44 @@ import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.search.join.ScoreMode; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.Settings.Builder; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.analysis.AbstractIndexAnalyzerProvider; -import org.elasticsearch.index.analysis.AnalyzerProvider; -import org.elasticsearch.index.analysis.PreConfiguredTokenFilter; -import org.elasticsearch.index.query.AbstractQueryBuilder; -import org.elasticsearch.index.query.IdsQueryBuilder; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.MultiMatchQueryBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.index.query.functionscore.RandomScoreFunctionBuilder; -import org.elasticsearch.indices.analysis.AnalysisModule; -import org.elasticsearch.plugins.AnalysisPlugin; -import org.elasticsearch.plugins.Plugin; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest; +import org.opensearch.common.Strings; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.settings.Settings.Builder; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.analysis.AbstractIndexAnalyzerProvider; +import org.opensearch.index.analysis.AnalyzerProvider; +import org.opensearch.index.analysis.PreConfiguredTokenFilter; +import org.opensearch.index.query.AbstractQueryBuilder; +import org.opensearch.index.query.IdsQueryBuilder; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.index.query.MultiMatchQueryBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder; +import org.opensearch.index.query.functionscore.RandomScoreFunctionBuilder; +import org.opensearch.indices.analysis.AnalysisModule; +import org.opensearch.plugins.AnalysisPlugin; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder.BoundaryScannerType; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder.Field; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.MockKeywordPlugin; +import org.opensearch.search.SearchHit; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder.BoundaryScannerType; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder.Field; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.MockKeywordPlugin; + import org.hamcrest.Matcher; import org.hamcrest.Matchers; @@ -77,34 +79,34 @@ import java.util.Map; import static java.util.Collections.singletonList; import static java.util.Collections.singletonMap; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.boostingQuery; -import static org.elasticsearch.index.query.QueryBuilders.commonTermsQuery; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.existsQuery; -import static org.elasticsearch.index.query.QueryBuilders.fuzzyQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.multiMatchQuery; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.index.query.QueryBuilders.prefixQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; -import static org.elasticsearch.index.query.QueryBuilders.regexpQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.QueryBuilders.wildcardQuery; -import static org.elasticsearch.search.builder.SearchSourceBuilder.highlight; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHighlight; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNotHighlighted; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; -import static org.elasticsearch.test.hamcrest.RegexMatcher.matches; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.boostingQuery; +import static org.opensearch.index.query.QueryBuilders.commonTermsQuery; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.existsQuery; +import static org.opensearch.index.query.QueryBuilders.fuzzyQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.multiMatchQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.index.query.QueryBuilders.prefixQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.rangeQuery; +import static org.opensearch.index.query.QueryBuilders.regexpQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.QueryBuilders.wildcardQuery; +import static org.opensearch.search.builder.SearchSourceBuilder.highlight; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHighlight; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNotHighlighted; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.RegexMatcher.matches; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -113,7 +115,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; -public class HighlighterSearchIT extends ESIntegTestCase { +public class HighlighterSearchIT extends OpenSearchIntegTestCase { // TODO as we move analyzers out of the core we need to move some of these into HighlighterWithAnalyzersTests private static final String[] ALL_TYPES = new String[] {"plain", "fvh", "unified"}; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fieldcaps/FieldCapabilitiesIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fieldcaps/FieldCapabilitiesIT.java index ef0a694f15e..1d53299636d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fieldcaps/FieldCapabilitiesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fieldcaps/FieldCapabilitiesIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.search.fieldcaps; +package org.opensearch.search.fieldcaps; -import org.elasticsearch.action.fieldcaps.FieldCapabilities; -import org.elasticsearch.action.fieldcaps.FieldCapabilitiesResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.MapperPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.fieldcaps.FieldCapabilities; +import org.opensearch.action.fieldcaps.FieldCapabilitiesResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.MapperPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.Before; import java.util.ArrayList; @@ -39,9 +39,9 @@ import java.util.Map; import java.util.function.Function; import java.util.function.Predicate; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -public class FieldCapabilitiesIT extends ESIntegTestCase { +public class FieldCapabilitiesIT extends OpenSearchIntegTestCase { @Before public void setUp() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/fields/SearchFieldsIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/fields/SearchFieldsIT.java index 1ca3bd530da..a01836e3530 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/fields/SearchFieldsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/fields/SearchFieldsIT.java @@ -17,36 +17,37 @@ * under the License. */ -package org.elasticsearch.search.fields; +package org.opensearch.search.fields; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.collect.MapBuilder; -import org.elasticsearch.common.document.DocumentField; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.time.DateUtils; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.support.XContentMapValues; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.collect.MapBuilder; +import org.opensearch.common.document.DocumentField; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.time.DateUtils; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.support.XContentMapValues; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.search.lookup.FieldLookup; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.search.lookup.FieldLookup; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; @@ -68,16 +69,16 @@ import java.util.concurrent.ExecutionException; import java.util.function.Function; import static java.util.Collections.singleton; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.client.Requests.refreshRequest; -import static org.elasticsearch.common.util.set.Sets.newHashSet; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.client.Requests.refreshRequest; +import static org.opensearch.common.util.set.Sets.newHashSet; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -85,7 +86,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class SearchFieldsIT extends ESIntegTestCase { +public class SearchFieldsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/DecayFunctionScoreIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/DecayFunctionScoreIT.java index 5f218b56d61..e40f092b7e5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/DecayFunctionScoreIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.ActionFuture; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.lucene.search.function.CombineFunction; -import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery; -import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery.ScoreMode; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; -import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.lucene.search.function.CombineFunction; +import org.opensearch.common.lucene.search.function.FunctionScoreQuery; +import org.opensearch.common.lucene.search.function.FunctionScoreQuery.ScoreMode; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder; +import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder; +import org.opensearch.index.query.functionscore.ScoreFunctionBuilders; +import org.opensearch.search.MultiValueMode; +import org.opensearch.search.SearchHits; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -48,28 +48,28 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.exponentialDecayFunction; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.gaussDecayFunction; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.linearDecayFunction; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.exponentialDecayFunction; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.gaussDecayFunction; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.linearDecayFunction; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.lessThan; -public class DecayFunctionScoreIT extends ESIntegTestCase { +public class DecayFunctionScoreIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/ExplainableScriptIT.java similarity index 76% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/ExplainableScriptIT.java index 33846a2e588..945fb4d6ba3 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/ExplainableScriptIT.java @@ -17,31 +17,31 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.Explanation; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.lucene.search.function.CombineFunction; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.ScriptPlugin; -import org.elasticsearch.script.ExplainableScoreScript; -import org.elasticsearch.script.ScoreScript; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptContext; -import org.elasticsearch.script.ScriptEngine; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.lucene.search.function.CombineFunction; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.ScriptPlugin; +import org.opensearch.script.ExplainableScoreScript; +import org.opensearch.script.ScoreScript; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptContext; +import org.opensearch.script.ScriptEngine; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.lookup.SearchLookup; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.io.IOException; import java.util.ArrayList; @@ -53,17 +53,17 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 1) -public class ExplainableScriptIT extends ESIntegTestCase { +public class ExplainableScriptIT extends OpenSearchIntegTestCase { public static class ExplainableScriptPlugin extends Plugin implements ScriptPlugin { @Override @@ -144,7 +144,7 @@ public class ExplainableScriptIT extends ESIntegTestCase { new Script(ScriptType.INLINE, "test", "explainable_script", Collections.emptyMap()))) .boostMode(CombineFunction.REPLACE)))).actionGet(); - ElasticsearchAssertions.assertNoFailures(response); + OpenSearchAssertions.assertNoFailures(response); SearchHits hits = response.getHits(); assertThat(hits.getTotalHits().value, equalTo(20L)); int idCounter = 19; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreFieldValueIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreFieldValueIT.java index 5c2e764f1ec..3e79a95ccdd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreFieldValueIT.java @@ -17,28 +17,28 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.lucene.search.function.FieldValueFactorFunction; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.lucene.search.function.FieldValueFactorFunction; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.simpleQueryStringQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.simpleQueryStringQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; /** * Tests for the {@code field_value_factor} function in a function_score query. */ -public class FunctionScoreFieldValueIT extends ESIntegTestCase { +public class FunctionScoreFieldValueIT extends OpenSearchIntegTestCase { public void testFieldValueFactor() throws IOException { assertAcked(prepareCreate("test").addMapping( "type1", diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreIT.java index 7b4ec5aa0bf..d506e5e0b64 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScoreIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.lucene.search.function.CombineFunction; -import org.elasticsearch.common.lucene.search.function.FunctionScoreQuery; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.bucket.terms.Terms; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.lucene.search.function.CombineFunction; +import org.opensearch.common.lucene.search.function.FunctionScoreQuery; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.MatchAllQueryBuilder; +import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.bucket.terms.Terms; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.ESTestCase; import java.io.IOException; import java.util.ArrayList; @@ -44,19 +44,19 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.function.Function; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -public class FunctionScoreIT extends ESIntegTestCase { +public class FunctionScoreIT extends OpenSearchIntegTestCase { static final String TYPE = "type"; static final String INDEX = "index"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScorePluginIT.java similarity index 78% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScorePluginIT.java index f3c63b7e8dc..227018dfee0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/FunctionScorePluginIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; import org.apache.lucene.search.Explanation; import org.opensearch.action.ActionFuture; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.index.query.functionscore.DecayFunction; -import org.elasticsearch.index.query.functionscore.DecayFunctionBuilder; -import org.elasticsearch.index.query.functionscore.DecayFunctionParser; -import org.elasticsearch.index.query.functionscore.ScoreFunctionParser; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.SearchPlugin; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.Priority; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.index.query.functionscore.DecayFunction; +import org.opensearch.index.query.functionscore.DecayFunctionBuilder; +import org.opensearch.index.query.functionscore.DecayFunctionParser; +import org.opensearch.index.query.functionscore.ScoreFunctionParser; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.SearchPlugin; +import org.opensearch.search.SearchHits; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.io.IOException; import java.util.Arrays; @@ -44,16 +44,16 @@ import java.util.Collection; import java.util.List; import static java.util.Collections.singletonList; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.client.Requests.searchRequest; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.client.Requests.searchRequest; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.builder.SearchSourceBuilder.searchSource; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.SUITE, supportsDedicatedMasters = false, numDataNodes = 1) -public class FunctionScorePluginIT extends ESIntegTestCase { +public class FunctionScorePluginIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { return Arrays.asList(CustomDistanceScorePlugin.class); @@ -89,7 +89,7 @@ public class FunctionScorePluginIT extends ESIntegTestCase { searchSource().explain(false).query(functionScoreQuery(termQuery("test", "value"), gfb)))); SearchResponse sr = response.actionGet(); - ElasticsearchAssertions.assertNoFailures(sr); + OpenSearchAssertions.assertNoFailures(sr); SearchHits sh = sr.getHits(); assertThat(sh.getHits().length, equalTo(2)); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/QueryRescorerIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/QueryRescorerIT.java index 73d0ddd1c4d..09c8f66808a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/QueryRescorerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/QueryRescorerIT.java @@ -17,63 +17,63 @@ * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; import org.apache.lucene.search.Explanation; import org.apache.lucene.util.English; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.common.lucene.search.function.CombineFunction; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.Settings.Builder; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.Operator; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.rescore.QueryRescoreMode; -import org.elasticsearch.search.rescore.QueryRescorerBuilder; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.common.lucene.search.function.CombineFunction; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.settings.Settings.Builder; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.Operator; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.functionscore.ScoreFunctionBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.rescore.QueryRescoreMode; +import org.opensearch.search.rescore.QueryRescorerBuilder; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.Comparator; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.lucene.search.function.CombineFunction.REPLACE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.weightFactorFunction; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFourthHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThirdHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasScore; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.lucene.search.function.CombineFunction.REPLACE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.weightFactorFunction; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFourthHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSecondHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertThirdHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasScore; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; -public class QueryRescorerIT extends ESIntegTestCase { +public class QueryRescorerIT extends OpenSearchIntegTestCase { public void testEnforceWindowSize() { createIndex("test"); // this diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/RandomScoreFunctionIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/functionscore/RandomScoreFunctionIT.java index 94fdac25efa..d1ed4bb8bc7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/functionscore/RandomScoreFunctionIT.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.functionscore; +package org.opensearch.search.functionscore; import org.apache.lucene.util.ArrayUtil; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.mapper.SeqNoFieldMapper; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.index.query.functionscore.RandomScoreFunctionBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.ScoreAccessor; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.mapper.SeqNoFieldMapper; +import org.opensearch.index.query.functionscore.FunctionScoreQueryBuilder; +import org.opensearch.index.query.functionscore.RandomScoreFunctionBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.ScoreAccessor; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.CoreMatchers; import java.util.Arrays; @@ -39,16 +39,16 @@ import java.util.HashMap; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.randomFunction; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; -import static org.elasticsearch.script.MockScriptPlugin.NAME; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.randomFunction; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; +import static org.opensearch.script.MockScriptPlugin.NAME; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.nullValue; -public class RandomScoreFunctionIT extends ESIntegTestCase { +public class RandomScoreFunctionIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoBoundingBoxQueryIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/GeoBoundingBoxQueryIT.java index 6b5f4b2b22b..14bfce03c55 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoBoundingBoxQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoBoundingBoxQueryIT.java @@ -17,29 +17,29 @@ * under the License. */ -package org.elasticsearch.search.geo; +package org.opensearch.search.geo; -import org.elasticsearch.Version; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.GeoValidationMethod; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.GeoValidationMethod; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.geoBoundingBoxQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.geoBoundingBoxQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; -public class GeoBoundingBoxQueryIT extends ESIntegTestCase { +public class GeoBoundingBoxQueryIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoDistanceIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/GeoDistanceIT.java index fe8fd8d9b39..4485da1e57f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoDistanceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoDistanceIT.java @@ -17,31 +17,31 @@ * under the License. */ -package org.elasticsearch.search.geo; +package org.opensearch.search.geo; -import org.elasticsearch.Version; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.geo.GeoUtils; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.geometry.utils.Geohash; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.Aggregations; -import org.elasticsearch.search.aggregations.bucket.range.InternalGeoDistance; -import org.elasticsearch.search.aggregations.bucket.range.Range; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.geo.GeoUtils; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.DistanceUnit; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.geometry.utils.Geohash; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.Aggregations; +import org.opensearch.search.aggregations.bucket.range.InternalGeoDistance; +import org.opensearch.search.aggregations.bucket.range.Range; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import org.junit.Before; import java.io.IOException; @@ -52,11 +52,11 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.closeTo; -public class GeoDistanceIT extends ESIntegTestCase { +public class GeoDistanceIT extends OpenSearchIntegTestCase { private static final double src_lat = 32.798; private static final double src_lon = -117.151; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoFilterIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoFilterIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoFilterIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/GeoFilterIT.java index bb23e666814..4be2b01f2ea 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoFilterIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoFilterIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.search.geo; +package org.opensearch.search.geo; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; @@ -26,31 +26,33 @@ import org.apache.lucene.spatial.prefix.tree.GeohashPrefixTree; import org.apache.lucene.spatial.query.SpatialArgs; import org.apache.lucene.spatial.query.SpatialOperation; import org.apache.lucene.spatial.query.UnsupportedSpatialOperation; -import org.elasticsearch.Version; + +import org.opensearch.Version; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.geo.GeoUtils; -import org.elasticsearch.common.geo.builders.CoordinatesBuilder; -import org.elasticsearch.common.geo.builders.LineStringBuilder; -import org.elasticsearch.common.geo.builders.MultiPolygonBuilder; -import org.elasticsearch.common.geo.builders.PointBuilder; -import org.elasticsearch.common.geo.builders.PolygonBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.core.internal.io.Streams; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.geo.GeoUtils; +import org.opensearch.common.geo.builders.CoordinatesBuilder; +import org.opensearch.common.geo.builders.LineStringBuilder; +import org.opensearch.common.geo.builders.MultiPolygonBuilder; +import org.opensearch.common.geo.builders.PointBuilder; +import org.opensearch.common.geo.builders.PolygonBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.internal.io.Streams; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; + import org.junit.BeforeClass; import org.locationtech.spatial4j.context.SpatialContext; import org.locationtech.spatial4j.distance.DistanceUtils; @@ -65,22 +67,22 @@ import java.util.ArrayList; import java.util.Random; import java.util.zip.GZIPInputStream; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.geometry.utils.Geohash.addNeighbors; -import static org.elasticsearch.index.query.QueryBuilders.geoBoundingBoxQuery; -import static org.elasticsearch.index.query.QueryBuilders.geoDistanceQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.geometry.utils.Geohash.addNeighbors; +import static org.opensearch.index.query.QueryBuilders.geoBoundingBoxQuery; +import static org.opensearch.index.query.QueryBuilders.geoDistanceQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; -public class GeoFilterIT extends ESIntegTestCase { +public class GeoFilterIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { @@ -366,7 +368,7 @@ public class GeoFilterIT extends ESIntegTestCase { } public void testBulk() throws Exception { - byte[] bulkAction = unZipData("/org/elasticsearch/search/geo/gzippedmap.gz"); + byte[] bulkAction = unZipData("/org/opensearch/search/geo/gzippedmap.gz"); Version version = VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, Version.CURRENT); Settings settings = Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, version).build(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoPolygonIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoPolygonIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoPolygonIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/GeoPolygonIT.java index 9ca1244965d..2d82d01ef7e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoPolygonIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoPolygonIT.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.search.geo; +package org.opensearch.search.geo; -import org.elasticsearch.Version; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.geoPolygonQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.geoPolygonQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.SuiteScopeTestCase -public class GeoPolygonIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class GeoPolygonIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoShapeIntegrationIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/GeoShapeIntegrationIT.java index 23bc8a9bd36..a6d1e38d661 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/GeoShapeIntegrationIT.java @@ -16,32 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.geo; + +package org.opensearch.search.geo; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.geo.builders.PointBuilder; -import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.mapper.GeoShapeFieldMapper; -import org.elasticsearch.index.mapper.MappedFieldType; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.common.Strings; +import org.opensearch.common.geo.builders.PointBuilder; +import org.opensearch.common.geo.builders.ShapeBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.IndexService; +import org.opensearch.index.mapper.GeoShapeFieldMapper; +import org.opensearch.index.mapper.MappedFieldType; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.index.query.QueryBuilders.geoShapeQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; -import static org.elasticsearch.index.query.QueryBuilders.geoShapeQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; -public class GeoShapeIntegrationIT extends ESIntegTestCase { +public class GeoShapeIntegrationIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java b/server/src/internalClusterTest/java/org/opensearch/search/geo/LegacyGeoShapeIntegrationIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/geo/LegacyGeoShapeIntegrationIT.java index 5fe25f2d7b6..78484f0ef21 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/geo/LegacyGeoShapeIntegrationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/geo/LegacyGeoShapeIntegrationIT.java @@ -16,35 +16,36 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.geo; -import org.elasticsearch.OpenSearchException; +package org.opensearch.search.geo; + +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.IndexShardRoutingTable; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.geo.builders.ShapeBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.geometry.Circle; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.mapper.LegacyGeoShapeFieldMapper; -import org.elasticsearch.index.mapper.MappedFieldType; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.IndexShardRoutingTable; +import org.opensearch.common.Strings; +import org.opensearch.common.geo.builders.ShapeBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.geometry.Circle; +import org.opensearch.index.IndexService; +import org.opensearch.index.mapper.LegacyGeoShapeFieldMapper; +import org.opensearch.index.mapper.MappedFieldType; +import org.opensearch.indices.IndicesService; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; -import static org.elasticsearch.index.query.QueryBuilders.geoShapeQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.index.query.QueryBuilders.geoShapeQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; -public class LegacyGeoShapeIntegrationIT extends ESIntegTestCase { +public class LegacyGeoShapeIntegrationIT extends OpenSearchIntegTestCase { /** * Test that orientation parameter correctly persists across cluster restart diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java b/server/src/internalClusterTest/java/org/opensearch/search/morelikethis/MoreLikeThisIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/morelikethis/MoreLikeThisIT.java index ff3fbadd336..50dfbc46284 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/morelikethis/MoreLikeThisIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.search.morelikethis; +package org.opensearch.search.morelikethis; import org.opensearch.action.RoutingMissingException; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.MoreLikeThisQueryBuilder; -import org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.MoreLikeThisQueryBuilder; +import org.opensearch.index.query.MoreLikeThisQueryBuilder.Item; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.plugins.Plugin; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.ArrayList; @@ -45,25 +45,25 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.client.Requests.indexRequest; -import static org.elasticsearch.client.Requests.refreshRequest; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.moreLikeThisQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.client.Requests.indexRequest; +import static org.opensearch.client.Requests.refreshRequest; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.moreLikeThisQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.notNullValue; -public class MoreLikeThisIT extends ESIntegTestCase { +public class MoreLikeThisIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -190,9 +190,9 @@ public class MoreLikeThisIT extends ESIntegTestCase { client().index(indexRequest("test").type("type1").id("2") .source(jsonBuilder().startObject().field("text", "lucene release").endObject())).actionGet(); client().index(indexRequest("test").type("type1").id("3") - .source(jsonBuilder().startObject().field("text", "elasticsearch beta").endObject())).actionGet(); + .source(jsonBuilder().startObject().field("text", "opensearch beta").endObject())).actionGet(); client().index(indexRequest("test").type("type1").id("4") - .source(jsonBuilder().startObject().field("text", "elasticsearch release").endObject())).actionGet(); + .source(jsonBuilder().startObject().field("text", "opensearch release").endObject())).actionGet(); client().admin().indices().refresh(refreshRequest()).actionGet(); logger.info("Running moreLikeThis on index"); @@ -235,11 +235,11 @@ public class MoreLikeThisIT extends ESIntegTestCase { assertThat(ensureGreen(), equalTo(ClusterHealthStatus.GREEN)); client().index(indexRequest(indexName).type(typeName).id("1") - .source(jsonBuilder().startObject().field("text", "elasticsearch index").endObject())).actionGet(); + .source(jsonBuilder().startObject().field("text", "opensearch index").endObject())).actionGet(); client().index(indexRequest(indexName).type(typeName).id("2") .source(jsonBuilder().startObject().field("text", "lucene index").endObject())).actionGet(); client().index(indexRequest(indexName).type(typeName).id("3") - .source(jsonBuilder().startObject().field("text", "elasticsearch index").endObject())).actionGet(); + .source(jsonBuilder().startObject().field("text", "opensearch index").endObject())).actionGet(); refresh(indexName); SearchResponse response = client().prepareSearch().setQuery( @@ -328,7 +328,7 @@ public class MoreLikeThisIT extends ESIntegTestCase { .setSource(jsonBuilder().startObject().field("string_value", "lucene index").field("int_value", 1).endObject()) .get(); client().prepareIndex("test", "type", "2") - .setSource(jsonBuilder().startObject().field("string_value", "elasticsearch index").field("int_value", 42).endObject()) + .setSource(jsonBuilder().startObject().field("string_value", "opensearch index").field("int_value", 42).endObject()) .get(); refresh(); @@ -689,12 +689,12 @@ public class MoreLikeThisIT extends ESIntegTestCase { indexRandom(true, client().prepareIndex("test", "type1", "1").setSource(jsonBuilder() .startObject() .field("text", "hello world") - .field("text1", "elasticsearch") + .field("text1", "opensearch") .endObject()), client().prepareIndex("test", "type1", "2").setSource(jsonBuilder() .startObject() .field("text", "goodby moon") - .field("text1", "elasticsearch") + .field("text1", "opensearch") .endObject())); MoreLikeThisQueryBuilder mltQuery = moreLikeThisQuery(new Item[] {new Item("test", "1")}) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/msearch/MultiSearchIT.java similarity index 81% rename from server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/msearch/MultiSearchIT.java index 7a1a1ca48d8..7035e8f4a0a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/msearch/MultiSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/msearch/MultiSearchIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.search.msearch; +package org.opensearch.search.msearch; -import org.elasticsearch.action.search.MultiSearchRequest; -import org.elasticsearch.action.search.MultiSearchResponse; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.MultiSearchRequest; +import org.opensearch.action.search.MultiSearchResponse; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.equalTo; -public class MultiSearchIT extends ESIntegTestCase { +public class MultiSearchIT extends OpenSearchIntegTestCase { public void testSimpleMultiSearch() { createIndex("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/nested/SimpleNestedIT.java b/server/src/internalClusterTest/java/org/opensearch/search/nested/SimpleNestedIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/nested/SimpleNestedIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/nested/SimpleNestedIT.java index 799dc568b83..52c68388132 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/nested/SimpleNestedIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/nested/SimpleNestedIT.java @@ -17,47 +17,48 @@ * under the License. */ -package org.elasticsearch.search.nested; +package org.opensearch.search.nested; import org.apache.lucene.search.Explanation; import org.apache.lucene.search.join.ScoreMode; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.cluster.stats.ClusterStatsResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.sort.NestedSortBuilder; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortMode; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.sort.NestedSortBuilder; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.search.sort.SortMode; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; + +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.nestedQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.nestedQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.startsWith; -public class SimpleNestedIT extends ESIntegTestCase { +public class SimpleNestedIT extends OpenSearchIntegTestCase { public void testSimpleNested() throws Exception { assertAcked(prepareCreate("test") .addMapping("type1", "nested1", "type=nested")); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/preference/SearchPreferenceIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/preference/SearchPreferenceIT.java index a05b4682266..9b8e78aa839 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/preference/SearchPreferenceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/preference/SearchPreferenceIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.search.preference; +package org.opensearch.search.preference; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.health.ClusterHealthStatus; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.OperationRouting; -import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.node.Node; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.health.ClusterHealthStatus; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.OperationRouting; +import org.opensearch.cluster.routing.allocation.decider.EnableAllocationDecider; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.node.Node; import org.opensearch.rest.RestStatus; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -50,8 +50,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.hasToString; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SearchPreferenceIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchPreferenceIT extends OpenSearchIntegTestCase { @Override public Settings nodeSettings(int nodeOrdinal) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/profile/aggregation/AggregationProfilerIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/profile/aggregation/AggregationProfilerIT.java index f4dda12057f..70b1bfd1f8b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/profile/aggregation/AggregationProfilerIT.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.search.profile.aggregation; +package org.opensearch.search.profile.aggregation; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.aggregations.BucketOrder; -import org.elasticsearch.search.aggregations.bucket.sampler.DiversifiedOrdinalsSamplerAggregator; -import org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator; -import org.elasticsearch.search.profile.ProfileResult; -import org.elasticsearch.search.profile.ProfileShardResult; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.aggregations.BucketOrder; +import org.opensearch.search.aggregations.bucket.sampler.DiversifiedOrdinalsSamplerAggregator; +import org.opensearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator; +import org.opensearch.search.profile.ProfileResult; +import org.opensearch.search.profile.ProfileShardResult; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; @@ -35,28 +35,28 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.search.aggregations.AggregationBuilders.avg; -import static org.elasticsearch.search.aggregations.AggregationBuilders.diversifiedSampler; -import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; -import static org.elasticsearch.search.aggregations.AggregationBuilders.max; -import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.search.aggregations.AggregationBuilders.avg; +import static org.opensearch.search.aggregations.AggregationBuilders.diversifiedSampler; +import static org.opensearch.search.aggregations.AggregationBuilders.histogram; +import static org.opensearch.search.aggregations.AggregationBuilders.max; +import static org.opensearch.search.aggregations.AggregationBuilders.terms; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasEntry; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.SuiteScopeTestCase -public class AggregationProfilerIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.SuiteScopeTestCase +public class AggregationProfilerIT extends OpenSearchIntegTestCase { private static final String BUILD_LEAF_COLLECTOR = AggregationTimingType.BUILD_LEAF_COLLECTOR.toString(); private static final String COLLECT = AggregationTimingType.COLLECT.toString(); private static final String POST_COLLECTION = AggregationTimingType.POST_COLLECTION.toString(); private static final String INITIALIZE = AggregationTimingType.INITIALIZE.toString(); private static final String BUILD_AGGREGATION = AggregationTimingType.BUILD_AGGREGATION.toString(); private static final String REDUCE = AggregationTimingType.REDUCE.toString(); - private static final Set BREAKDOWN_KEYS = org.elasticsearch.common.collect.Set.of( + private static final Set BREAKDOWN_KEYS = org.opensearch.common.collect.Set.of( INITIALIZE, BUILD_LEAF_COLLECTOR, COLLECT, @@ -91,7 +91,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { @Override protected void setupSuiteScopeCluster() throws Exception { assertAcked(client().admin().indices().prepareCreate("idx") - .setSettings(org.elasticsearch.common.collect.Map.of("number_of_shards", 1, "number_of_replicas", 0)) + .setSettings(org.opensearch.common.collect.Map.of("number_of_shards", 1, "number_of_replicas", 0)) .addMapping("type", STRING_FIELD, "type=keyword", NUMBER_FIELD, "type=integer", TAG_FIELD, "type=keyword").get()); List builders = new ArrayList<>(); @@ -143,7 +143,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(breakdown.get(REDUCE), equalTo(0L)); Map debug = histoAggResult.getDebugInfo(); assertThat(debug, notNullValue()); - assertThat(debug.keySet(), equalTo(org.elasticsearch.common.collect.Set.of(TOTAL_BUCKETS))); + assertThat(debug.keySet(), equalTo(org.opensearch.common.collect.Set.of(TOTAL_BUCKETS))); assertThat(((Number) debug.get(TOTAL_BUCKETS)).longValue(), greaterThan(0L)); } } @@ -187,7 +187,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(histoBreakdown.get(REDUCE), equalTo(0L)); Map histoDebugInfo = histoAggResult.getDebugInfo(); assertThat(histoDebugInfo, notNullValue()); - assertThat(histoDebugInfo.keySet(), equalTo(org.elasticsearch.common.collect.Set.of(TOTAL_BUCKETS))); + assertThat(histoDebugInfo.keySet(), equalTo(org.opensearch.common.collect.Set.of(TOTAL_BUCKETS))); assertThat(((Number) histoDebugInfo.get(TOTAL_BUCKETS)).longValue(), greaterThan(0L)); assertThat(histoAggResult.getProfiledChildren().size(), equalTo(1)); @@ -218,7 +218,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(avgBreakdown.get(COLLECT), greaterThan(0L)); assertThat(avgBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(avgBreakdown.get(REDUCE), equalTo(0L)); - assertThat(avgAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(avgAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(avgAggResult.getProfiledChildren().size(), equalTo(0)); } } @@ -266,7 +266,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(histoBreakdown.get(REDUCE), equalTo(0L)); Map histoDebugInfo = histoAggResult.getDebugInfo(); assertThat(histoDebugInfo, notNullValue()); - assertThat(histoDebugInfo.keySet(), equalTo(org.elasticsearch.common.collect.Set.of(TOTAL_BUCKETS))); + assertThat(histoDebugInfo.keySet(), equalTo(org.opensearch.common.collect.Set.of(TOTAL_BUCKETS))); assertThat(((Number) histoDebugInfo.get(TOTAL_BUCKETS)).longValue(), greaterThan(0L)); assertThat(histoAggResult.getProfiledChildren().size(), equalTo(1)); @@ -297,7 +297,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(avgBreakdown.get(COLLECT), greaterThan(0L)); assertThat(avgBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(avgBreakdown.get(REDUCE), equalTo(0L)); - assertThat(avgAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(avgAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(avgAggResult.getProfiledChildren().size(), equalTo(0)); } } @@ -334,7 +334,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(diversifyBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(diversifyBreakdown.get(REDUCE), equalTo(0L)); assertThat(diversifyAggResult.getDebugInfo(), equalTo( - org.elasticsearch.common.collect.Map.of(DEFERRED, org.elasticsearch.common.collect.List.of("max")))); + org.opensearch.common.collect.Map.of(DEFERRED, org.opensearch.common.collect.List.of("max")))); assertThat(diversifyAggResult.getProfiledChildren().size(), equalTo(1)); ProfileResult maxAggResult = diversifyAggResult.getProfiledChildren().get(0); @@ -351,7 +351,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(diversifyBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(maxBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(maxBreakdown.get(REDUCE), equalTo(0L)); - assertThat(maxAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(maxAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(maxAggResult.getProfiledChildren().size(), equalTo(0)); } } @@ -397,7 +397,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(histoBreakdown.get(REDUCE), equalTo(0L)); Map histoDebugInfo = histoAggResult.getDebugInfo(); assertThat(histoDebugInfo, notNullValue()); - assertThat(histoDebugInfo.keySet(), equalTo(org.elasticsearch.common.collect.Set.of(TOTAL_BUCKETS))); + assertThat(histoDebugInfo.keySet(), equalTo(org.opensearch.common.collect.Set.of(TOTAL_BUCKETS))); assertThat(((Number) histoDebugInfo.get(TOTAL_BUCKETS)).longValue(), greaterThan(0L)); assertThat(histoAggResult.getProfiledChildren().size(), equalTo(2)); @@ -436,7 +436,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(avgBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(avgBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(avgBreakdown.get(REDUCE), equalTo(0L)); - assertThat(avgAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(avgAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(avgAggResult.getProfiledChildren().size(), equalTo(0)); ProfileResult maxAggResult = tagsAggResultSubAggregations.get("max"); @@ -452,7 +452,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(maxBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(maxBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(maxBreakdown.get(REDUCE), equalTo(0L)); - assertThat(maxAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(maxAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(maxAggResult.getProfiledChildren().size(), equalTo(0)); ProfileResult stringsAggResult = histoAggResultSubAggregations.get("strings"); @@ -487,7 +487,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(avgBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(avgBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(avgBreakdown.get(REDUCE), equalTo(0L)); - assertThat(avgAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(avgAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(avgAggResult.getProfiledChildren().size(), equalTo(0)); maxAggResult = stringsAggResultSubAggregations.get("max"); @@ -503,7 +503,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(maxBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(maxBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(maxBreakdown.get(REDUCE), equalTo(0L)); - assertThat(maxAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(maxAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(maxAggResult.getProfiledChildren().size(), equalTo(0)); tagsAggResult = stringsAggResultSubAggregations.get("tags"); @@ -539,7 +539,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(avgBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(avgBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(avgBreakdown.get(REDUCE), equalTo(0L)); - assertThat(avgAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(avgAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(avgAggResult.getProfiledChildren().size(), equalTo(0)); maxAggResult = tagsAggResultSubAggregations.get("max"); @@ -555,7 +555,7 @@ public class AggregationProfilerIT extends ESIntegTestCase { assertThat(maxBreakdown.get(POST_COLLECTION), greaterThan(0L)); assertThat(maxBreakdown.get(BUILD_AGGREGATION), greaterThan(0L)); assertThat(maxBreakdown.get(REDUCE), equalTo(0L)); - assertThat(maxAggResult.getDebugInfo(), equalTo(org.elasticsearch.common.collect.Map.of())); + assertThat(maxAggResult.getDebugInfo(), equalTo(org.opensearch.common.collect.Map.of())); assertThat(maxAggResult.getProfiledChildren().size(), equalTo(0)); } } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java b/server/src/internalClusterTest/java/org/opensearch/search/profile/query/QueryProfilerIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/profile/query/QueryProfilerIT.java index a7ccdb96abe..5fafa2b6f2e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/profile/query/QueryProfilerIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.search.profile.query; +package org.opensearch.search.profile.query; import org.apache.lucene.util.English; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.MultiSearchResponse; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.profile.ProfileResult; -import org.elasticsearch.search.profile.ProfileShardResult; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.MultiSearchResponse; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.search.profile.ProfileResult; +import org.opensearch.search.profile.ProfileShardResult; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; import java.util.HashSet; @@ -41,7 +41,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import static org.elasticsearch.search.profile.query.RandomQueryGenerator.randomQueryBuilder; +import static org.opensearch.search.profile.query.RandomQueryGenerator.randomQueryBuilder; import static org.hamcrest.Matchers.emptyOrNullString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; -public class QueryProfilerIT extends ESIntegTestCase { +public class QueryProfilerIT extends OpenSearchIntegTestCase { /** * This test simply checks to make sure nothing crashes. Test indexes 100-150 documents, @@ -111,7 +111,7 @@ public class QueryProfilerIT extends ESIntegTestCase { * to make sure the profiling doesn't interfere with the hits being returned */ public void testProfileMatchesRegular() throws Exception { - createIndex("test", Settings.builder() + createIndex("test", Settings.builder() .put("index.number_of_shards", 1) .put("index.number_of_replicas", 0).build()); ensureGreen(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/ExistsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/ExistsIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/ExistsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/ExistsIT.java index 11406068321..7babc6b3c7a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/ExistsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/ExistsIT.java @@ -17,18 +17,18 @@ * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; -import org.elasticsearch.action.explain.ExplainResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.explain.ExplainResponse; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.HashMap; @@ -39,11 +39,11 @@ import java.util.Map; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; -public class ExistsIT extends ESIntegTestCase { +public class ExistsIT extends OpenSearchIntegTestCase { // TODO: move this to a unit test somewhere... public void testEmptyIndex() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/MultiMatchQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/MultiMatchQueryIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/MultiMatchQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/MultiMatchQueryIT.java index 58af881d051..4fdef512007 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/MultiMatchQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/MultiMatchQueryIT.java @@ -16,29 +16,30 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.MultiMatchQueryBuilder; -import org.elasticsearch.index.query.Operator; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.search.MatchQuery; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.MockKeywordPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.util.set.Sets; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.index.query.MultiMatchQueryBuilder; +import org.opensearch.index.query.Operator; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.search.MatchQuery; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.MockKeywordPlugin; + import org.junit.Before; import java.io.IOException; @@ -49,23 +50,23 @@ import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.disMaxQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhrasePrefixQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.multiMatchQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.disMaxQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhrasePrefixQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.multiMatchQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSecondHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.empty; @@ -74,7 +75,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThan; -public class MultiMatchQueryIT extends ESIntegTestCase { +public class MultiMatchQueryIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/QueryStringIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/QueryStringIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/QueryStringIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/QueryStringIT.java index 885b1c00863..4a62ea09bfa 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/QueryStringIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/QueryStringIT.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.query.Operator; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.SearchModule; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.index.query.Operator; +import org.opensearch.index.query.QueryStringQueryBuilder; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.SearchModule; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.Before; import org.junit.BeforeClass; @@ -41,17 +41,17 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.test.StreamsUtils.copyToStringFromClasspath; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class QueryStringIT extends ESIntegTestCase { +public class QueryStringIT extends OpenSearchIntegTestCase { private static int CLUSTER_MAX_CLAUSE_COUNT; @@ -62,7 +62,7 @@ public class QueryStringIT extends ESIntegTestCase { @Before public void setup() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); } @@ -149,7 +149,7 @@ public class QueryStringIT extends ESIntegTestCase { public void testDocWithAllTypes() throws Exception { List reqs = new ArrayList<>(); - String docBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-example-document.json"); + String docBody = copyToStringFromClasspath("/org/opensearch/search/query/all-example-document.json"); reqs.add(client().prepareIndex("test", "_doc", "1").setSource(docBody, XContentType.JSON)); indexRandom(true, false, reqs); @@ -208,7 +208,7 @@ public class QueryStringIT extends ESIntegTestCase { } public void testAllFields() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); Settings.Builder settings = Settings.builder().put("index.query.default_field", "*"); prepareCreate("test_1").setSource(indexBody, XContentType.JSON).setSettings(settings).get(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/ScriptScoreQueryIT.java similarity index 85% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/ScriptScoreQueryIT.java index 356f0ddac9a..b1fa731852f 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/ScriptScoreQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/ScriptScoreQueryIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -38,18 +38,18 @@ import java.util.HashMap; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.scriptScoreQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThirdHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasScore; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.scriptScoreQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSecondHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertThirdHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasScore; -public class ScriptScoreQueryIT extends ESIntegTestCase { +public class ScriptScoreQueryIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/SearchQueryIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/SearchQueryIT.java index 43012e0530e..a5070ac6278 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SearchQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/SearchQueryIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.pattern.PatternReplaceCharFilter; @@ -26,47 +26,48 @@ import org.apache.lucene.search.MultiTermQuery; import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.English; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.bootstrap.JavaVersion; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.document.DocumentField; -import org.elasticsearch.common.lucene.search.SpanBooleanQueryRewriteWithMaxClause; -import org.elasticsearch.common.regex.Regex; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.analysis.CharFilterFactory; -import org.elasticsearch.index.analysis.NormalizingCharFilterFactory; -import org.elasticsearch.index.analysis.TokenizerFactory; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.MultiMatchQueryBuilder; -import org.elasticsearch.index.query.Operator; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.index.query.WildcardQueryBuilder; -import org.elasticsearch.index.query.WrapperQueryBuilder; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; -import org.elasticsearch.index.search.MatchQuery; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.indices.TermsLookup; -import org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider; -import org.elasticsearch.plugins.AnalysisPlugin; -import org.elasticsearch.plugins.Plugin; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.bootstrap.JavaVersion; +import org.opensearch.common.Strings; +import org.opensearch.common.document.DocumentField; +import org.opensearch.common.lucene.search.SpanBooleanQueryRewriteWithMaxClause; +import org.opensearch.common.regex.Regex; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.analysis.CharFilterFactory; +import org.opensearch.index.analysis.NormalizingCharFilterFactory; +import org.opensearch.index.analysis.TokenizerFactory; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.MatchQueryBuilder; +import org.opensearch.index.query.MultiMatchQueryBuilder; +import org.opensearch.index.query.Operator; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.RangeQueryBuilder; +import org.opensearch.index.query.TermQueryBuilder; +import org.opensearch.index.query.WildcardQueryBuilder; +import org.opensearch.index.query.WrapperQueryBuilder; +import org.opensearch.index.query.functionscore.ScoreFunctionBuilders; +import org.opensearch.index.search.MatchQuery; +import org.opensearch.indices.IndicesService; +import org.opensearch.indices.TermsLookup; +import org.opensearch.indices.analysis.AnalysisModule.AnalysisProvider; +import org.opensearch.plugins.AnalysisPlugin; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.junit.annotations.TestIssueLogging; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.junit.annotations.TestIssueLogging; import java.io.IOException; import java.io.Reader; @@ -83,53 +84,53 @@ import java.util.concurrent.ExecutionException; import java.util.regex.Pattern; import static java.util.Collections.singletonMap; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.commonTermsQuery; -import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.existsQuery; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.fuzzyQuery; -import static org.elasticsearch.index.query.QueryBuilders.idsQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhrasePrefixQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.index.query.QueryBuilders.multiMatchQuery; -import static org.elasticsearch.index.query.QueryBuilders.prefixQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; -import static org.elasticsearch.index.query.QueryBuilders.regexpQuery; -import static org.elasticsearch.index.query.QueryBuilders.spanMultiTermQueryBuilder; -import static org.elasticsearch.index.query.QueryBuilders.spanNearQuery; -import static org.elasticsearch.index.query.QueryBuilders.spanNotQuery; -import static org.elasticsearch.index.query.QueryBuilders.spanOrQuery; -import static org.elasticsearch.index.query.QueryBuilders.spanTermQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.index.query.QueryBuilders.termsLookupQuery; -import static org.elasticsearch.index.query.QueryBuilders.termsQuery; -import static org.elasticsearch.index.query.QueryBuilders.typeQuery; -import static org.elasticsearch.index.query.QueryBuilders.wildcardQuery; -import static org.elasticsearch.index.query.QueryBuilders.wrapperQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThirdHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasScore; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.commonTermsQuery; +import static org.opensearch.index.query.QueryBuilders.constantScoreQuery; +import static org.opensearch.index.query.QueryBuilders.existsQuery; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.fuzzyQuery; +import static org.opensearch.index.query.QueryBuilders.idsQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhrasePrefixQuery; +import static org.opensearch.index.query.QueryBuilders.matchPhraseQuery; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.index.query.QueryBuilders.multiMatchQuery; +import static org.opensearch.index.query.QueryBuilders.prefixQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.rangeQuery; +import static org.opensearch.index.query.QueryBuilders.regexpQuery; +import static org.opensearch.index.query.QueryBuilders.spanMultiTermQueryBuilder; +import static org.opensearch.index.query.QueryBuilders.spanNearQuery; +import static org.opensearch.index.query.QueryBuilders.spanNotQuery; +import static org.opensearch.index.query.QueryBuilders.spanOrQuery; +import static org.opensearch.index.query.QueryBuilders.spanTermQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.index.query.QueryBuilders.termsLookupQuery; +import static org.opensearch.index.query.QueryBuilders.termsQuery; +import static org.opensearch.index.query.QueryBuilders.typeQuery; +import static org.opensearch.index.query.QueryBuilders.wildcardQuery; +import static org.opensearch.index.query.QueryBuilders.wrapperQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSecondHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertThirdHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasScore; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -public class SearchQueryIT extends ESIntegTestCase { +public class SearchQueryIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SimpleQueryStringIT.java b/server/src/internalClusterTest/java/org/opensearch/search/query/SimpleQueryStringIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/query/SimpleQueryStringIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/query/SimpleQueryStringIT.java index 67cbcbbd944..e0c78b96ea1 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/query/SimpleQueryStringIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/query/SimpleQueryStringIT.java @@ -17,35 +17,37 @@ * under the License. */ -package org.elasticsearch.search.query; +package org.opensearch.search.query; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.elasticsearch.ExceptionsHelper; + +import org.opensearch.ExceptionsHelper; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.analysis.PreConfiguredTokenFilter; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.Operator; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.QueryStringQueryBuilder; -import org.elasticsearch.index.query.SimpleQueryStringFlag; -import org.elasticsearch.plugins.AnalysisPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.SearchModule; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.analysis.PreConfiguredTokenFilter; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.index.query.BoolQueryBuilder; +import org.opensearch.index.query.Operator; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.QueryStringQueryBuilder; +import org.opensearch.index.query.SimpleQueryStringFlag; +import org.opensearch.plugins.AnalysisPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.SearchModule; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; + import org.junit.BeforeClass; import java.io.IOException; @@ -58,19 +60,19 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import static java.util.Collections.singletonList; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.simpleQueryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.simpleQueryStringQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.StreamsUtils.copyToStringFromClasspath; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -78,7 +80,7 @@ import static org.hamcrest.Matchers.equalTo; /** * Tests for the {@code simple_query_string} query */ -public class SimpleQueryStringIT extends ESIntegTestCase { +public class SimpleQueryStringIT extends OpenSearchIntegTestCase { private static int CLUSTER_MAX_CLAUSE_COUNT; @@ -411,7 +413,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testBasicAllQuery() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); @@ -435,7 +437,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testWithDate() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); @@ -462,7 +464,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testWithLotsOfTypes() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); @@ -495,12 +497,12 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testDocWithAllTypes() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); List reqs = new ArrayList<>(); - String docBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-example-document.json"); + String docBody = copyToStringFromClasspath("/org/opensearch/search/query/all-example-document.json"); reqs.add(client().prepareIndex("test", "_doc", "1").setSource(docBody, XContentType.JSON)); indexRandom(true, false, reqs); @@ -541,7 +543,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testKeywordWithWhitespace() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); @@ -561,7 +563,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testAllFieldsWithSpecifiedLeniency() throws IOException { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); prepareCreate("test").setSource(indexBody, XContentType.JSON).get(); ensureGreen("test"); @@ -608,7 +610,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testFieldAlias() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); assertAcked(prepareCreate("test").setSource(indexBody, XContentType.JSON)); ensureGreen("test"); @@ -628,7 +630,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testFieldAliasWithWildcardField() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); assertAcked(prepareCreate("test").setSource(indexBody, XContentType.JSON)); ensureGreen("test"); @@ -648,7 +650,7 @@ public class SimpleQueryStringIT extends ESIntegTestCase { } public void testFieldAliasOnDisallowedFieldType() throws Exception { - String indexBody = copyToStringFromClasspath("/org/elasticsearch/search/query/all-query-index.json"); + String indexBody = copyToStringFromClasspath("/org/opensearch/search/query/all-query-index.json"); assertAcked(prepareCreate("test").setSource(indexBody, XContentType.JSON)); ensureGreen("test"); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/scriptfilter/ScriptQuerySearchIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/scriptfilter/ScriptQuerySearchIT.java index 10e7e19a63a..14b69169007 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/scriptfilter/ScriptQuerySearchIT.java @@ -17,23 +17,23 @@ * under the License. */ -package org.elasticsearch.search.scriptfilter; +package org.opensearch.search.scriptfilter; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.IndexModule; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.IndexModule; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.Arrays; @@ -46,14 +46,14 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import static java.util.Collections.emptyMap; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.scriptQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.scriptQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE) -public class ScriptQuerySearchIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE) +public class ScriptQuerySearchIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/DuelScrollIT.java b/server/src/internalClusterTest/java/org/opensearch/search/scroll/DuelScrollIT.java similarity index 91% rename from server/src/internalClusterTest/java/org/elasticsearch/search/scroll/DuelScrollIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/scroll/DuelScrollIT.java index b3ce01c6f03..b8a7a8e8c69 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/DuelScrollIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/scroll/DuelScrollIT.java @@ -17,32 +17,32 @@ * under the License. */ -package org.elasticsearch.search.scroll; +package org.opensearch.search.scroll; import com.carrotsearch.hppc.IntHashSet; import com.carrotsearch.randomizedtesting.generators.RandomPicks; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.sort.SortBuilder; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.search.sort.SortBuilder; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.equalTo; -public class DuelScrollIT extends ESIntegTestCase { +public class DuelScrollIT extends OpenSearchIntegTestCase { public void testDuelQueryThenFetch() throws Exception { TestContext context = create(SearchType.DFS_QUERY_THEN_FETCH, SearchType.QUERY_THEN_FETCH); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java b/server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollIT.java index 2b773d5bc26..282be77b800 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollIT.java @@ -17,53 +17,54 @@ * under the License. */ -package org.elasticsearch.search.scroll; +package org.opensearch.search.scroll; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.search.ClearScrollResponse; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.RangeQueryBuilder; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.search.ClearScrollResponse; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.SearchType; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.Priority; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.MatchAllQueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.RangeQueryBuilder; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.search.SearchHit; +import org.opensearch.search.sort.FieldSortBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.hamcrest.OpenSearchAssertions; + import org.junit.After; import java.io.IOException; import java.util.Collections; import java.util.Map; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -73,7 +74,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * Tests for scrolling. */ -public class SearchScrollIT extends ESIntegTestCase { +public class SearchScrollIT extends OpenSearchIntegTestCase { @After public void cleanup() throws Exception { assertAcked(client().admin().cluster().prepareUpdateSettings() @@ -471,7 +472,7 @@ public class SearchScrollIT extends ESIntegTestCase { SearchResponse response = builder.get(); try { - ElasticsearchAssertions.assertHitCount(response, 1L); + OpenSearchAssertions.assertHitCount(response, 1L); } finally { String scrollId = response.getScrollId(); if (scrollId != null) { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java b/server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollWithFailingNodesIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollWithFailingNodesIT.java index 23cb1301c5f..eb03be4867d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/scroll/SearchScrollWithFailingNodesIT.java @@ -17,28 +17,28 @@ * under the License. */ -package org.elasticsearch.search.scroll; +package org.opensearch.search.scroll; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.lessThan; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class SearchScrollWithFailingNodesIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0) +public class SearchScrollWithFailingNodesIT extends OpenSearchIntegTestCase { @Override protected int numberOfShards() { return 2; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/searchafter/SearchAfterIT.java b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/searchafter/SearchAfterIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java index 5d8cd712c47..e428b629324 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/searchafter/SearchAfterIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/searchafter/SearchAfterIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.search.searchafter; +package org.opensearch.search.searchafter; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.common.UUIDs; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.search.SearchHit; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import org.hamcrest.Matchers; import java.util.List; @@ -38,13 +38,13 @@ import java.util.Comparator; import java.util.Collections; import java.util.Arrays; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class SearchAfterIT extends ESIntegTestCase { +public class SearchAfterIT extends OpenSearchIntegTestCase { private static final String INDEX_NAME = "test"; private static final String TYPE_NAME = "type1"; private static final int NUM_DOCS = 100; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java index 4dae277463e..8d9b989e517 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/simple/SimpleSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java @@ -17,45 +17,45 @@ * under the License. */ -package org.elasticsearch.search.simple; +package org.opensearch.search.simple; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.WriteRequest.RefreshPolicy; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.TermQueryBuilder; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.WriteRequest.RefreshPolicy; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.TermQueryBuilder; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.rescore.QueryRescorerBuilder; -import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.rescore.QueryRescorerBuilder; +import org.opensearch.search.sort.SortOrder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.boolQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.index.query.QueryBuilders.rangeQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.boolQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.index.query.QueryBuilders.rangeQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -public class SimpleSearchIT extends ESIntegTestCase { +public class SimpleSearchIT extends OpenSearchIntegTestCase { public void testSearchNullIndex() { expectThrows(NullPointerException.class, diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/slice/SearchSliceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/slice/SearchSliceIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/slice/SearchSliceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/slice/SearchSliceIT.java index 70243b9f97f..25809bfa710 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/slice/SearchSliceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/slice/SearchSliceIT.java @@ -17,24 +17,25 @@ * under the License. */ -package org.elasticsearch.search.slice; +package org.opensearch.search.slice; import org.opensearch.action.admin.indices.alias.IndicesAliasesRequest; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.search.Scroll; -import org.elasticsearch.search.SearchException; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.sort.SortBuilders; -import org.elasticsearch.test.ESIntegTestCase; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.search.Scroll; +import org.opensearch.search.SearchException; +import org.opensearch.search.SearchHit; +import org.opensearch.search.sort.SortBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.List; @@ -42,13 +43,13 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.startsWith; -public class SearchSliceIT extends ESIntegTestCase { +public class SearchSliceIT extends OpenSearchIntegTestCase { private void setupIndex(int numDocs, int numberOfShards) throws IOException, ExecutionException, InterruptedException { String mapping = Strings.toString(XContentFactory.jsonBuilder(). startObject() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java b/server/src/internalClusterTest/java/org/opensearch/search/sort/FieldSortIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/sort/FieldSortIT.java index 5a8d532cf9c..d279a786c9a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/FieldSortIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/sort/FieldSortIT.java @@ -17,36 +17,38 @@ * under the License. */ -package org.elasticsearch.search.sort; +package org.opensearch.search.sort; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.UnicodeUtil; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; +import org.opensearch.action.bulk.BulkRequestBuilder; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.functionscore.ScoreFunctionBuilders; +import org.opensearch.indices.IndicesService; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.SearchHits; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; + import org.hamcrest.Matchers; import java.io.IOException; @@ -66,18 +68,18 @@ import java.util.TreeMap; import java.util.concurrent.ExecutionException; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; -import static org.elasticsearch.script.MockScriptPlugin.NAME; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.functionScoreQuery; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; +import static org.opensearch.script.MockScriptPlugin.NAME; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSecondHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -89,7 +91,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -public class FieldSortIT extends ESIntegTestCase { +public class FieldSortIT extends OpenSearchIntegTestCase { public static class CustomScriptPlugin extends MockScriptPlugin { @Override protected Map, Object>> pluginScripts() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceIT.java b/server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceIT.java index 51b3bd10fbd..6a95d6e0df7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceIT.java @@ -17,37 +17,37 @@ * under the License. */ -package org.elasticsearch.search.sort; +package org.opensearch.search.sort; -import org.elasticsearch.Version; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoDistance; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.geometry.utils.Geohash; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoDistance; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.geometry.utils.Geohash; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.io.IOException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFirstHit; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -public class GeoDistanceIT extends ESIntegTestCase { +public class GeoDistanceIT extends OpenSearchIntegTestCase { @Override protected boolean forbidPrivateIndexSettings() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java b/server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceSortBuilderIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceSortBuilderIT.java index ee28d59ae0d..2cb8aecb9f2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/sort/GeoDistanceSortBuilderIT.java @@ -17,20 +17,20 @@ * under the License. */ -package org.elasticsearch.search.sort; +package org.opensearch.search.sort; -import org.elasticsearch.Version; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.geo.GeoDistance; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.DistanceUnit; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.index.query.GeoValidationMethod; -import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.VersionUtils; +import org.opensearch.Version; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.geo.GeoDistance; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.DistanceUnit; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.index.query.GeoValidationMethod; +import org.opensearch.search.builder.SearchSourceBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.VersionUtils; import java.io.IOException; import java.util.ArrayList; @@ -39,15 +39,15 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.search.sort.SortBuilders.fieldSort; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertOrderedSearchHits; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSortValues; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.search.sort.SortBuilders.fieldSort; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertOrderedSearchHits; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSortValues; import static org.hamcrest.Matchers.closeTo; -public class GeoDistanceSortBuilderIT extends ESIntegTestCase { +public class GeoDistanceSortBuilderIT extends OpenSearchIntegTestCase { private static final String LOCATION_FIELD = "location"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/SimpleSortIT.java b/server/src/internalClusterTest/java/org/opensearch/search/sort/SimpleSortIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/search/sort/SimpleSortIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/sort/SimpleSortIT.java index e59f33b5a20..715821b0a93 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/sort/SimpleSortIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/sort/SimpleSortIT.java @@ -17,25 +17,25 @@ * under the License. */ -package org.elasticsearch.search.sort; +package org.opensearch.search.sort; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.ShardSearchFailure; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.geo.GeoUtils; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.index.fielddata.ScriptDocValues; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.SearchHit; -import org.elasticsearch.search.sort.ScriptSortBuilder.ScriptSortType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.search.ShardSearchFailure; +import org.opensearch.common.Strings; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.geo.GeoUtils; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.index.fielddata.ScriptDocValues; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.SearchHit; +import org.opensearch.search.sort.ScriptSortBuilder.ScriptSortType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.ArrayList; @@ -48,19 +48,19 @@ import java.util.Map; import java.util.Random; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.index.query.QueryBuilders.termQuery; -import static org.elasticsearch.search.sort.SortBuilders.scriptSort; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.index.query.QueryBuilders.termQuery; +import static org.opensearch.search.sort.SortBuilders.scriptSort; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class SimpleSortIT extends ESIntegTestCase { +public class SimpleSortIT extends OpenSearchIntegTestCase { private static final String DOUBLE_APOSTROPHE = "\u0027\u0027"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/source/MetadataFetchingIT.java b/server/src/internalClusterTest/java/org/opensearch/search/source/MetadataFetchingIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/search/source/MetadataFetchingIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/source/MetadataFetchingIT.java index 2abf7a75eae..24f594eabdd 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/source/MetadataFetchingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/source/MetadataFetchingIT.java @@ -16,28 +16,28 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.source; +package org.opensearch.search.source; import org.apache.lucene.search.join.ScoreMode; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.index.query.InnerHitBuilder; -import org.elasticsearch.index.query.NestedQueryBuilder; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.search.SearchException; -import org.elasticsearch.search.SearchHits; -import org.elasticsearch.search.fetch.subphase.FetchSourceContext; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.index.query.InnerHitBuilder; +import org.opensearch.index.query.NestedQueryBuilder; +import org.opensearch.index.query.TermQueryBuilder; +import org.opensearch.search.SearchException; +import org.opensearch.search.SearchHits; +import org.opensearch.search.fetch.subphase.FetchSourceContext; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collections; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class MetadataFetchingIT extends ESIntegTestCase { +public class MetadataFetchingIT extends OpenSearchIntegTestCase { public void testSimple() { assertAcked(prepareCreate("test")); ensureGreen(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/source/SourceFetchingIT.java b/server/src/internalClusterTest/java/org/opensearch/search/source/SourceFetchingIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/source/SourceFetchingIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/source/SourceFetchingIT.java index a7df3bc6883..fb352570888 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/source/SourceFetchingIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/source/SourceFetchingIT.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.search.source; +package org.opensearch.search.source; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.test.OpenSearchIntegTestCase; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.core.IsEqual.equalTo; -public class SourceFetchingIT extends ESIntegTestCase { +public class SourceFetchingIT extends OpenSearchIntegTestCase { public void testSourceDefaultBehavior() { createIndex("test"); ensureGreen(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/search/stats/SearchStatsIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/stats/SearchStatsIT.java index 0d14cb818ff..8f768ad2139 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/stats/SearchStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/stats/SearchStatsIT.java @@ -17,26 +17,26 @@ * under the License. */ -package org.elasticsearch.search.stats; +package org.opensearch.search.stats; import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.routing.GroupShardsIterator; -import org.elasticsearch.cluster.routing.ShardIterator; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.search.stats.SearchStats.Stats; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.routing.GroupShardsIterator; +import org.opensearch.cluster.routing.ShardIterator; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.search.stats.SearchStats.Stats; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.search.fetch.subphase.highlight.HighlightBuilder; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; @@ -45,13 +45,13 @@ import java.util.Map; import java.util.Set; import java.util.function.Function; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @@ -59,8 +59,8 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class SearchStatsIT extends ESIntegTestCase { +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchStatsIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/suggest/CompletionSuggestSearchIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/suggest/CompletionSuggestSearchIT.java index e6312efd525..a9342c0d0b7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/suggest/CompletionSuggestSearchIT.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.suggest; +package org.opensearch.search.suggest; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.apache.lucene.analysis.TokenStreamToAutomaton; @@ -26,29 +26,29 @@ import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; import org.opensearch.action.admin.indices.segments.IndexShardSegments; import org.opensearch.action.admin.indices.segments.ShardSegments; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.common.FieldMemoryStats; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.Fuzziness; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.search.aggregations.AggregationBuilders; -import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode; -import org.elasticsearch.search.sort.FieldSortBuilder; -import org.elasticsearch.search.suggest.completion.CompletionStats; -import org.elasticsearch.search.suggest.completion.CompletionSuggestion; -import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder; -import org.elasticsearch.search.suggest.completion.FuzzyOptions; -import org.elasticsearch.search.suggest.completion.context.CategoryContextMapping; -import org.elasticsearch.search.suggest.completion.context.ContextMapping; -import org.elasticsearch.search.suggest.completion.context.GeoContextMapping; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.common.FieldMemoryStats; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.Fuzziness; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.mapper.MapperParsingException; +import org.opensearch.plugins.Plugin; +import org.opensearch.search.aggregations.AggregationBuilders; +import org.opensearch.search.aggregations.Aggregator.SubAggCollectionMode; +import org.opensearch.search.sort.FieldSortBuilder; +import org.opensearch.search.suggest.completion.CompletionStats; +import org.opensearch.search.suggest.completion.CompletionSuggestion; +import org.opensearch.search.suggest.completion.CompletionSuggestionBuilder; +import org.opensearch.search.suggest.completion.FuzzyOptions; +import org.opensearch.search.suggest.completion.context.CategoryContextMapping; +import org.opensearch.search.suggest.completion.context.ContextMapping; +import org.opensearch.search.suggest.completion.context.GeoContextMapping; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.io.IOException; import java.util.ArrayList; @@ -61,15 +61,15 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.common.util.CollectionUtils.iterableAsArrayList; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasScore; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.common.util.CollectionUtils.iterableAsArrayList; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasId; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.hasScore; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -81,7 +81,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; @SuppressCodecs("*") // requires custom completion format -public class CompletionSuggestSearchIT extends ESIntegTestCase { +public class CompletionSuggestSearchIT extends OpenSearchIntegTestCase { private final String INDEX = RandomStrings.randomAsciiOfLength(random(), 10).toLowerCase(Locale.ROOT); private final String TYPE = RandomStrings.randomAsciiOfLength(random(), 10).toLowerCase(Locale.ROOT); private final String FIELD = RandomStrings.randomAsciiOfLength(random(), 10).toLowerCase(Locale.ROOT); @@ -742,7 +742,7 @@ public class CompletionSuggestSearchIT extends ESIntegTestCase { refresh(); // suggestion with a character, which needs unicode awareness - org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder completionSuggestionBuilder = + org.opensearch.search.suggest.completion.CompletionSuggestionBuilder completionSuggestionBuilder = SuggestBuilders.completionSuggestion(FIELD).prefix("öööи", FuzzyOptions.builder().setUnicodeAware(true).build()).size(10); SearchResponse searchResponse = client().prepareSearch(INDEX).suggest(new SuggestBuilder() diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/suggest/ContextCompletionSuggestSearchIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/suggest/ContextCompletionSuggestSearchIT.java index a54ec655fda..4b6261afe57 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/ContextCompletionSuggestSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/suggest/ContextCompletionSuggestSearchIT.java @@ -16,28 +16,29 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.search.suggest; +package org.opensearch.search.suggest; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.apache.lucene.util.LuceneTestCase.SuppressCodecs; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.geo.GeoPoint; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.Fuzziness; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.XContentBuilder; + +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.geo.GeoPoint; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.Fuzziness; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.rest.RestStatus; -import org.elasticsearch.search.suggest.CompletionSuggestSearchIT.CompletionMappingBuilder; -import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder; -import org.elasticsearch.search.suggest.completion.context.CategoryContextMapping; -import org.elasticsearch.search.suggest.completion.context.CategoryQueryContext; -import org.elasticsearch.search.suggest.completion.context.ContextBuilder; -import org.elasticsearch.search.suggest.completion.context.ContextMapping; -import org.elasticsearch.search.suggest.completion.context.GeoContextMapping; -import org.elasticsearch.search.suggest.completion.context.GeoQueryContext; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.search.suggest.CompletionSuggestSearchIT.CompletionMappingBuilder; +import org.opensearch.search.suggest.completion.CompletionSuggestionBuilder; +import org.opensearch.search.suggest.completion.context.CategoryContextMapping; +import org.opensearch.search.suggest.completion.context.CategoryQueryContext; +import org.opensearch.search.suggest.completion.context.ContextBuilder; +import org.opensearch.search.suggest.completion.context.ContextMapping; +import org.opensearch.search.suggest.completion.context.GeoContextMapping; +import org.opensearch.search.suggest.completion.context.GeoQueryContext; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -49,13 +50,13 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.core.IsEqual.equalTo; @SuppressCodecs("*") // requires custom completion format -public class ContextCompletionSuggestSearchIT extends ESIntegTestCase { +public class ContextCompletionSuggestSearchIT extends OpenSearchIntegTestCase { private final String INDEX = RandomStrings.randomAsciiOfLength(random(), 10).toLowerCase(Locale.ROOT); private final String TYPE = RandomStrings.randomAsciiOfLength(random(), 10).toLowerCase(Locale.ROOT); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/SuggestSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/suggest/SuggestSearchIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/search/suggest/SuggestSearchIT.java rename to server/src/internalClusterTest/java/org/opensearch/search/suggest/SuggestSearchIT.java index 7d97ba59c4b..ab7b8640ca8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/search/suggest/SuggestSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/suggest/SuggestSearchIT.java @@ -17,33 +17,33 @@ * under the License. */ -package org.elasticsearch.search.suggest; +package org.opensearch.search.suggest; -import org.elasticsearch.OpenSearchException; +import org.opensearch.OpenSearchException; import org.opensearch.action.admin.indices.create.CreateIndexRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.ScriptPlugin; -import org.elasticsearch.script.ScriptContext; -import org.elasticsearch.script.ScriptEngine; -import org.elasticsearch.script.TemplateScript; -import org.elasticsearch.search.suggest.phrase.DirectCandidateGeneratorBuilder; -import org.elasticsearch.search.suggest.phrase.Laplace; -import org.elasticsearch.search.suggest.phrase.LinearInterpolation; -import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder; -import org.elasticsearch.search.suggest.phrase.StupidBackoff; -import org.elasticsearch.search.suggest.term.TermSuggestionBuilder; -import org.elasticsearch.search.suggest.term.TermSuggestionBuilder.SuggestMode; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.search.SearchPhaseExecutionException; +import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.IndexSettings; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.ScriptPlugin; +import org.opensearch.script.ScriptContext; +import org.opensearch.script.ScriptEngine; +import org.opensearch.script.TemplateScript; +import org.opensearch.search.suggest.phrase.DirectCandidateGeneratorBuilder; +import org.opensearch.search.suggest.phrase.Laplace; +import org.opensearch.search.suggest.phrase.LinearInterpolation; +import org.opensearch.search.suggest.phrase.PhraseSuggestionBuilder; +import org.opensearch.search.suggest.phrase.StupidBackoff; +import org.opensearch.search.suggest.term.TermSuggestionBuilder; +import org.opensearch.search.suggest.term.TermSuggestionBuilder.SuggestMode; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.hamcrest.OpenSearchAssertions; import java.io.IOException; import java.net.URISyntaxException; @@ -58,17 +58,17 @@ import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.ExecutionException; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.search.suggest.SuggestBuilders.phraseSuggestion; -import static org.elasticsearch.search.suggest.SuggestBuilders.termSuggestion; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSuggestion; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSuggestionPhraseCollateMatchExists; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSuggestionSize; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.search.suggest.SuggestBuilders.phraseSuggestion; +import static org.opensearch.search.suggest.SuggestBuilders.termSuggestion; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSuggestion; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSuggestionPhraseCollateMatchExists; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertSuggestionSize; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.equalTo; @@ -80,7 +80,7 @@ import static org.hamcrest.Matchers.nullValue; * possible these tests should declare for the first request, make the request, modify the configuration for the next request, make that * request, modify again, request again, etc. This makes it very obvious what changes between requests. */ -public class SuggestSearchIT extends ESIntegTestCase { +public class SuggestSearchIT extends OpenSearchIntegTestCase { // see #3196 public void testSuggestAcrossMultipleIndices() throws IOException { @@ -707,7 +707,7 @@ public class SuggestSearchIT extends ESIntegTestCase { Suggest suggest = searchSuggest( "foobar", "simple", termSuggestion("field1") .size(10).minDocFreq(0).suggestMode(SuggestMode.ALWAYS)); - ElasticsearchAssertions.assertSuggestionSize(suggest, 0, 3, "simple"); + OpenSearchAssertions.assertSuggestionSize(suggest, 0, 3, "simple"); } // see #3469 @@ -756,8 +756,8 @@ public class SuggestSearchIT extends ESIntegTestCase { new SuggestBuilder().setGlobalText("tetsting sugestion").addSuggestion("did_you_mean", phraseSuggestion("name").maxErrors(5.0f))) .get(); - ElasticsearchAssertions.assertNoFailures(searchResponse); - ElasticsearchAssertions.assertSuggestion(searchResponse.getSuggest(), 0, 0, "did_you_mean", "testing suggestions"); + OpenSearchAssertions.assertNoFailures(searchResponse); + OpenSearchAssertions.assertSuggestion(searchResponse.getSuggest(), 0, 0, "did_you_mean", "testing suggestions"); } // see #3469 diff --git a/server/src/internalClusterTest/java/org/elasticsearch/similarity/SimilarityIT.java b/server/src/internalClusterTest/java/org/opensearch/similarity/SimilarityIT.java similarity index 87% rename from server/src/internalClusterTest/java/org/elasticsearch/similarity/SimilarityIT.java rename to server/src/internalClusterTest/java/org/opensearch/similarity/SimilarityIT.java index fe21f53fd6f..a3492d33e96 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/similarity/SimilarityIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/similarity/SimilarityIT.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.similarity; +package org.opensearch.similarity; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; -import static org.elasticsearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.action.support.WriteRequest.RefreshPolicy.IMMEDIATE; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.index.query.QueryBuilders.matchQuery; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; -public class SimilarityIT extends ESIntegTestCase { +public class SimilarityIT extends OpenSearchIntegTestCase { public void testCustomBM25Similarity() throws Exception { try { client().admin().indices().prepareDelete("test").execute().actionGet(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/AbortedRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/AbortedRestoreIT.java similarity index 90% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/AbortedRestoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/AbortedRestoreIT.java index db7ac6e1df2..323411b2a8d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/AbortedRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/AbortedRestoreIT.java @@ -17,31 +17,32 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.indices.recovery.RecoveryResponse; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.threadpool.ThreadPool; -import org.elasticsearch.threadpool.ThreadPoolStats; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.cluster.routing.RecoverySource; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.threadpool.ThreadPoolStats; + import org.hamcrest.Matcher; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.StreamSupport; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class AbortedRestoreIT extends AbstractSnapshotIntegTestCase { public void testAbortedRestoreAlsoAbortFileRestores() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/BlobStoreIncrementalityIT.java similarity index 94% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/BlobStoreIncrementalityIT.java index c58b3f34d0a..fe8f68cb76c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/BlobStoreIncrementalityIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/BlobStoreIncrementalityIT.java @@ -16,7 +16,8 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; + +package org.opensearch.snapshots; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; @@ -24,14 +25,14 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStats; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; import org.opensearch.action.admin.indices.forcemerge.ForceMergeResponse; import org.opensearch.action.admin.indices.stats.IndexStats; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.bulk.BulkRequest; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.bulk.BulkRequest; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import java.io.IOException; import java.util.ArrayList; @@ -41,7 +42,7 @@ import java.util.concurrent.ExecutionException; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class BlobStoreIncrementalityIT extends AbstractSnapshotIntegTestCase { public void testIncrementalBehaviorOnPrimaryFailover() throws InterruptedException, ExecutionException, IOException { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/CloneSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/CloneSnapshotIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/CloneSnapshotIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/CloneSnapshotIT.java index 342adf445e5..e477aea2d25 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/CloneSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/CloneSnapshotIT.java @@ -16,46 +16,46 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotIndexStatus; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.SnapshotsInProgress; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.SnapshotsInProgress; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; import org.opensearch.action.ActionRunnable; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot; -import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots; -import org.elasticsearch.index.snapshots.blobstore.SnapshotFiles; -import org.elasticsearch.repositories.IndexId; -import org.elasticsearch.repositories.RepositoryShardId; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.common.UUIDs; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot; +import org.opensearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots; +import org.opensearch.index.snapshots.blobstore.SnapshotFiles; +import org.opensearch.repositories.IndexId; +import org.opensearch.repositories.RepositoryShardId; +import org.opensearch.repositories.blobstore.BlobStoreRepository; import java.nio.file.Path; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class CloneSnapshotIT extends AbstractSnapshotIntegTestCase { public void testShardClone() throws Exception { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/ConcurrentSnapshotsIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/ConcurrentSnapshotsIT.java index b3cfd20a5bb..94ac16d3c5c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/ConcurrentSnapshotsIT.java @@ -16,10 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import com.carrotsearch.hppc.cursors.ObjectCursor; -import org.elasticsearch.OpenSearchException; + +import org.opensearch.OpenSearchException; import org.opensearch.action.ActionFuture; import org.opensearch.action.ActionListener; import org.opensearch.action.StepListener; @@ -27,28 +28,28 @@ import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRespon import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; -import org.elasticsearch.action.support.GroupedActionListener; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.SnapshotDeletionsInProgress; -import org.elasticsearch.cluster.SnapshotsInProgress; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.UncategorizedExecutionException; -import org.elasticsearch.discovery.AbstractDisruptionTestCase; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.repositories.RepositoryException; -import org.elasticsearch.repositories.ShardGenerations; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.action.support.GroupedActionListener; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.SnapshotDeletionsInProgress; +import org.opensearch.cluster.SnapshotsInProgress; +import org.opensearch.common.Strings; +import org.opensearch.common.UUIDs; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.UncategorizedExecutionException; +import org.opensearch.discovery.AbstractDisruptionTestCase; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.repositories.RepositoryException; +import org.opensearch.repositories.ShardGenerations; +import org.opensearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.transport.MockTransportService; import java.io.IOException; import java.nio.file.Files; @@ -62,10 +63,10 @@ import java.util.List; import java.util.Locale; import java.util.concurrent.TimeUnit; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFileExists; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFileExists; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; @@ -78,7 +79,7 @@ import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0) public class ConcurrentSnapshotsIT extends AbstractSnapshotIntegTestCase { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/CorruptedBlobStoreRepositoryIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/CorruptedBlobStoreRepositoryIT.java index d311d00ca5b..e0ecf7a12c8 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/CorruptedBlobStoreRepositoryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/CorruptedBlobStoreRepositoryIT.java @@ -16,33 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; -import org.elasticsearch.Version; +package org.opensearch.snapshots; + +import org.opensearch.Version; import org.opensearch.action.ActionRunnable; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.metadata.RepositoriesMetadata; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.repositories.IndexId; -import org.elasticsearch.repositories.IndexMetaDataGenerations; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.repositories.Repository; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.repositories.RepositoryException; -import org.elasticsearch.repositories.ShardGenerations; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.metadata.RepositoriesMetadata; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.repositories.IndexId; +import org.opensearch.repositories.IndexMetaDataGenerations; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.repositories.Repository; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.repositories.RepositoryException; +import org.opensearch.repositories.ShardGenerations; +import org.opensearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.threadpool.ThreadPool; import java.io.IOException; import java.nio.channels.SeekableByteChannel; @@ -58,9 +59,9 @@ import java.util.function.Function; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFileExists; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFileExists; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java similarity index 95% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java index 86375758352..9a4d4a884ad 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/DedicatedClusterSnapshotRestoreIT.java @@ -17,11 +17,12 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import com.carrotsearch.hppc.IntHashSet; import com.carrotsearch.hppc.IntSet; -import org.elasticsearch.Version; + +import org.opensearch.Version; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; @@ -31,63 +32,63 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStats; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.NamedDiff; -import org.elasticsearch.cluster.SnapshotsInProgress; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.Priority; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.SettingsFilter; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.common.util.set.Sets; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.env.Environment; -import org.elasticsearch.index.seqno.RetentionLeaseActions; -import org.elasticsearch.index.seqno.RetentionLeases; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; -import org.elasticsearch.indices.recovery.RecoveryState; -import org.elasticsearch.node.Node; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.RepositoryMissingException; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.client.node.NodeClient; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.NamedDiff; +import org.opensearch.cluster.SnapshotsInProgress; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.CheckedFunction; +import org.opensearch.common.ParseField; +import org.opensearch.common.Priority; +import org.opensearch.common.Strings; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.settings.SettingsFilter; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.common.util.set.Sets; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.env.Environment; +import org.opensearch.index.seqno.RetentionLeaseActions; +import org.opensearch.index.seqno.RetentionLeases; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.recovery.PeerRecoveryTargetService; +import org.opensearch.indices.recovery.RecoveryState; +import org.opensearch.node.Node; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.RepositoryMissingException; +import org.opensearch.repositories.blobstore.BlobStoreRepository; import org.opensearch.rest.AbstractRestChannel; import org.opensearch.rest.RestRequest; import org.opensearch.rest.RestResponse; import org.opensearch.rest.RestStatus; import org.opensearch.rest.action.admin.cluster.RestClusterStateAction; import org.opensearch.rest.action.admin.cluster.RestGetRepositoriesAction; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.TestCustomMetadata; -import org.elasticsearch.test.disruption.BusyMasterServiceDisruption; -import org.elasticsearch.test.disruption.ServiceDisruptionScheme; -import org.elasticsearch.test.rest.FakeRestRequest; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.TransportMessageListener; -import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.transport.TransportRequestOptions; -import org.elasticsearch.transport.TransportService; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.TestCustomMetadata; +import org.opensearch.test.disruption.BusyMasterServiceDisruption; +import org.opensearch.test.disruption.ServiceDisruptionScheme; +import org.opensearch.test.rest.FakeRestRequest; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.TransportMessageListener; +import org.opensearch.transport.TransportRequest; +import org.opensearch.transport.TransportRequestOptions; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.io.UncheckedIOException; @@ -109,11 +110,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; -import static org.elasticsearch.index.seqno.RetentionLeaseActions.RETAIN_ALL; -import static org.elasticsearch.test.NodeRoles.nonMasterNode; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.index.seqno.RetentionLeaseActions.RETAIN_ALL; +import static org.opensearch.test.NodeRoles.nonMasterNode; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java index 06b3106ef92..0385b5c8f36 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/MetadataLoadingDuringSnapshotRestoreIT.java @@ -17,27 +17,27 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; -import org.elasticsearch.action.support.PlainActionFuture; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.metadata.RepositoryMetadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.env.Environment; -import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.repositories.IndexId; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.repositories.Repository; -import org.elasticsearch.repositories.RepositoryData; +import org.opensearch.action.support.PlainActionFuture; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.metadata.RepositoryMetadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.env.Environment; +import org.opensearch.indices.recovery.RecoverySettings; +import org.opensearch.plugins.Plugin; +import org.opensearch.repositories.IndexId; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.repositories.Repository; +import org.opensearch.repositories.RepositoryData; import org.opensearch.rest.RestStatus; -import org.elasticsearch.snapshots.mockstore.MockRepository; +import org.opensearch.snapshots.mockstore.MockRepository; import java.io.IOException; import java.util.Collection; @@ -46,7 +46,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.instanceOf; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MultiClusterRepoAccessIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/MultiClusterRepoAccessIT.java similarity index 83% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/MultiClusterRepoAccessIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/MultiClusterRepoAccessIT.java index c2574b4c856..c9cf4296c43 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/MultiClusterRepoAccessIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/MultiClusterRepoAccessIT.java @@ -16,21 +16,21 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; -import org.elasticsearch.common.network.NetworkModule; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.repositories.RepositoryException; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.MockHttpTransport; -import org.elasticsearch.test.NodeConfigurationSource; -import org.elasticsearch.test.transport.MockTransportService; -import org.elasticsearch.transport.nio.MockNioTransportPlugin; +import org.opensearch.common.network.NetworkModule; +import org.opensearch.common.settings.Settings; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.env.Environment; +import org.opensearch.repositories.RepositoryException; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.MockHttpTransport; +import org.opensearch.test.NodeConfigurationSource; +import org.opensearch.test.transport.MockTransportService; +import org.opensearch.transport.nio.MockNioTransportPlugin; import org.junit.After; import org.junit.Before; @@ -39,7 +39,7 @@ import java.nio.file.Path; import java.util.Arrays; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.containsString; public class MultiClusterRepoAccessIT extends AbstractSnapshotIntegTestCase { @@ -63,7 +63,7 @@ public class MultiClusterRepoAccessIT extends AbstractSnapshotIntegTestCase { public Path nodeConfigPath(int nodeOrdinal) { return null; } - }, 0, "leader", Arrays.asList(ESIntegTestCase.TestSeedPlugin.class, + }, 0, "leader", Arrays.asList(OpenSearchIntegTestCase.TestSeedPlugin.class, MockHttpTransport.TestPlugin.class, MockTransportService.TestPlugin.class, MockNioTransportPlugin.class, InternalSettingsPlugin.class, MockRepository.Plugin.class), Function.identity()); secondCluster.beforeTest(random(), 0); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoriesIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoriesIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoriesIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoriesIT.java index 2bdbf822beb..bb3f8eeb4fe 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoriesIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoriesIT.java @@ -16,33 +16,34 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; + +package org.opensearch.snapshots; import org.opensearch.action.admin.cluster.repositories.get.GetRepositoriesResponse; import org.opensearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse; import org.opensearch.action.admin.cluster.state.ClusterStateResponse; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.metadata.RepositoriesMetadata; -import org.elasticsearch.cluster.metadata.RepositoryMetadata; -import org.elasticsearch.common.io.FileSystemUtils; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.repositories.RepositoryException; -import org.elasticsearch.repositories.RepositoryVerificationException; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.metadata.RepositoriesMetadata; +import org.opensearch.cluster.metadata.RepositoryMetadata; +import org.opensearch.common.io.FileSystemUtils; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.repositories.RepositoryException; +import org.opensearch.repositories.RepositoryVerificationException; +import org.opensearch.test.OpenSearchIntegTestCase; import java.nio.file.Path; import java.util.List; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; -@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +@OpenSearchIntegTestCase.ClusterScope(minNumDataNodes = 2) public class RepositoriesIT extends AbstractSnapshotIntegTestCase { public void testRepositoryCreation() throws Exception { Client client = client(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoryFilterUserMetadataIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoryFilterUserMetadataIT.java index fbfe9e4fd01..29a0a87b07d 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RepositoryFilterUserMetadataIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RepositoryFilterUserMetadataIT.java @@ -16,39 +16,40 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.apache.lucene.index.IndexCommit; -import org.elasticsearch.Version; + +import org.opensearch.Version; import org.opensearch.action.ActionListener; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.env.Environment; -import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus; -import org.elasticsearch.index.store.Store; -import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.RepositoryPlugin; -import org.elasticsearch.repositories.IndexId; -import org.elasticsearch.repositories.Repository; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.repositories.ShardGenerations; -import org.elasticsearch.repositories.fs.FsRepository; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.env.Environment; +import org.opensearch.index.mapper.MapperService; +import org.opensearch.index.snapshots.IndexShardSnapshotStatus; +import org.opensearch.index.store.Store; +import org.opensearch.indices.recovery.RecoverySettings; +import org.opensearch.plugins.Plugin; +import org.opensearch.plugins.RepositoryPlugin; +import org.opensearch.repositories.IndexId; +import org.opensearch.repositories.Repository; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.repositories.ShardGenerations; +import org.opensearch.repositories.fs.FsRepository; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Collection; import java.util.Collections; import java.util.Map; import java.util.function.Function; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.is; -public class RepositoryFilterUserMetadataIT extends ESIntegTestCase { +public class RepositoryFilterUserMetadataIT extends OpenSearchIntegTestCase { @Override protected Collection> nodePlugins() { @@ -68,7 +69,7 @@ public class RepositoryFilterUserMetadataIT extends ESIntegTestCase { } // Mock plugin that stores the name of the master node that started a snapshot in each snapshot's metadata - public static final class MetadataFilteringPlugin extends org.elasticsearch.plugins.Plugin implements RepositoryPlugin { + public static final class MetadataFilteringPlugin extends org.opensearch.plugins.Plugin implements RepositoryPlugin { private static final String MOCK_FILTERED_META = "mock_filtered_meta"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/RestoreSnapshotIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/RestoreSnapshotIT.java index 63bb07ded68..ef763a6a27b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/RestoreSnapshotIT.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse; import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.block.ClusterBlocks; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MappingMetadata; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.indices.InvalidIndexNameException; -import org.elasticsearch.repositories.RepositoriesService; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.client.Client; +import org.opensearch.cluster.block.ClusterBlocks; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MappingMetadata; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.indices.InvalidIndexNameException; +import org.opensearch.repositories.RepositoriesService; import org.opensearch.rest.RestStatus; import java.nio.file.Path; @@ -46,17 +46,17 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.IndexSettings.INDEX_REFRESH_INTERVAL_SETTING; -import static org.elasticsearch.index.IndexSettings.INDEX_SOFT_DELETES_SETTING; -import static org.elasticsearch.index.query.QueryBuilders.matchQuery; -import static org.elasticsearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateExists; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateMissing; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.IndexSettings.INDEX_REFRESH_INTERVAL_SETTING; +import static org.opensearch.index.IndexSettings.INDEX_SOFT_DELETES_SETTING; +import static org.opensearch.index.query.QueryBuilders.matchQuery; +import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateExists; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateMissing; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SharedClusterSnapshotRestoreIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/SharedClusterSnapshotRestoreIT.java index 225744e36ef..96b05cfd50e 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -17,12 +17,13 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.Version; + +import org.opensearch.OpenSearchException; +import org.opensearch.ExceptionsHelper; +import org.opensearch.Version; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse; @@ -36,39 +37,39 @@ import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.action.admin.indices.flush.FlushResponse; import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.ShardStats; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.RestoreInProgress; -import org.elasticsearch.cluster.SnapshotsInProgress.State; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.MetadataIndexStateService; -import org.elasticsearch.cluster.routing.IndexRoutingTable; -import org.elasticsearch.cluster.routing.RecoverySource; -import org.elasticsearch.cluster.routing.ShardRouting; -import org.elasticsearch.cluster.routing.ShardRoutingState; -import org.elasticsearch.cluster.routing.UnassignedInfo; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Numbers; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.Index; -import org.elasticsearch.index.IndexService; -import org.elasticsearch.index.engine.Engine; -import org.elasticsearch.index.engine.EngineTestCase; -import org.elasticsearch.index.shard.IndexShard; -import org.elasticsearch.index.shard.ShardId; -import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.repositories.IndexId; -import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.repositories.RepositoryData; -import org.elasticsearch.repositories.RepositoryException; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.action.support.ActiveShardCount; +import org.opensearch.action.support.IndicesOptions; +import org.opensearch.client.Client; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.RestoreInProgress; +import org.opensearch.cluster.SnapshotsInProgress.State; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.MetadataIndexStateService; +import org.opensearch.cluster.routing.IndexRoutingTable; +import org.opensearch.cluster.routing.RecoverySource; +import org.opensearch.cluster.routing.ShardRouting; +import org.opensearch.cluster.routing.ShardRoutingState; +import org.opensearch.cluster.routing.UnassignedInfo; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Numbers; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.Index; +import org.opensearch.index.IndexService; +import org.opensearch.index.engine.Engine; +import org.opensearch.index.engine.EngineTestCase; +import org.opensearch.index.shard.IndexShard; +import org.opensearch.index.shard.ShardId; +import org.opensearch.indices.IndicesService; +import org.opensearch.repositories.IndexId; +import org.opensearch.repositories.RepositoriesService; +import org.opensearch.repositories.RepositoryData; +import org.opensearch.repositories.RepositoryException; +import org.opensearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.threadpool.ThreadPool; import java.nio.channels.SeekableByteChannel; import java.nio.file.Files; @@ -86,16 +87,16 @@ import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.IntStream; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY; -import static org.elasticsearch.index.IndexSettings.INDEX_SOFT_DELETES_SETTING; -import static org.elasticsearch.index.shard.IndexShardTests.getEngineFromShard; -import static org.elasticsearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY; +import static org.opensearch.index.IndexSettings.INDEX_SOFT_DELETES_SETTING; +import static org.opensearch.index.shard.IndexShardTests.getEngineFromShard; +import static org.opensearch.indices.recovery.RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAllSuccessful; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotCustomPluginStateIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotCustomPluginStateIT.java similarity index 92% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotCustomPluginStateIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotCustomPluginStateIT.java index 6cb20c16710..10dd5245330 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotCustomPluginStateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotCustomPluginStateIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse; @@ -25,25 +25,25 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; import org.opensearch.action.admin.cluster.storedscripts.GetStoredScriptResponse; import org.opensearch.action.admin.indices.template.get.GetIndexTemplatesResponse; -import org.elasticsearch.action.ingest.DeletePipelineRequest; -import org.elasticsearch.action.ingest.GetPipelineResponse; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.ingest.IngestTestPlugin; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.script.MockScriptEngine; -import org.elasticsearch.script.StoredScriptsIT; +import org.opensearch.action.ingest.DeletePipelineRequest; +import org.opensearch.action.ingest.GetPipelineResponse; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.ingest.IngestTestPlugin; +import org.opensearch.plugins.Plugin; +import org.opensearch.script.MockScriptEngine; +import org.opensearch.script.StoredScriptsIT; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateExists; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateMissing; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateExists; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertIndexTemplateMissing; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotShardsServiceIT.java similarity index 86% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotShardsServiceIT.java index 9c1e76ece29..3f192fa77b2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShardsServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotShardsServiceIT.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.snapshots; +package org.opensearch.snapshots; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.snapshots.mockstore.MockRepository; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.NetworkDisruption; -import org.elasticsearch.test.transport.MockTransportService; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.index.snapshots.IndexShardSnapshotStatus; +import org.opensearch.plugins.Plugin; +import org.opensearch.snapshots.mockstore.MockRepository; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.NetworkDisruption; +import org.opensearch.test.transport.MockTransportService; import java.util.Arrays; import java.util.Collection; @@ -33,12 +33,12 @@ import java.util.List; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.everyItem; import static org.hamcrest.Matchers.hasSize; -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0) public class SnapshotShardsServiceIT extends AbstractSnapshotIntegTestCase { @Override diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotStatusApisIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java rename to server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotStatusApisIT.java index 56f420226a0..960a817b560 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/snapshots/SnapshotStatusApisIT.java @@ -16,9 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.snapshots; -import org.elasticsearch.Version; +package org.opensearch.snapshots; + +import org.opensearch.Version; import org.opensearch.action.ActionFuture; import org.opensearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse; import org.opensearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest; @@ -29,15 +30,15 @@ import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStats; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotStatus; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest; import org.opensearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.SnapshotsInProgress; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeUnit; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.repositories.blobstore.BlobStoreRepository; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.client.Client; +import org.opensearch.cluster.SnapshotsInProgress; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeUnit; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.repositories.blobstore.BlobStoreRepository; +import org.opensearch.threadpool.ThreadPool; import java.io.IOException; import java.nio.file.Path; @@ -49,7 +50,7 @@ import java.util.Locale; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.hasSize; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java b/server/src/internalClusterTest/java/org/opensearch/threadpool/SimpleThreadPoolIT.java similarity index 80% rename from server/src/internalClusterTest/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java rename to server/src/internalClusterTest/java/org/opensearch/threadpool/SimpleThreadPoolIT.java index 5f286a5ff0a..c36f6e922e7 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/threadpool/SimpleThreadPoolIT.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.threadpool; +package org.opensearch.threadpool; -import org.elasticsearch.action.index.IndexRequestBuilder; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; -import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.hamcrest.RegexMatcher; +import org.opensearch.action.index.IndexRequestBuilder; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; +import org.opensearch.test.InternalTestCluster; +import org.opensearch.test.hamcrest.RegexMatcher; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; @@ -35,11 +35,11 @@ import java.util.HashSet; import java.util.Set; import java.util.regex.Pattern; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class SimpleThreadPoolIT extends ESIntegTestCase { +public class SimpleThreadPoolIT extends OpenSearchIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { return Settings.builder().build(); @@ -88,14 +88,14 @@ public class SimpleThreadPoolIT extends ESIntegTestCase { logger.info("post node *new* threads are {}", threadNames); for (String threadName : threadNames) { // ignore some shared threads we know that are created within the same VM, like the shared discovery one - // or the ones that are occasionally come up from ESSingleNodeTestCase + // or the ones that are occasionally come up from OpenSearchSingleNodeTestCase if (threadName.contains("[node_s_0]") // TODO: this can't possibly be right! single node and integ test are unrelated! || threadName.contains("Keep-Alive-Timer")) { continue; } String nodePrefix = "(" + Pattern.quote(InternalTestCluster.TRANSPORT_CLIENT_PREFIX) + ")?(" + - Pattern.quote(ESIntegTestCase.SUITE_CLUSTER_NODE_PREFIX) + "|" + - Pattern.quote(ESIntegTestCase.TEST_CLUSTER_NODE_PREFIX) +")"; + Pattern.quote(OpenSearchIntegTestCase.SUITE_CLUSTER_NODE_PREFIX) + "|" + + Pattern.quote(OpenSearchIntegTestCase.TEST_CLUSTER_NODE_PREFIX) +")"; assertThat(threadName, RegexMatcher.matches("\\[" + nodePrefix + "\\d+\\]")); } } diff --git a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java b/server/src/internalClusterTest/java/org/opensearch/update/UpdateIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java rename to server/src/internalClusterTest/java/org/opensearch/update/UpdateIT.java index 5c4ec5787a6..f7c5cd1519a 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/update/UpdateIT.java @@ -17,35 +17,35 @@ * under the License. */ -package org.elasticsearch.update; +package org.opensearch.update; -import org.elasticsearch.OpenSearchTimeoutException; +import org.opensearch.OpenSearchTimeoutException; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.alias.Alias; -import org.elasticsearch.action.bulk.BulkItemResponse; -import org.elasticsearch.action.delete.DeleteRequest; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.update.UpdateRequest; -import org.elasticsearch.action.update.UpdateRequestBuilder; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.client.transport.NoNodeAvailableException; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.MergePolicyConfig; -import org.elasticsearch.index.engine.DocumentMissingException; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.plugins.Plugin; +import org.opensearch.action.bulk.BulkItemResponse; +import org.opensearch.action.delete.DeleteRequest; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.update.UpdateRequest; +import org.opensearch.action.update.UpdateRequestBuilder; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.client.transport.NoNodeAvailableException; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.MergePolicyConfig; +import org.opensearch.index.engine.DocumentMissingException; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.plugins.Plugin; import org.opensearch.rest.RestStatus; -import org.elasticsearch.script.MockScriptPlugin; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.InternalSettingsPlugin; +import org.opensearch.script.MockScriptPlugin; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptType; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.InternalSettingsPlugin; import java.util.ArrayList; import java.util.Arrays; @@ -60,15 +60,15 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.function.Function; -import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; +import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class UpdateIT extends ESIntegTestCase { +public class UpdateIT extends OpenSearchIntegTestCase { private static final String UPDATE_SCRIPTS = "update_scripts"; private static final String PUT_VALUES_SCRIPT = "put_values"; diff --git a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateNoopIT.java b/server/src/internalClusterTest/java/org/opensearch/update/UpdateNoopIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/update/UpdateNoopIT.java rename to server/src/internalClusterTest/java/org/opensearch/update/UpdateNoopIT.java index 12201eca1a5..fcbf69297c5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/update/UpdateNoopIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/update/UpdateNoopIT.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.update; +package org.opensearch.update; -import org.elasticsearch.action.update.UpdateRequestBuilder; -import org.elasticsearch.action.update.UpdateResponse; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.update.UpdateRequestBuilder; +import org.opensearch.action.update.UpdateResponse; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.test.OpenSearchIntegTestCase; import org.junit.Before; import java.io.IOException; @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * Tests for noop updates. */ -public class UpdateNoopIT extends ESIntegTestCase { +public class UpdateNoopIT extends OpenSearchIntegTestCase { public void testSingleField() throws Exception { updateAndCheckSource(0, 1, fields("bar", "baz")); updateAndCheckSource(0, 1, fields("bar", "baz")); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java b/server/src/internalClusterTest/java/org/opensearch/validate/SimpleValidateQueryIT.java similarity index 93% rename from server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java rename to server/src/internalClusterTest/java/org/opensearch/validate/SimpleValidateQueryIT.java index 66cbf3994a7..6235d23180c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/validate/SimpleValidateQueryIT.java @@ -16,24 +16,25 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.validate; +package org.opensearch.validate; import org.opensearch.action.admin.indices.alias.Alias; import org.opensearch.action.admin.indices.validate.query.ValidateQueryResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.Fuzziness; -import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.index.IndexNotFoundException; -import org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryBuilders; -import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.indices.TermsLookup; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ClusterScope; -import org.elasticsearch.test.ESIntegTestCase.Scope; +import org.opensearch.client.Client; +import org.opensearch.common.bytes.BytesArray; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.Fuzziness; +import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.index.IndexNotFoundException; +import org.opensearch.index.query.MoreLikeThisQueryBuilder.Item; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryBuilders; +import org.opensearch.index.query.TermsQueryBuilder; +import org.opensearch.indices.TermsLookup; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.OpenSearchIntegTestCase.ClusterScope; +import org.opensearch.test.OpenSearchIntegTestCase.Scope; + import org.hamcrest.Matcher; import java.io.IOException; @@ -45,10 +46,10 @@ import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.List; -import static org.elasticsearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; -import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SHARDS; +import static org.opensearch.index.query.QueryBuilders.queryStringQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertNoFailures; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -56,7 +57,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = Scope.SUITE) -public class SimpleValidateQueryIT extends ESIntegTestCase { +public class SimpleValidateQueryIT extends OpenSearchIntegTestCase { public void testSimpleValidateQuery() throws Exception { createIndex("test"); ensureGreen(); diff --git a/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java b/server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentDocumentOperationIT.java similarity index 88% rename from server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java rename to server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentDocumentOperationIT.java index fff00b9af96..a4706a29051 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentDocumentOperationIT.java @@ -17,22 +17,22 @@ * under the License. */ -package org.elasticsearch.versioning; +package org.opensearch.versioning; import org.opensearch.action.ActionListener; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.common.settings.Settings; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Map; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -public class ConcurrentDocumentOperationIT extends ESIntegTestCase { +public class ConcurrentDocumentOperationIT extends OpenSearchIntegTestCase { public void testConcurrentOperationOnSameDoc() throws Exception { logger.info("--> create an index with 1 shard and max replicas based on nodes"); assertAcked(prepareCreate("test") diff --git a/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java b/server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentSeqNoVersioningIT.java similarity index 96% rename from server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java rename to server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentSeqNoVersioningIT.java index 84d69153b7d..9252a1a50e0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/versioning/ConcurrentSeqNoVersioningIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/versioning/ConcurrentSeqNoVersioningIT.java @@ -16,30 +16,30 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.versioning; +package org.opensearch.versioning; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.cluster.coordination.LinearizabilityChecker; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.BytesStreamOutput; -import org.elasticsearch.common.io.stream.InputStreamStreamInput; -import org.elasticsearch.common.io.stream.NamedWriteable; -import org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput; -import org.elasticsearch.common.io.stream.NamedWriteableRegistry; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.AbstractDisruptionTestCase; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.disruption.ServiceDisruptionScheme; -import org.elasticsearch.threadpool.Scheduler; -import org.elasticsearch.threadpool.ThreadPool; +import org.opensearch.ExceptionsHelper; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.cluster.coordination.LinearizabilityChecker; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.SuppressForbidden; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.BytesStreamOutput; +import org.opensearch.common.io.stream.InputStreamStreamInput; +import org.opensearch.common.io.stream.NamedWriteable; +import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; +import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.AbstractDisruptionTestCase; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.test.OpenSearchIntegTestCase; +import org.opensearch.test.disruption.ServiceDisruptionScheme; +import org.opensearch.threadpool.Scheduler; +import org.opensearch.threadpool.ThreadPool; import java.io.FileInputStream; import java.io.IOException; @@ -64,7 +64,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @@ -121,7 +121,7 @@ import static org.hamcrest.Matchers.greaterThan; * stale or dirty, i.e., come from a stale primary or belong to a write that ends up being discarded. * */ -@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, minNumDataNodes = 4, maxNumDataNodes = 6, +@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, minNumDataNodes = 4, maxNumDataNodes = 6, transportClientRatio = 0) public class ConcurrentSeqNoVersioningIT extends AbstractDisruptionTestCase { diff --git a/server/src/internalClusterTest/java/org/elasticsearch/versioning/SimpleVersioningIT.java b/server/src/internalClusterTest/java/org/opensearch/versioning/SimpleVersioningIT.java similarity index 97% rename from server/src/internalClusterTest/java/org/elasticsearch/versioning/SimpleVersioningIT.java rename to server/src/internalClusterTest/java/org/opensearch/versioning/SimpleVersioningIT.java index f12c0c0052e..b0fddfecaae 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/versioning/SimpleVersioningIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/versioning/SimpleVersioningIT.java @@ -16,23 +16,23 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.versioning; +package org.opensearch.versioning; import org.apache.lucene.util.TestUtil; import org.opensearch.action.ActionResponse; import org.opensearch.action.DocWriteRequest; import org.opensearch.action.DocWriteResponse; -import org.elasticsearch.action.bulk.BulkResponse; -import org.elasticsearch.action.delete.DeleteResponse; -import org.elasticsearch.action.get.GetResponse; -import org.elasticsearch.action.index.IndexResponse; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.common.lucene.uid.Versions; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.engine.VersionConflictEngineException; -import org.elasticsearch.test.ESIntegTestCase; +import org.opensearch.action.bulk.BulkResponse; +import org.opensearch.action.delete.DeleteResponse; +import org.opensearch.action.get.GetResponse; +import org.opensearch.action.index.IndexResponse; +import org.opensearch.action.search.SearchResponse; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.common.lucene.uid.Versions; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.VersionType; +import org.opensearch.index.engine.VersionConflictEngineException; +import org.opensearch.test.OpenSearchIntegTestCase; import java.util.HashMap; import java.util.HashSet; @@ -43,15 +43,15 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; -import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFutureThrows; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; -import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertRequestBuilderThrows; +import static org.opensearch.index.query.QueryBuilders.matchAllQuery; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertFutureThrows; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertHitCount; +import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertRequestBuilderThrows; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; -public class SimpleVersioningIT extends ESIntegTestCase { +public class SimpleVersioningIT extends OpenSearchIntegTestCase { public void testExternalVersioningInitialDelete() throws Exception { createIndex("test"); ensureGreen(); diff --git a/server/src/main/java11/org/elasticsearch/monitor/jvm/JvmPid.java b/server/src/main/java11/org/opensearch/monitor/jvm/JvmPid.java similarity index 95% rename from server/src/main/java11/org/elasticsearch/monitor/jvm/JvmPid.java rename to server/src/main/java11/org/opensearch/monitor/jvm/JvmPid.java index c19a14d8364..c2cff87d2ac 100644 --- a/server/src/main/java11/org/elasticsearch/monitor/jvm/JvmPid.java +++ b/server/src/main/java11/org/opensearch/monitor/jvm/JvmPid.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; class JvmPid { diff --git a/server/src/main/resources/META-INF/services/java.util.spi.CalendarDataProvider b/server/src/main/resources/META-INF/services/java.util.spi.CalendarDataProvider index 6e006ccf815..6f6d124ce7d 100644 --- a/server/src/main/resources/META-INF/services/java.util.spi.CalendarDataProvider +++ b/server/src/main/resources/META-INF/services/java.util.spi.CalendarDataProvider @@ -1 +1 @@ -org.elasticsearch.common.time.IsoCalendarDataProvider \ No newline at end of file +org.opensearch.common.time.IsoCalendarDataProvider diff --git a/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.ErrorOnUnknown b/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.ErrorOnUnknown deleted file mode 100644 index 38f08271bce..00000000000 --- a/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.ErrorOnUnknown +++ /dev/null @@ -1 +0,0 @@ -org.elasticsearch.common.xcontent.SuggestingErrorOnUnknown diff --git a/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.XContentBuilderExtension b/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.XContentBuilderExtension deleted file mode 100644 index c7e03a601cf..00000000000 --- a/server/src/main/resources/META-INF/services/org.elasticsearch.common.xcontent.XContentBuilderExtension +++ /dev/null @@ -1 +0,0 @@ -org.elasticsearch.common.xcontent.XContentOpenSearchExtension diff --git a/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.ErrorOnUnknown b/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.ErrorOnUnknown new file mode 100644 index 00000000000..46172836d28 --- /dev/null +++ b/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.ErrorOnUnknown @@ -0,0 +1 @@ +org.opensearch.common.xcontent.SuggestingErrorOnUnknown diff --git a/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.XContentBuilderExtension b/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.XContentBuilderExtension new file mode 100644 index 00000000000..27391c81baf --- /dev/null +++ b/server/src/main/resources/META-INF/services/org.opensearch.common.xcontent.XContentBuilderExtension @@ -0,0 +1 @@ +org.opensearch.common.xcontent.XContentOpenSearchExtension diff --git a/server/src/main/resources/org/elasticsearch/bootstrap/security.policy b/server/src/main/resources/org/opensearch/bootstrap/security.policy similarity index 96% rename from server/src/main/resources/org/elasticsearch/bootstrap/security.policy rename to server/src/main/resources/org/opensearch/bootstrap/security.policy index fbae0f0e14b..bfed3d52473 100644 --- a/server/src/main/resources/org/elasticsearch/bootstrap/security.policy +++ b/server/src/main/resources/org/opensearch/bootstrap/security.policy @@ -24,13 +24,13 @@ //// SecurityManager impl: //// Must have all permissions to properly perform access checks -grant codeBase "${codebase.elasticsearch-secure-sm}" { +grant codeBase "${codebase.opensearch-secure-sm}" { permission java.security.AllPermission; }; -//// Elasticsearch core: +//// Opensearch core: //// These are only allowed inside the server jar, not in plugins -grant codeBase "${codebase.elasticsearch}" { +grant codeBase "${codebase.opensearch}" { // needed for loading plugins which may expect the context class loader to be set permission java.lang.RuntimePermission "setContextClassLoader"; }; @@ -54,7 +54,7 @@ grant codeBase "${codebase.lucene-misc}" { permission java.nio.file.LinkPermission "hard"; }; -grant codeBase "${codebase.elasticsearch-plugin-classloader}" { +grant codeBase "${codebase.opensearch-plugin-classloader}" { // needed to create the classloader which allows plugins to extend other plugins permission java.lang.RuntimePermission "createClassLoader"; }; @@ -72,7 +72,7 @@ grant { // checked by scripting engines, and before hacks and other issues in // third party code, to safeguard these against unprivileged code like scripts. - permission org.elasticsearch.SpecialPermission; + permission org.opensearch.SpecialPermission; // Allow host/ip name service lookups permission java.net.SocketPermission "*", "resolve"; diff --git a/server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy similarity index 94% rename from server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy rename to server/src/main/resources/org/opensearch/bootstrap/test-framework.policy index b195662dcf2..d1911f67079 100644 --- a/server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy @@ -48,7 +48,7 @@ grant codeBase "${codebase.randomizedtesting-runner}" { // needed to fail tests on uncaught exceptions from other threads permission java.lang.RuntimePermission "setDefaultUncaughtExceptionHandler"; // needed for top threads handling - permission org.elasticsearch.secure_sm.ThreadPermission "modifyArbitraryThreadGroup"; + permission org.opensearch.secure_sm.ThreadPermission "modifyArbitraryThreadGroup"; // needed for TestClass creation permission java.lang.RuntimePermission "accessDeclaredMembers"; }; @@ -65,12 +65,12 @@ grant codeBase "${codebase.mocksocket}" { permission java.net.SocketPermission "*", "accept,connect"; }; -grant codeBase "${codebase.elasticsearch-nio}" { - // elasticsearch-nio makes and accepts socket connections +grant codeBase "${codebase.opensearch-nio}" { + // opensearch-nio makes and accepts socket connections permission java.net.SocketPermission "*", "accept,connect"; }; -grant codeBase "${codebase.elasticsearch-rest-client}" { +grant codeBase "${codebase.opensearch-rest-client}" { // rest makes socket connections for rest tests permission java.net.SocketPermission "*", "connect"; // rest client uses system properties which gets the default proxy diff --git a/server/src/main/resources/org/elasticsearch/bootstrap/untrusted.policy b/server/src/main/resources/org/opensearch/bootstrap/untrusted.policy similarity index 100% rename from server/src/main/resources/org/elasticsearch/bootstrap/untrusted.policy rename to server/src/main/resources/org/opensearch/bootstrap/untrusted.policy diff --git a/server/src/main/resources/org/elasticsearch/tasks/task-index-mapping.json b/server/src/main/resources/org/opensearch/tasks/task-index-mapping.json similarity index 100% rename from server/src/main/resources/org/elasticsearch/tasks/task-index-mapping.json rename to server/src/main/resources/org/opensearch/tasks/task-index-mapping.json