[Rename] framework/test/o.e.action,bootstrap,cli,client,cluster,common (#361)

This commit refactors the following test packages from the o.e namespace:

* o.e.action
* o.e.bootstrap
* o.e.cli
* o.e.client
* o.e.cluster
* o.e.common

to the o.opensearch namespace. Any references throughout the codebase are also
refactored.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
Nick Knize 2021-03-17 16:40:38 -05:00 committed by Nick Knize
parent 6e888a781e
commit 12f3233fa5
233 changed files with 454 additions and 479 deletions

View File

@ -20,10 +20,9 @@ package org.opensearch.client;
import com.carrotsearch.hppc.ObjectIntHashMap; import com.carrotsearch.hppc.ObjectIntHashMap;
import com.carrotsearch.hppc.ObjectIntMap; import com.carrotsearch.hppc.ObjectIntMap;
import org.opensearch.client.SyncedFlushResponse;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.bytes.BytesReference;
import org.opensearch.common.xcontent.DeprecationHandler; import org.opensearch.common.xcontent.DeprecationHandler;
import org.opensearch.common.xcontent.ToXContent; import org.opensearch.common.xcontent.ToXContent;

View File

@ -36,7 +36,7 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName; import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName;
public class GetDataStreamResponseTests extends AbstractResponseTestCase<GetDataStreamAction.Response, GetDataStreamResponse> { public class GetDataStreamResponseTests extends AbstractResponseTestCase<GetDataStreamAction.Response, GetDataStreamResponse> {

View File

@ -19,7 +19,7 @@
package org.opensearch.test.rest; package org.opensearch.test.rest;
import org.elasticsearch.common.logging.JsonLogsIntegTestCase; import org.opensearch.common.logging.JsonLogsIntegTestCase;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import java.io.BufferedReader; import java.io.BufferedReader;

View File

@ -24,7 +24,7 @@ import org.opensearch.common.settings.KeyStoreWrapper;
import org.opensearch.common.settings.SecureSettings; import org.opensearch.common.settings.SecureSettings;
import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.SecureString;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;

View File

@ -31,9 +31,9 @@ import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs; import com.google.common.jimfs.Jimfs;
import org.opensearch.core.internal.io.IOUtils; import org.opensearch.core.internal.io.IOUtils;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.cli.CommandTestCase; import org.opensearch.cli.CommandTestCase;
import org.elasticsearch.common.io.PathUtilsForTesting; import org.opensearch.common.io.PathUtilsForTesting;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.env.TestEnvironment;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;

View File

@ -44,7 +44,7 @@ import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder;
import org.opensearch.Build; import org.opensearch.Build;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cli.ExitCodes; import org.opensearch.cli.ExitCodes;
import org.elasticsearch.cli.MockTerminal; import org.opensearch.cli.MockTerminal;
import org.opensearch.cli.Terminal; import org.opensearch.cli.Terminal;
import org.opensearch.cli.UserException; import org.opensearch.cli.UserException;
import org.opensearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
@ -52,7 +52,7 @@ import org.opensearch.common.collect.Tuple;
import org.opensearch.common.hash.MessageDigests; import org.opensearch.common.hash.MessageDigests;
import org.opensearch.common.io.FileSystemUtils; import org.opensearch.common.io.FileSystemUtils;
import org.opensearch.common.io.PathUtils; import org.opensearch.common.io.PathUtils;
import org.elasticsearch.common.io.PathUtilsForTesting; import org.opensearch.common.io.PathUtilsForTesting;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;
import org.elasticsearch.env.TestEnvironment; import org.elasticsearch.env.TestEnvironment;

View File

@ -30,7 +30,7 @@ import java.util.stream.Collectors;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cli.ExitCodes; import org.opensearch.cli.ExitCodes;
import org.elasticsearch.cli.MockTerminal; import org.opensearch.cli.MockTerminal;
import org.opensearch.cli.UserException; import org.opensearch.cli.UserException;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.env.Environment; import org.opensearch.env.Environment;

View File

@ -22,7 +22,7 @@ package org.opensearch.plugins;
import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cli.ExitCodes; import org.opensearch.cli.ExitCodes;
import org.elasticsearch.cli.MockTerminal; import org.opensearch.cli.MockTerminal;
import org.opensearch.cli.UserException; import org.opensearch.cli.UserException;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.env.Environment; import org.opensearch.env.Environment;

View File

@ -19,7 +19,7 @@
package org.opensearch.common.ssl; package org.opensearch.common.ssl;
import org.elasticsearch.common.settings.MockSecureSettings; import org.opensearch.common.settings.MockSecureSettings;
import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.SecureString;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;

View File

@ -20,11 +20,11 @@ package org.opensearch.search.aggregations.matrix.stats;
import org.opensearch.common.ParseField; import org.opensearch.common.ParseField;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.util.MockBigArrays; import org.opensearch.common.util.MockBigArrays;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.common.xcontent.ContextParser; import org.opensearch.common.xcontent.ContextParser;
import org.opensearch.common.xcontent.NamedXContentRegistry; import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.indices.breaker.NoneCircuitBreakerService;
import org.opensearch.plugins.SearchPlugin; import org.opensearch.plugins.SearchPlugin;
import org.opensearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.opensearch.search.aggregations.Aggregation; import org.opensearch.search.aggregations.Aggregation;

View File

@ -20,7 +20,7 @@
package org.opensearch.index.reindex; package org.opensearch.index.reindex;
import org.opensearch.client.RestClient; import org.opensearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilderTestCase; import org.opensearch.client.RestClientBuilderTestCase;
import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.bytes.BytesReference;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;

View File

@ -26,8 +26,8 @@ import org.opensearch.common.network.NetworkService;
import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.MockBigArrays; import org.opensearch.common.util.MockBigArrays;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.http.HttpServerTransport; import org.opensearch.http.HttpServerTransport;
import org.opensearch.http.HttpTransportSettings; import org.opensearch.http.HttpTransportSettings;

View File

@ -33,8 +33,8 @@ import org.opensearch.common.network.NetworkService;
import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.MockBigArrays; import org.opensearch.common.util.MockBigArrays;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.http.HttpPipelinedRequest; import org.opensearch.http.HttpPipelinedRequest;
import org.opensearch.http.HttpResponse; import org.opensearch.http.HttpResponse;
import org.opensearch.http.HttpServerTransport; import org.opensearch.http.HttpServerTransport;

View File

@ -54,8 +54,8 @@ import org.opensearch.common.settings.Settings;
import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.opensearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.opensearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.MockBigArrays; import org.opensearch.common.util.MockBigArrays;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.concurrent.ThreadContext;
import org.opensearch.http.BindHttpException; import org.opensearch.http.BindHttpException;
import org.opensearch.http.CorsHandler; import org.opensearch.http.CorsHandler;

View File

@ -24,7 +24,7 @@ import org.opensearch.common.io.stream.NamedWriteableRegistry;
import org.opensearch.common.network.NetworkService; import org.opensearch.common.network.NetworkService;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.common.util.PageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.mocksocket.MockSocket; import org.elasticsearch.mocksocket.MockSocket;

View File

@ -24,7 +24,7 @@ import io.netty.buffer.CompositeByteBuf;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRef;
import org.opensearch.common.breaker.CircuitBreaker; import org.opensearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.bytes.AbstractBytesReferenceTestCase; import org.opensearch.common.bytes.AbstractBytesReferenceTestCase;
import org.opensearch.common.bytes.BytesArray; import org.opensearch.common.bytes.BytesArray;
import org.opensearch.common.bytes.BytesReference; import org.opensearch.common.bytes.BytesReference;
import org.opensearch.common.io.stream.ReleasableBytesStreamOutput; import org.opensearch.common.io.stream.ReleasableBytesStreamOutput;

View File

@ -24,7 +24,7 @@ import org.opensearch.common.io.stream.NamedWriteableRegistry;
import org.opensearch.common.network.NetworkService; import org.opensearch.common.network.NetworkService;
import org.opensearch.common.network.NetworkUtils; import org.opensearch.common.network.NetworkUtils;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.util.MockPageCacheRecycler; import org.opensearch.common.util.MockPageCacheRecycler;
import org.opensearch.common.util.PageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;

View File

@ -28,16 +28,16 @@ import org.apache.logging.log4j.core.config.Configurator;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.apache.lucene.util.StringHelper; import org.apache.lucene.util.StringHelper;
import org.opensearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.opensearch.cli.KeyStoreAwareCommand; import org.opensearch.cli.KeyStoreAwareCommand;
import org.opensearch.cli.Terminal; import org.opensearch.cli.Terminal;
import org.opensearch.cli.UserException; import org.opensearch.cli.UserException;
import org.opensearch.common.PidFile; import org.opensearch.common.PidFile;
import org.opensearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.inject.CreationException; import org.opensearch.common.inject.CreationException;
import org.elasticsearch.common.logging.DeprecationLogger; import org.opensearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.logging.LogConfigurator; import org.opensearch.common.logging.LogConfigurator;
import org.elasticsearch.common.logging.Loggers; import org.opensearch.common.logging.Loggers;
import org.opensearch.common.network.IfConfig; import org.opensearch.common.network.IfConfig;
import org.opensearch.common.settings.KeyStoreWrapper; import org.opensearch.common.settings.KeyStoreWrapper;
import org.opensearch.common.settings.SecureSettings; import org.opensearch.common.settings.SecureSettings;
@ -45,10 +45,10 @@ import org.opensearch.common.settings.SecureString;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.transport.BoundTransportAddress; import org.opensearch.common.transport.BoundTransportAddress;
import org.opensearch.core.internal.io.IOUtils; import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.monitor.jvm.JvmInfo; import org.opensearch.monitor.jvm.JvmInfo;
import org.elasticsearch.monitor.os.OsProbe; import org.opensearch.monitor.os.OsProbe;
import org.elasticsearch.monitor.process.ProcessProbe; import org.opensearch.monitor.process.ProcessProbe;
import org.opensearch.node.InternalSettingsPreparer; import org.opensearch.node.InternalSettingsPreparer;
import org.opensearch.node.Node; import org.opensearch.node.Node;
import org.opensearch.node.NodeValidationException; import org.opensearch.node.NodeValidationException;

View File

@ -29,7 +29,7 @@ import org.opensearch.cli.ExitCodes;
import org.opensearch.cli.Terminal; import org.opensearch.cli.Terminal;
import org.opensearch.cli.UserException; import org.opensearch.cli.UserException;
import org.opensearch.common.logging.LogConfigurator; import org.opensearch.common.logging.LogConfigurator;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.opensearch.monitor.jvm.JvmInfo; import org.opensearch.monitor.jvm.JvmInfo;
import org.opensearch.node.NodeValidationException; import org.opensearch.node.NodeValidationException;

View File

@ -21,10 +21,10 @@ package org.opensearch.bootstrap;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.opensearch.core.internal.io.IOUtils; import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.plugins.Platforms; import org.opensearch.plugins.Platforms;
import org.elasticsearch.plugins.PluginInfo; import org.opensearch.plugins.PluginInfo;
import org.elasticsearch.plugins.PluginsService; import org.opensearch.plugins.PluginsService;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;

View File

@ -24,7 +24,7 @@ import joptsimple.OptionSpec;
import joptsimple.util.KeyValuePair; import joptsimple.util.KeyValuePair;
import org.opensearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.opensearch.node.InternalSettingsPreparer; import org.opensearch.node.InternalSettingsPreparer;
import java.nio.file.Path; import java.nio.file.Path;
@ -33,7 +33,7 @@ import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
/** A cli command which requires an {@link org.elasticsearch.env.Environment} to use current paths and settings. */ /** A cli command which requires an {@link org.opensearch.env.Environment} to use current paths and settings. */
public abstract class EnvironmentAwareCommand extends Command { public abstract class EnvironmentAwareCommand extends Command {
private final OptionSpec<KeyValuePair> settingOption; private final OptionSpec<KeyValuePair> settingOption;

View File

@ -28,7 +28,7 @@ import org.opensearch.common.breaker.CircuitBreakingException;
import org.opensearch.common.lease.Releasable; import org.opensearch.common.lease.Releasable;
import org.opensearch.common.lease.Releasables; import org.opensearch.common.lease.Releasables;
import org.opensearch.common.recycler.Recycler; import org.opensearch.common.recycler.Recycler;
import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.opensearch.indices.breaker.CircuitBreakerService;
import java.util.Arrays; import java.util.Arrays;

View File

@ -24,9 +24,9 @@ import org.opensearch.common.Strings;
import org.opensearch.common.io.stream.NamedWriteable; import org.opensearch.common.io.stream.NamedWriteable;
import org.opensearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentParser;
import org.elasticsearch.index.query.QueryRewriteContext; import org.opensearch.index.query.QueryRewriteContext;
import org.elasticsearch.index.query.QueryShardContext; import org.opensearch.index.query.QueryShardContext;
import org.elasticsearch.index.query.Rewriteable; import org.opensearch.index.query.Rewriteable;
import org.opensearch.search.aggregations.pipeline.PipelineAggregator; import org.opensearch.search.aggregations.pipeline.PipelineAggregator;
import org.opensearch.search.aggregations.pipeline.PipelineAggregator.PipelineTree; import org.opensearch.search.aggregations.pipeline.PipelineAggregator.PipelineTree;

View File

@ -30,9 +30,9 @@ import org.opensearch.common.xcontent.ToXContentObject;
import org.opensearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentLocation; import org.opensearch.common.xcontent.XContentLocation;
import org.opensearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentParser;
import org.elasticsearch.index.query.QueryRewriteContext; import org.opensearch.index.query.QueryRewriteContext;
import org.elasticsearch.index.query.QueryShardContext; import org.opensearch.index.query.QueryShardContext;
import org.elasticsearch.index.query.Rewriteable; import org.opensearch.index.query.Rewriteable;
import org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder; import org.opensearch.search.aggregations.bucket.global.GlobalAggregationBuilder;
import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder; import org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.opensearch.search.aggregations.pipeline.PipelineAggregator; import org.opensearch.search.aggregations.pipeline.PipelineAggregator;

View File

@ -20,7 +20,7 @@ package org.elasticsearch.cluster;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.collect.ImmutableOpenMap;
import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardId;

View File

@ -44,7 +44,7 @@ import org.opensearch.cluster.routing.allocation.decider.ShardsLimitAllocationDe
import org.opensearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider; import org.opensearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider;
import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; import org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
import org.opensearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.ModuleTestCase; import org.opensearch.common.inject.ModuleTestCase;
import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.IndexScopedSettings; import org.opensearch.common.settings.IndexScopedSettings;
import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Setting;

View File

@ -35,7 +35,7 @@ import org.opensearch.cluster.routing.IndexRoutingTable;
import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.IndexShardRoutingTable;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.Strings; import org.opensearch.common.Strings;
import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.collect.ImmutableOpenMap;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;

View File

@ -26,7 +26,7 @@ import org.opensearch.action.admin.indices.stats.ShardStats;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.routing.RecoverySource.PeerRecoverySource; import org.opensearch.cluster.routing.RecoverySource.PeerRecoverySource;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingHelper;
import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.UnassignedInfo;
import org.opensearch.common.collect.ImmutableOpenMap; import org.opensearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;

View File

@ -27,15 +27,15 @@ import org.opensearch.action.ActionType;
import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest;
import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; import org.opensearch.action.admin.indices.stats.IndicesStatsRequest;
import org.opensearch.cluster.block.ClusterBlockException; import org.opensearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.elasticsearch.cluster.coordination.MockSinglePrioritizingExecutor; import org.opensearch.cluster.coordination.MockSinglePrioritizingExecutor;
import org.opensearch.cluster.coordination.NoMasterBlockService; import org.opensearch.cluster.coordination.NoMasterBlockService;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.cluster.service.ClusterApplier; import org.opensearch.cluster.service.ClusterApplier;
import org.opensearch.cluster.service.ClusterApplierService; import org.opensearch.cluster.service.ClusterApplierService;
import org.opensearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; import org.opensearch.cluster.service.FakeThreadPoolMasterService;
import org.elasticsearch.cluster.service.MasterService; import org.elasticsearch.cluster.service.MasterService;
import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;

View File

@ -25,7 +25,7 @@ import org.opensearch.OpenSearchTimeoutException;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListener;
import org.opensearch.action.support.PlainActionFuture; import org.opensearch.action.support.PlainActionFuture;
import org.elasticsearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;

View File

@ -25,7 +25,7 @@ import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.ClusterStateTaskExecutor; import org.opensearch.cluster.ClusterStateTaskExecutor;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry; import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
@ -37,7 +37,7 @@ import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardIterator; import org.opensearch.cluster.routing.ShardIterator;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
import org.opensearch.cluster.routing.allocation.FailedShard; import org.opensearch.cluster.routing.allocation.FailedShard;
import org.opensearch.cluster.routing.allocation.StaleShard; import org.opensearch.cluster.routing.allocation.StaleShard;
@ -61,7 +61,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.contains;
public class ShardFailedClusterStateTaskExecutorTests extends ESAllocationTestCase { public class ShardFailedClusterStateTaskExecutorTests extends OpenSearchAllocationTestCase {
private static final String INDEX = "INDEX"; private static final String INDEX = "INDEX";
private AllocationService allocationService; private AllocationService allocationService;
@ -193,7 +193,7 @@ public class ShardFailedClusterStateTaskExecutorTests extends ESAllocationTestCa
ClusterState.builder(clusterState).nodes(nodes).build(); ClusterState.builder(clusterState).nodes(nodes).build();
RoutingTable afterReroute = allocationService.reroute(stateAfterAddingNode, reason).routingTable(); RoutingTable afterReroute = allocationService.reroute(stateAfterAddingNode, reason).routingTable();
ClusterState stateAfterReroute = ClusterState.builder(stateAfterAddingNode).routingTable(afterReroute).build(); ClusterState stateAfterReroute = ClusterState.builder(stateAfterAddingNode).routingTable(afterReroute).build();
return ESAllocationTestCase.startInitializingShardsAndReroute(allocationService, stateAfterReroute); return OpenSearchAllocationTestCase.startInitializingShardsAndReroute(allocationService, stateAfterReroute);
} }
private List<ShardStateAction.FailedShardEntry> createExistingShards(ClusterState currentState, String reason) { private List<ShardStateAction.FailedShardEntry> createExistingShards(ClusterState currentState, String reason) {

View File

@ -22,7 +22,7 @@ package org.elasticsearch.cluster.action.shard;
import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListener;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.ClusterStateTaskExecutor; import org.opensearch.cluster.ClusterStateTaskExecutor;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.cluster.action.shard.ShardStateAction.StartedShardEntry; import org.opensearch.cluster.action.shard.ShardStateAction.StartedShardEntry;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
@ -43,16 +43,16 @@ import java.util.stream.IntStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import static java.util.Collections.singletonList; import static java.util.Collections.singletonList;
import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.state; import static org.opensearch.action.support.replication.ClusterStateCreationUtils.state;
import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithActivePrimary; import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithActivePrimary;
import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithAssignedPrimariesAndReplicas; import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithAssignedPrimariesAndReplicas;
import static org.elasticsearch.action.support.replication.ClusterStateCreationUtils.stateWithNoShard; import static org.opensearch.action.support.replication.ClusterStateCreationUtils.stateWithNoShard;
import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING; import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;
public class ShardStartedClusterStateTaskExecutorTests extends ESAllocationTestCase { public class ShardStartedClusterStateTaskExecutorTests extends OpenSearchAllocationTestCase {
private ShardStateAction.ShardStartedClusterStateTaskExecutor executor; private ShardStateAction.ShardStartedClusterStateTaskExecutor executor;

View File

@ -23,7 +23,7 @@ import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.util.SetOnce; import org.apache.lucene.util.SetOnce;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListener;
import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.action.support.replication.ClusterStateCreationUtils;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.ClusterStateObserver; import org.opensearch.cluster.ClusterStateObserver;
import org.opensearch.cluster.NotMasterException; import org.opensearch.cluster.NotMasterException;

View File

@ -20,6 +20,7 @@ package org.elasticsearch.cluster.coordination;
import org.opensearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;

View File

@ -25,6 +25,7 @@ import org.opensearch.cluster.coordination.ClusterFormationFailureHelper;
import org.opensearch.cluster.coordination.ClusterFormationFailureHelper.ClusterFormationState; import org.opensearch.cluster.coordination.ClusterFormationFailureHelper.ClusterFormationState;
import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;

View File

@ -27,6 +27,7 @@ import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
import org.opensearch.cluster.coordination.CoordinationState; import org.opensearch.cluster.coordination.CoordinationState;
import org.opensearch.cluster.coordination.CoordinationState.PersistedState; import org.opensearch.cluster.coordination.CoordinationState.PersistedState;
import org.opensearch.cluster.coordination.CoordinationStateTestCluster;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;

View File

@ -27,7 +27,8 @@ import org.opensearch.Version;
import org.opensearch.cluster.AbstractDiffable; import org.opensearch.cluster.AbstractDiffable;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.block.ClusterBlock; import org.opensearch.cluster.block.ClusterBlock;
import org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode; import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase;
import org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.ClusterNode;
import org.opensearch.cluster.coordination.ClusterFormationFailureHelper; import org.opensearch.cluster.coordination.ClusterFormationFailureHelper;
import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
@ -70,8 +71,8 @@ import java.util.stream.Collectors;
import static java.util.Collections.emptyMap; import static java.util.Collections.emptyMap;
import static java.util.Collections.singleton; import static java.util.Collections.singleton;
import static org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY; import static org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.DEFAULT_DELAY_VARIABILITY;
import static org.elasticsearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.EXTREME_DELAY_VARIABILITY; import static org.opensearch.cluster.coordination.AbstractCoordinatorTestCase.Cluster.EXTREME_DELAY_VARIABILITY;
import static org.opensearch.cluster.coordination.Coordinator.PUBLISH_TIMEOUT_SETTING; import static org.opensearch.cluster.coordination.Coordinator.PUBLISH_TIMEOUT_SETTING;
import static org.opensearch.cluster.coordination.Coordinator.Mode.CANDIDATE; import static org.opensearch.cluster.coordination.Coordinator.Mode.CANDIDATE;
import static org.opensearch.cluster.coordination.ElectionSchedulerFactory.ELECTION_INITIAL_TIMEOUT_SETTING; import static org.opensearch.cluster.coordination.ElectionSchedulerFactory.ELECTION_INITIAL_TIMEOUT_SETTING;

View File

@ -19,6 +19,7 @@
package org.elasticsearch.cluster.coordination; package org.elasticsearch.cluster.coordination;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.common.lease.Releasable; import org.opensearch.common.lease.Releasable;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.settings.Settings.Builder; import org.opensearch.common.settings.Settings.Builder;

View File

@ -22,6 +22,7 @@ import org.opensearch.OpenSearchException;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.coordination.Coordinator.Mode; import org.opensearch.cluster.coordination.Coordinator.Mode;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.coordination.FollowersChecker; import org.opensearch.cluster.coordination.FollowersChecker;
import org.opensearch.cluster.coordination.FollowersChecker.FollowerCheckRequest; import org.opensearch.cluster.coordination.FollowersChecker.FollowerCheckRequest;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;

View File

@ -25,6 +25,7 @@ import org.opensearch.action.support.PlainActionFuture;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.NotMasterException; import org.opensearch.cluster.NotMasterException;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;

View File

@ -18,6 +18,7 @@
*/ */
package org.elasticsearch.cluster.coordination; package org.elasticsearch.cluster.coordination;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;

View File

@ -23,6 +23,7 @@ import org.opensearch.OpenSearchException;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.coordination.CoordinationStateRejectedException; import org.opensearch.cluster.coordination.CoordinationStateRejectedException;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.coordination.LeaderChecker; import org.opensearch.cluster.coordination.LeaderChecker;
import org.opensearch.cluster.coordination.LeaderChecker.LeaderCheckRequest; import org.opensearch.cluster.coordination.LeaderChecker.LeaderCheckRequest;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;

View File

@ -18,9 +18,10 @@
*/ */
package org.elasticsearch.cluster.coordination; package org.elasticsearch.cluster.coordination;
import org.elasticsearch.cluster.coordination.LinearizabilityChecker.History; import org.opensearch.cluster.coordination.LinearizabilityChecker;
import org.elasticsearch.cluster.coordination.LinearizabilityChecker.KeyedSpec; import org.opensearch.cluster.coordination.LinearizabilityChecker.History;
import org.elasticsearch.cluster.coordination.LinearizabilityChecker.SequentialSpec; import org.opensearch.cluster.coordination.LinearizabilityChecker.KeyedSpec;
import org.opensearch.cluster.coordination.LinearizabilityChecker.SequentialSpec;
import org.opensearch.common.collect.Tuple; import org.opensearch.common.collect.Tuple;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;

View File

@ -23,15 +23,16 @@ import org.opensearch.Version;
import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListener;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.block.ClusterBlocks;
import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.service.FakeThreadPoolMasterService; import org.opensearch.cluster.service.FakeThreadPoolMasterService;
import org.opensearch.cluster.service.MasterService; import org.opensearch.cluster.service.MasterService;
import org.elasticsearch.cluster.service.MasterServiceTests; import org.elasticsearch.cluster.service.MasterServiceTests;
import org.opensearch.common.Randomness; import org.opensearch.common.Randomness;
@ -189,7 +190,7 @@ public class NodeJoinTests extends ESTestCase {
clusterSettings, Collections.emptySet()); clusterSettings, Collections.emptySet());
coordinator = new Coordinator("test_node", Settings.EMPTY, clusterSettings, coordinator = new Coordinator("test_node", Settings.EMPTY, clusterSettings,
transportService, writableRegistry(), transportService, writableRegistry(),
ESAllocationTestCase.createAllocationService(Settings.EMPTY), OpenSearchAllocationTestCase.createAllocationService(Settings.EMPTY),
masterService, masterService,
() -> new InMemoryPersistedState(term, initialState), r -> emptyList(), () -> new InMemoryPersistedState(term, initialState), r -> emptyList(),
new NoOpClusterApplier(), new NoOpClusterApplier(),

View File

@ -42,8 +42,8 @@ import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;

View File

@ -22,6 +22,7 @@ package org.elasticsearch.cluster.coordination;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.opensearch.common.lease.Releasable; import org.opensearch.common.lease.Releasable;

View File

@ -24,6 +24,7 @@ import org.opensearch.cluster.ClusterChangedEvent;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.Diff; import org.opensearch.cluster.Diff;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfiguration;
import org.opensearch.cluster.coordination.DeterministicTaskQueue;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.health;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.health.ClusterHealthStatus; import org.opensearch.cluster.health.ClusterHealthStatus;
import org.opensearch.cluster.health.ClusterStateHealth; import org.opensearch.cluster.health.ClusterStateHealth;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
@ -33,7 +33,7 @@ import org.opensearch.cluster.routing.allocation.AllocationService;
import java.util.Collections; import java.util.Collections;
public class ClusterHealthAllocationTests extends ESAllocationTestCase { public class ClusterHealthAllocationTests extends OpenSearchAllocationTestCase {
public void testClusterHealth() { public void testClusterHealth() {
ClusterState clusterState = ClusterState.builder(ClusterName.DEFAULT).build(); ClusterState clusterState = ClusterState.builder(ClusterName.DEFAULT).build();

View File

@ -23,7 +23,7 @@ import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest;
import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.create.CreateIndexRequest;
import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest; import org.opensearch.action.admin.indices.settings.put.UpdateSettingsRequest;
import org.opensearch.action.support.ActiveShardCount; import org.opensearch.action.support.ActiveShardCount;
import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.action.support.replication.ClusterStateCreationUtils;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.metadata.AutoExpandReplicas; import org.opensearch.cluster.metadata.AutoExpandReplicas;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;

View File

@ -30,7 +30,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName; import static org.opensearch.cluster.metadata.DataStream.getDefaultBackingIndexName;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;

View File

@ -57,8 +57,8 @@ import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_HIDDEN_SETTING; import static org.opensearch.cluster.metadata.IndexMetadata.INDEX_HIDDEN_SETTING;
import static org.opensearch.cluster.metadata.IndexNameExpressionResolver.SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY; import static org.opensearch.cluster.metadata.IndexNameExpressionResolver.SYSTEM_INDEX_ACCESS_CONTROL_HEADER_KEY;
import static org.opensearch.common.util.set.Sets.newHashSet; import static org.opensearch.common.util.set.Sets.newHashSet;

View File

@ -36,9 +36,9 @@ import org.opensearch.cluster.metadata.MetadataCreateIndexService;
import java.util.Collections; import java.util.Collections;
import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.elasticsearch.cluster.DataStreamTestHelper.generateMapping; import static org.opensearch.cluster.DataStreamTestHelper.generateMapping;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;

View File

@ -28,7 +28,7 @@ import org.opensearch.action.admin.indices.create.CreateIndexClusterStateUpdateR
import org.opensearch.action.admin.indices.shrink.ResizeType; import org.opensearch.action.admin.indices.shrink.ResizeType;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.block.ClusterBlocks;
import org.opensearch.cluster.metadata.AliasMetadata; import org.opensearch.cluster.metadata.AliasMetadata;
@ -246,7 +246,7 @@ public class MetadataCreateIndexServiceTests extends ESTestCase {
RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable(); RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable();
clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build();
// now we start the shard // now we start the shard
routingTable = ESAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); routingTable = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable();
clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build();
int targetShards; int targetShards;
do { do {
@ -309,7 +309,7 @@ public class MetadataCreateIndexServiceTests extends ESTestCase {
RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable(); RoutingTable routingTable = service.reroute(clusterState, "reroute").routingTable();
clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build();
// now we start the shard // now we start the shard
routingTable = ESAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable(); routingTable = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, clusterState, "source").routingTable();
clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build(); clusterState = ClusterState.builder(clusterState).routingTable(routingTable).build();
MetadataCreateIndexService.validateSplitIndex(clusterState, "source", "target", MetadataCreateIndexService.validateSplitIndex(clusterState, "source", "target",
@ -448,7 +448,7 @@ public class MetadataCreateIndexServiceTests extends ESTestCase {
// now we start the shard // now we start the shard
final RoutingTable routingTable final RoutingTable routingTable
= ESAllocationTestCase.startInitializingShardsAndReroute(service, routingTableClusterState, indexName).routingTable(); = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(service, routingTableClusterState, indexName).routingTable();
final ClusterState clusterState = ClusterState.builder(routingTableClusterState).routingTable(routingTable).build(); final ClusterState clusterState = ClusterState.builder(routingTableClusterState).routingTable(routingTable).build();
final Settings.Builder indexSettingsBuilder = Settings.builder().put("index.number_of_shards", 1).put(requestSettings); final Settings.Builder indexSettingsBuilder = Settings.builder().put("index.number_of_shards", 1).put(requestSettings);

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.metadata;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.DataStreamTestHelper; import org.opensearch.cluster.DataStreamTestHelper;
import org.opensearch.cluster.SnapshotsInProgress; import org.opensearch.cluster.SnapshotsInProgress;
import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.block.ClusterBlocks;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;

View File

@ -47,7 +47,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import static java.util.Collections.singletonList; import static java.util.Collections.singletonList;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;

View File

@ -81,7 +81,7 @@ import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_SH
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED;
import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK; import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK;
import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID; import static org.opensearch.cluster.metadata.MetadataIndexStateService.INDEX_CLOSED_BLOCK_ID;
import static org.elasticsearch.cluster.routing.TestShardRouting.newShardRouting; import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.hasSize;

View File

@ -22,7 +22,7 @@ package org.elasticsearch.cluster.metadata;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest; import org.opensearch.action.admin.indices.alias.get.GetAliasesRequest;
import org.opensearch.cluster.ClusterModule; import org.opensearch.cluster.ClusterModule;
import org.elasticsearch.cluster.DataStreamTestHelper; import org.opensearch.cluster.DataStreamTestHelper;
import org.opensearch.cluster.coordination.CoordinationMetadata; import org.opensearch.cluster.coordination.CoordinationMetadata;
import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion; import org.opensearch.cluster.coordination.CoordinationMetadata.VotingConfigExclusion;
import org.opensearch.common.Strings; import org.opensearch.common.Strings;
@ -64,9 +64,9 @@ import java.util.SortedMap;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.cluster.metadata.Metadata.Builder.validateDataStreams; import static org.opensearch.cluster.metadata.Metadata.Builder.validateDataStreams;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;

View File

@ -49,8 +49,8 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import static org.elasticsearch.cluster.DataStreamTestHelper.createFirstBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createFirstBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder; import static org.opensearch.cluster.metadata.AliasMetadata.newAliasMetadataBuilder;
import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_VERSION_CREATED;
import static org.opensearch.cluster.metadata.Metadata.CONTEXT_MODE_API; import static org.opensearch.cluster.metadata.Metadata.CONTEXT_MODE_API;

View File

@ -37,8 +37,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import static org.elasticsearch.cluster.DataStreamTestHelper.createBackingIndex; import static org.opensearch.cluster.DataStreamTestHelper.createBackingIndex;
import static org.elasticsearch.cluster.DataStreamTestHelper.createTimestampField; import static org.opensearch.cluster.DataStreamTestHelper.createTimestampField;
import static org.opensearch.common.util.set.Sets.newHashSet; import static org.opensearch.common.util.set.Sets.newHashSet;
import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;

View File

@ -24,7 +24,7 @@ import org.opensearch.cluster.ClusterChangedEvent;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.ClusterStateUpdateTask; import org.opensearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
@ -64,7 +64,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
public class DelayedAllocationServiceTests extends ESAllocationTestCase { public class DelayedAllocationServiceTests extends OpenSearchAllocationTestCase {
private TestDelayAllocationService delayedAllocationService; private TestDelayAllocationService delayedAllocationService;
private MockAllocationService allocationService; private MockAllocationService allocationService;

View File

@ -29,6 +29,7 @@ import org.opensearch.cluster.routing.GroupShardsIterator;
import org.opensearch.cluster.routing.PlainShardIterator; import org.opensearch.cluster.routing.PlainShardIterator;
import org.opensearch.cluster.routing.ShardIterator; import org.opensearch.cluster.routing.ShardIterator;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.TestShardRouting;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -19,7 +19,7 @@
package org.elasticsearch.cluster.routing; package org.elasticsearch.cluster.routing;
import org.opensearch.Version; import org.opensearch.Version;
import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.action.support.replication.ClusterStateCreationUtils;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.routing.GroupShardsIterator; import org.opensearch.cluster.routing.GroupShardsIterator;

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.health.ClusterStateHealth; import org.opensearch.cluster.health.ClusterStateHealth;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -47,7 +47,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class PrimaryTermsTests extends ESAllocationTestCase { public class PrimaryTermsTests extends OpenSearchAllocationTestCase {
private static final String TEST_INDEX_1 = "test1"; private static final String TEST_INDEX_1 = "test1";
private static final String TEST_INDEX_2 = "test2"; private static final String TEST_INDEX_2 = "test2";

View File

@ -19,6 +19,7 @@
package org.elasticsearch.cluster.routing; package org.elasticsearch.cluster.routing;
import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTestCase;
import org.opensearch.cluster.routing.RecoverySource; import org.opensearch.cluster.routing.RecoverySource;

View File

@ -22,6 +22,7 @@ package org.elasticsearch.cluster.routing;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardId;

View File

@ -27,6 +27,7 @@ import org.opensearch.cluster.routing.IndexRoutingTable;
import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.IndexShardRoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.opensearch.cluster.routing.TestShardRouting;
import static org.opensearch.cluster.health.ClusterShardHealth.getInactivePrimaryHealth; import static org.opensearch.cluster.health.ClusterShardHealth.getInactivePrimaryHealth;

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.metadata.MetadataIndexStateService; import org.opensearch.cluster.metadata.MetadataIndexStateService;
@ -33,6 +33,7 @@ import org.opensearch.cluster.routing.RecoverySource;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
@ -51,7 +52,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class RoutingTableTests extends ESAllocationTestCase { public class RoutingTableTests extends OpenSearchAllocationTestCase {
private static final String TEST_INDEX_1 = "test1"; private static final String TEST_INDEX_1 = "test1";
private static final String TEST_INDEX_2 = "test2"; private static final String TEST_INDEX_2 = "test2";

View File

@ -20,6 +20,8 @@
package org.elasticsearch.cluster.routing; package org.elasticsearch.cluster.routing;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.routing.ShardRoutingHelper;
import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.UUIDs; import org.opensearch.common.UUIDs;
import org.elasticsearch.index.Index; import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.shard.ShardId;

View File

@ -24,7 +24,7 @@ import com.carrotsearch.randomizedtesting.generators.RandomPicks;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -34,6 +34,7 @@ import org.opensearch.cluster.routing.RecoverySource.SnapshotRecoverySource;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.cluster.routing.UnassignedInfo; import org.opensearch.cluster.routing.UnassignedInfo;
import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus; import org.opensearch.cluster.routing.UnassignedInfo.AllocationStatus;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
@ -64,7 +65,7 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class UnassignedInfoTests extends ESAllocationTestCase { public class UnassignedInfoTests extends OpenSearchAllocationTestCase {
public void testReasonOrdinalOrder() { public void testReasonOrdinalOrder() {
UnassignedInfo.Reason[] order = new UnassignedInfo.Reason[]{ UnassignedInfo.Reason[] order = new UnassignedInfo.Reason[]{

View File

@ -25,7 +25,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
@ -48,7 +48,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class AddIncrementallyTests extends ESAllocationTestCase { public class AddIncrementallyTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(AddIncrementallyTests.class); private final Logger logger = LogManager.getLogger(AddIncrementallyTests.class);
public void testAddNodesAndIndices() { public void testAddNodesAndIndices() {

View File

@ -24,7 +24,7 @@ import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterInfo;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
@ -80,7 +80,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class AllocationCommandsTests extends ESAllocationTestCase { public class AllocationCommandsTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(AllocationCommandsTests.class); private final Logger logger = LogManager.getLogger(AllocationCommandsTests.class);
public void testMoveShardCommand() { public void testMoveShardCommand() {

View File

@ -20,7 +20,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -31,7 +31,7 @@ import org.opensearch.common.settings.Settings;
import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
public class AllocationPriorityTests extends ESAllocationTestCase { public class AllocationPriorityTests extends OpenSearchAllocationTestCase {
/** /**
* Tests that higher prioritized primaries and replicas are allocated first even on the balanced shard allocator * Tests that higher prioritized primaries and replicas are allocated first even on the balanced shard allocator

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.Matchers.sameInstance;
public class AwarenessAllocationTests extends ESAllocationTestCase { public class AwarenessAllocationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(AwarenessAllocationTests.class); private final Logger logger = LogManager.getLogger(AwarenessAllocationTests.class);

View File

@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.ArrayUtil;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -53,7 +53,7 @@ import java.util.stream.Collectors;
import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
public class BalanceConfigurationTests extends ESAllocationTestCase { public class BalanceConfigurationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(BalanceConfigurationTests.class); private final Logger logger = LogManager.getLogger(BalanceConfigurationTests.class);
// TODO maybe we can randomize these numbers somehow // TODO maybe we can randomize these numbers somehow

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.apache.lucene.util.TestUtil; import org.apache.lucene.util.TestUtil;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.routing.IndexShardRoutingTable; import org.opensearch.cluster.routing.IndexShardRoutingTable;
@ -69,7 +69,7 @@ public class BalanceUnbalancedClusterTests extends CatAllocationTestCase {
ClusterState clusterState = ClusterState.builder(state).metadata(metadata).routingTable(initialRoutingTable).build(); ClusterState clusterState = ClusterState.builder(state).metadata(metadata).routingTable(initialRoutingTable).build();
clusterState = strategy.reroute(clusterState, "reroute"); clusterState = strategy.reroute(clusterState, "reroute");
while (clusterState.routingTable().shardsWithState(INITIALIZING).isEmpty() == false) { while (clusterState.routingTable().shardsWithState(INITIALIZING).isEmpty() == false) {
clusterState = ESAllocationTestCase.startInitializingShardsAndReroute(strategy, clusterState); clusterState = OpenSearchAllocationTestCase.startInitializingShardsAndReroute(strategy, clusterState);
} }
Map<String, Integer> counts = new HashMap<>(); Map<String, Integer> counts = new HashMap<>();
for (IndexShardRoutingTable table : clusterState.routingTable().index(index)) { for (IndexShardRoutingTable table : clusterState.routingTable().index(index)) {

View File

@ -19,10 +19,10 @@
package org.elasticsearch.cluster.routing.allocation; package org.elasticsearch.cluster.routing.allocation;
import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.action.support.replication.ClusterStateCreationUtils;
import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterInfo;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.cluster.routing.RoutingNode; import org.opensearch.cluster.routing.RoutingNode;
@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.startsWith;
/** /**
* Tests for balancing a single shard, see {@link Balancer#decideRebalance(ShardRouting)}. * Tests for balancing a single shard, see {@link Balancer#decideRebalance(ShardRouting)}.
*/ */
public class BalancedSingleShardTests extends ESAllocationTestCase { public class BalancedSingleShardTests extends OpenSearchAllocationTestCase {
public void testRebalanceNonStartedShardNotAllowed() { public void testRebalanceNonStartedShardNotAllowed() {
BalancedShardsAllocator allocator = new BalancedShardsAllocator(Settings.EMPTY); BalancedShardsAllocator allocator = new BalancedShardsAllocator(Settings.EMPTY);

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -30,7 +30,7 @@ import org.opensearch.cluster.routing.IndexShardRoutingTable;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
@ -58,7 +58,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
* the test builds up a clusterstate from the cat input and optionally runs a full balance on it. * the test builds up a clusterstate from the cat input and optionally runs a full balance on it.
* This can be used to debug cluster allocation decisions. * This can be used to debug cluster allocation decisions.
*/ */
public abstract class CatAllocationTestCase extends ESAllocationTestCase { public abstract class CatAllocationTestCase extends OpenSearchAllocationTestCase {
protected abstract Path getCatPath() throws IOException; protected abstract Path getCatPath() throws IOException;
public void testRun() throws IOException { public void testRun() throws IOException {
@ -161,7 +161,7 @@ public abstract class CatAllocationTestCase extends ESAllocationTestCase {
} }
logger.debug("Initializing shards: {}", initializing); logger.debug("Initializing shards: {}", initializing);
numRelocations += initializing.size(); numRelocations += initializing.size();
clusterState = ESAllocationTestCase.startShardsAndReroute(strategy, clusterState, initializing); clusterState = OpenSearchAllocationTestCase.startShardsAndReroute(strategy, clusterState, initializing);
} }
logger.debug("--> num relocations to get balance: {}", numRelocations); logger.debug("--> num relocations to get balance: {}", numRelocations);
return clusterState; return clusterState;

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class ClusterRebalanceRoutingTests extends ESAllocationTestCase { public class ClusterRebalanceRoutingTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(ClusterRebalanceRoutingTests.class); private final Logger logger = LogManager.getLogger(ClusterRebalanceRoutingTests.class);
public void testAlways() { public void testAlways() {

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -38,7 +38,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class ConcurrentRebalanceRoutingTests extends ESAllocationTestCase { public class ConcurrentRebalanceRoutingTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(ConcurrentRebalanceRoutingTests.class); private final Logger logger = LogManager.getLogger(ConcurrentRebalanceRoutingTests.class);
public void testClusterConcurrentRebalance() { public void testClusterConcurrentRebalance() {

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -40,7 +40,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class DeadNodesAllocationTests extends ESAllocationTestCase { public class DeadNodesAllocationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(DeadNodesAllocationTests.class); private final Logger logger = LogManager.getLogger(DeadNodesAllocationTests.class);
public void testSimpleDeadNodeOnStartedPrimaryShard() { public void testSimpleDeadNodeOnStartedPrimaryShard() {

View File

@ -22,7 +22,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.health.ClusterHealthStatus; import org.opensearch.cluster.health.ClusterHealthStatus;
import org.opensearch.cluster.health.ClusterStateHealth; import org.opensearch.cluster.health.ClusterStateHealth;
@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
* primary shard allocation and assert the cluster health * primary shard allocation and assert the cluster health
* has the correct status based on those allocation decisions. * has the correct status based on those allocation decisions.
*/ */
public class DecisionsImpactOnClusterHealthTests extends ESAllocationTestCase { public class DecisionsImpactOnClusterHealthTests extends OpenSearchAllocationTestCase {
public void testPrimaryShardNoDecisionOnIndexCreation() throws IOException { public void testPrimaryShardNoDecisionOnIndexCreation() throws IOException {
final String indexName = "test-idx"; final String indexName = "test-idx";

View File

@ -27,7 +27,7 @@ import org.opensearch.cluster.ClusterInfo;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.opensearch.cluster.DiskUsage; import org.opensearch.cluster.DiskUsage;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.block.ClusterBlockLevel; import org.opensearch.cluster.block.ClusterBlockLevel;
import org.opensearch.cluster.block.ClusterBlocks; import org.opensearch.cluster.block.ClusterBlocks;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
@ -60,7 +60,7 @@ import java.util.function.LongSupplier;
import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class DiskThresholdMonitorTests extends ESAllocationTestCase { public class DiskThresholdMonitorTests extends OpenSearchAllocationTestCase {
public void testMarkFloodStageIndicesReadOnly() { public void testMarkFloodStageIndicesReadOnly() {
AllocationService allocation = createAllocationService(Settings.builder() AllocationService allocation = createAllocationService(Settings.builder()

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -37,7 +37,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class ElectReplicaAsPrimaryDuringRelocationTests extends ESAllocationTestCase { public class ElectReplicaAsPrimaryDuringRelocationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(ElectReplicaAsPrimaryDuringRelocationTests.class); private final Logger logger = LogManager.getLogger(ElectReplicaAsPrimaryDuringRelocationTests.class);
public void testElectReplicaAsPrimaryDuringRelocation() { public void testElectReplicaAsPrimaryDuringRelocation() {

View File

@ -24,7 +24,7 @@ import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterInfo;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -39,7 +39,7 @@ import org.opensearch.common.settings.Settings;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class ExpectedShardSizeAllocationTests extends ESAllocationTestCase { public class ExpectedShardSizeAllocationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(ExpectedShardSizeAllocationTests.class); private final Logger logger = LogManager.getLogger(ExpectedShardSizeAllocationTests.class);
public void testInitializingHasExpectedSize() { public void testInitializingHasExpectedSize() {

View File

@ -26,9 +26,9 @@ import org.opensearch.Version;
import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest; import org.opensearch.action.admin.cluster.reroute.ClusterRerouteRequest;
import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.create.CreateIndexRequest;
import org.opensearch.action.support.ActiveShardCount; import org.opensearch.action.support.ActiveShardCount;
import org.elasticsearch.action.support.replication.ClusterStateCreationUtils; import org.opensearch.action.support.replication.ClusterStateCreationUtils;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
@ -63,7 +63,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class FailedNodeRoutingTests extends ESAllocationTestCase { public class FailedNodeRoutingTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(FailedNodeRoutingTests.class); private final Logger logger = LogManager.getLogger(FailedNodeRoutingTests.class);
public void testSimpleFailedNodeTest() { public void testSimpleFailedNodeTest() {

View File

@ -24,7 +24,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class FailedShardsRoutingTests extends ESAllocationTestCase { public class FailedShardsRoutingTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(FailedShardsRoutingTests.class); private final Logger logger = LogManager.getLogger(FailedShardsRoutingTests.class);
public void testFailedShardPrimaryRelocatingToAndFrom() { public void testFailedShardPrimaryRelocatingToAndFrom() {

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
@ -52,7 +52,7 @@ import static org.opensearch.cluster.routing.allocation.decider.FilterAllocation
import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING; import static org.opensearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_RECOVERIES_SETTING;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class FilterRoutingTests extends ESAllocationTestCase { public class FilterRoutingTests extends OpenSearchAllocationTestCase {
public void testClusterIncludeFiltersSingleAttribute() { public void testClusterIncludeFiltersSingleAttribute() {
testClusterFilters(Settings.builder().put(CLUSTER_ROUTING_INCLUDE_GROUP_SETTING.getKey() + "tag1", "value1,value2"), testClusterFilters(Settings.builder().put(CLUSTER_ROUTING_INCLUDE_GROUP_SETTING.getKey() + "tag1", "value1,value2"),

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.action.shard.ShardStateAction; import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry; import org.opensearch.cluster.action.shard.ShardStateAction.FailedShardEntry;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
@ -50,7 +50,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasItem;
public class InSyncAllocationIdTests extends ESAllocationTestCase { public class InSyncAllocationIdTests extends OpenSearchAllocationTestCase {
private AllocationService allocation; private AllocationService allocation;
private ShardStateAction.ShardFailedClusterStateTaskExecutor failedClusterStateTaskExecutor; private ShardStateAction.ShardFailedClusterStateTaskExecutor failedClusterStateTaskExecutor;

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class IndexBalanceTests extends ESAllocationTestCase { public class IndexBalanceTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(IndexBalanceTests.class); private final Logger logger = LogManager.getLogger(IndexBalanceTests.class);
public void testBalanceAllNodesStarted() { public void testBalanceAllNodesStarted() {

View File

@ -22,7 +22,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
public class MaxRetryAllocationDeciderTests extends ESAllocationTestCase { public class MaxRetryAllocationDeciderTests extends OpenSearchAllocationTestCase {
private AllocationService strategy; private AllocationService strategy;

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -38,9 +38,9 @@ import org.opensearch.cluster.routing.RoutingNode;
import org.opensearch.cluster.routing.RoutingNodes; import org.opensearch.cluster.routing.RoutingNodes;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.ShardRoutingHelper; import org.opensearch.cluster.routing.ShardRoutingHelper;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.cluster.routing.allocation.RoutingAllocation;
import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator;
@ -81,7 +81,7 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.Is.is; import static org.hamcrest.core.Is.is;
public class NodeVersionAllocationDeciderTests extends ESAllocationTestCase { public class NodeVersionAllocationDeciderTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(NodeVersionAllocationDeciderTests.class); private final Logger logger = LogManager.getLogger(NodeVersionAllocationDeciderTests.class);

View File

@ -20,7 +20,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -36,7 +36,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class PreferLocalPrimariesToRelocatingPrimariesTests extends ESAllocationTestCase { public class PreferLocalPrimariesToRelocatingPrimariesTests extends OpenSearchAllocationTestCase {
public void testPreferLocalPrimaryAllocationOverFiltered() { public void testPreferLocalPrimaryAllocationOverFiltered() {
int concurrentRecoveries = randomIntBetween(1, 10); int concurrentRecoveries = randomIntBetween(1, 10);

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -35,7 +35,7 @@ import org.opensearch.common.settings.Settings;
import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class PreferPrimaryAllocationTests extends ESAllocationTestCase { public class PreferPrimaryAllocationTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(PreferPrimaryAllocationTests.class); private final Logger logger = LogManager.getLogger(PreferPrimaryAllocationTests.class);
public void testPreferPrimaryAllocationOverReplicas() { public void testPreferPrimaryAllocationOverReplicas() {

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -38,7 +38,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class PrimaryElectionRoutingTests extends ESAllocationTestCase { public class PrimaryElectionRoutingTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(PrimaryElectionRoutingTests.class); private final Logger logger = LogManager.getLogger(PrimaryElectionRoutingTests.class);
public void testBackupElectionToPrimaryWhenPrimaryCanBeAllocatedToAnotherNode() { public void testBackupElectionToPrimaryWhenPrimaryCanBeAllocatedToAnotherNode() {

View File

@ -23,7 +23,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -36,7 +36,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.opensearch.cluster.routing.ShardRoutingState.STARTED; import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class PrimaryNotRelocatedWhileBeingRecoveredTests extends ESAllocationTestCase { public class PrimaryNotRelocatedWhileBeingRecoveredTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(PrimaryNotRelocatedWhileBeingRecoveredTests.class); private final Logger logger = LogManager.getLogger(PrimaryNotRelocatedWhileBeingRecoveredTests.class);
public void testPrimaryNotRelocatedWhileBeingRecoveredFrom() { public void testPrimaryNotRelocatedWhileBeingRecoveredFrom() {

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -53,7 +53,7 @@ import java.util.Random;
import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
public class RandomAllocationDeciderTests extends ESAllocationTestCase { public class RandomAllocationDeciderTests extends OpenSearchAllocationTestCase {
/* This test will make random allocation decision on a growing and shrinking /* This test will make random allocation decision on a growing and shrinking
* cluster leading to a random distribution of the shards. After a certain * cluster leading to a random distribution of the shards. After a certain
* amount of iterations the test allows allocation unless the same shard is * amount of iterations the test allows allocation unless the same shard is

View File

@ -24,7 +24,7 @@ import org.apache.logging.log4j.Logger;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterInfo; import org.opensearch.cluster.ClusterInfo;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -43,7 +43,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class RebalanceAfterActiveTests extends ESAllocationTestCase { public class RebalanceAfterActiveTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(RebalanceAfterActiveTests.class); private final Logger logger = LogManager.getLogger(RebalanceAfterActiveTests.class);
public void testRebalanceOnlyAfterAllShardsAreActive() { public void testRebalanceOnlyAfterAllShardsAreActive() {

View File

@ -29,7 +29,7 @@ import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.cluster.routing.RoutingNodes; import org.opensearch.cluster.routing.RoutingNodes;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING; import static org.opensearch.cluster.routing.ShardRoutingState.INITIALIZING;
@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
public class ReplicaAllocatedAfterPrimaryTests extends ESAllocationTestCase { public class ReplicaAllocatedAfterPrimaryTests extends OpenSearchAllocationTestCase {
private final Logger logger = LogManager.getLogger(ReplicaAllocatedAfterPrimaryTests.class); private final Logger logger = LogManager.getLogger(ReplicaAllocatedAfterPrimaryTests.class);
public void testBackupIsAllocatedAfterPrimary() { public void testBackupIsAllocatedAfterPrimary() {

View File

@ -21,7 +21,7 @@ package org.elasticsearch.cluster.routing.allocation;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.EmptyClusterInfoService; import org.opensearch.cluster.EmptyClusterInfoService;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
@ -30,7 +30,7 @@ import org.opensearch.cluster.routing.RecoverySource;
import org.opensearch.cluster.routing.RoutingTable; import org.opensearch.cluster.routing.RoutingTable;
import org.opensearch.cluster.routing.ShardRouting; import org.opensearch.cluster.routing.ShardRouting;
import org.opensearch.cluster.routing.ShardRoutingState; import org.opensearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting; import org.opensearch.cluster.routing.TestShardRouting;
import org.opensearch.cluster.routing.allocation.AllocationService; import org.opensearch.cluster.routing.allocation.AllocationService;
import org.opensearch.cluster.routing.allocation.RoutingAllocation; import org.opensearch.cluster.routing.allocation.RoutingAllocation;
import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator;
@ -50,7 +50,7 @@ import static org.opensearch.cluster.routing.ShardRoutingState.STARTED;
import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED; import static org.opensearch.cluster.routing.ShardRoutingState.UNASSIGNED;
public class ResizeAllocationDeciderTests extends ESAllocationTestCase { public class ResizeAllocationDeciderTests extends OpenSearchAllocationTestCase {
private AllocationService strategy; private AllocationService strategy;

View File

@ -23,7 +23,7 @@ import org.opensearch.OpenSearchException;
import org.opensearch.Version; import org.opensearch.Version;
import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ESAllocationTestCase; import org.opensearch.cluster.OpenSearchAllocationTestCase;
import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.node.DiscoveryNodes;
@ -43,7 +43,7 @@ import java.util.List;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.sameInstance; import static org.hamcrest.Matchers.sameInstance;
public class RetryFailedAllocationTests extends ESAllocationTestCase { public class RetryFailedAllocationTests extends OpenSearchAllocationTestCase {
private MockAllocationService strategy; private MockAllocationService strategy;
private ClusterState clusterState; private ClusterState clusterState;

Some files were not shown because too many files have changed in this diff Show More