diff --git a/TESTING.asciidoc b/TESTING.asciidoc
index 2d6e6db8502..dc7ada692f5 100644
--- a/TESTING.asciidoc
+++ b/TESTING.asciidoc
@@ -73,9 +73,7 @@ mvn test "-Dtests.method=*esi*"
You can also filter tests by certain annotations ie:
- * `@Slow` - tests that are know to take a long time to execute
* `@Nightly` - tests that only run in nightly builds (disabled by default)
- * `@Integration` - integration tests
* `@Backwards` - backwards compatibility tests (disabled by default)
* `@AwaitsFix` - tests that are waiting for a bugfix (disabled by default)
* `@BadApple` - tests that are known to fail randomly (disabled by default)
@@ -83,15 +81,15 @@ You can also filter tests by certain annotations ie:
Those annotation names can be combined into a filter expression like:
------------------------------------------------
-mvn test -Dtests.filter="@nightly and not @slow"
+mvn test -Dtests.filter="@nightly and not @backwards"
------------------------------------------------
-to run all nightly test but not the ones that are slow. `tests.filter` supports
+to run all nightly test but not the ones that are backwards tests. `tests.filter` supports
the boolean operators `and, or, not` and grouping ie:
---------------------------------------------------------------
-mvn test -Dtests.filter="@nightly and not(@slow or @backwards)"
+mvn test -Dtests.filter="@nightly and not(@badapple or @backwards)"
---------------------------------------------------------------
=== Seed and repetitions.
@@ -147,7 +145,6 @@ Default value provided below in [brackets].
mvn test -Dtests.nightly=[false] - nightly test group (@Nightly)
mvn test -Dtests.weekly=[false] - weekly tests (@Weekly)
mvn test -Dtests.awaitsfix=[false] - known issue (@AwaitsFix)
-mvn test -Dtests.slow=[true] - slow tests (@Slow)
------------------------------------------------------------------
=== Load balancing and caches.
@@ -248,6 +245,21 @@ $ curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elastic
$ tar -xzf elasticsearch-1.2.1.tar.gz
---------------------------------------------------------------------------
+== Running integration tests
+
+To run the integration tests:
+
+---------------------------------------------------------------------------
+mvn verify
+---------------------------------------------------------------------------
+
+Note that this will also run the unit tests first. If you want to just
+run the integration tests only (because you are debugging them):
+
+---------------------------------------------------------------------------
+mvn verify -Dskip.unit.tests
+---------------------------------------------------------------------------
+
== Testing the REST layer
The available integration tests make use of the java API to communicate with
@@ -261,10 +273,10 @@ The REST tests are run automatically when executing the maven test command. To r
REST tests use the following command:
---------------------------------------------------------------------------
-mvn test -Dtests.filter="@Rest"
+mvn verify -Dtests.filter="@Rest"
---------------------------------------------------------------------------
-`ElasticsearchRestTests` is the executable test class that runs all the
+`RestNIT` are the executable test classes that runs all the
yaml suites available within the `rest-api-spec` folder.
The REST tests support all the options provided by the randomized runner, plus the following:
@@ -321,3 +333,12 @@ ES_CLEAN_BEFORE_TEST=true bats 30_deb_package.bats
The current mode of execution is to copy all the packages that should be tested
into one directory, then copy the bats files into the same directory and run
those.
+
+== Coverage analysis
+
+To run tests instrumented with jacoco and produce a coverage report in
+`target/site/jacoco/`:
+
+---------------------------------------------------------------------------
+mvn -Dtests.coverage test jacoco:report
+---------------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index def0b5e14f0..d4fb7f95342 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -16,11 +16,6 @@
Elasticsearch Core
Elasticsearch - Open Source, Distributed, RESTful Search Engine
-
-
- true
-
-
org.hamcrest
@@ -297,119 +292,6 @@
-
- org.apache.maven.plugins
- maven-shade-plugin
-
-
- package
-
- shade
-
-
-
-
- true
- shaded
- false
- true
- true
- false
-
-
- com.google.guava:guava
- com.carrotsearch:hppc
- com.fasterxml.jackson.core:jackson-core
- com.fasterxml.jackson.dataformat:jackson-dataformat-smile
- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor
- joda-time:joda-time
- org.joda:joda-convert
- io.netty:netty
- com.ning:compress-lzf
- com.github.spullara.mustache.java:compiler
- com.tdunning:t-digest
- org.apache.commons:commons-lang3
- commons-cli:commons-cli
- com.twitter:jsr166e
-
-
-
-
-
-
- true
-
-
-
-
-
- com.google.common
- org.elasticsearch.common
-
-
- com.carrotsearch.hppc
- org.elasticsearch.common.hppc
-
-
- com.twitter.jsr166e
- org.elasticsearch.common.util.concurrent.jsr166e
-
-
- com.fasterxml.jackson
- org.elasticsearch.common.jackson
-
-
- org.joda.time
- org.elasticsearch.common.joda.time
-
-
- org.jboss.netty
- org.elasticsearch.common.netty
-
-
- com.ning.compress
- org.elasticsearch.common.compress
-
-
- com.github.mustachejava
- org.elasticsearch.common.mustache
-
-
- com.tdunning.math.stats
- org.elasticsearch.common.stats
-
-
- org.apache.commons.lang
- org.elasticsearch.common.lang
-
-
- org.apache.commons.cli
- org.elasticsearch.common.cli.commons
-
-
-
-
- *:*
-
- META-INF/license/**
- META-INF/*
- META-INF/maven/**
- LICENSE
- NOTICE
- /*.txt
- build.properties
-
-
-
- io.netty:netty
-
- org/jboss/netty/**
-
-
-
-
-
org.apache.maven.plugins
diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
index d110942388f..cc3aa5068db 100644
--- a/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
+++ b/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java
@@ -222,7 +222,7 @@ public class Bootstrap {
}
}
- public static void main(String[] args) {
+ public static void main(String[] args) throws Throwable {
BootstrapCLIParser bootstrapCLIParser = new BootstrapCLIParser();
CliTool.ExitStatus status = bootstrapCLIParser.execute(args);
@@ -239,28 +239,16 @@ public class Bootstrap {
foreground = false;
}
- String stage = "Settings";
+ Tuple tuple = initialSettings(foreground);
+ Settings settings = tuple.v1();
+ Environment environment = tuple.v2();
- Settings settings = null;
- Environment environment = null;
- try {
- Tuple tuple = initialSettings(foreground);
- settings = tuple.v1();
- environment = tuple.v2();
-
- if (environment.pidFile() != null) {
- stage = "Pid";
- PidFile.create(environment.pidFile(), true);
- }
-
- stage = "Logging";
- setupLogging(settings, environment);
- } catch (Exception e) {
- String errorMessage = buildErrorMessage(stage, e);
- sysError(errorMessage, true);
- System.exit(3);
+ if (environment.pidFile() != null) {
+ PidFile.create(environment.pidFile(), true);
}
+ setupLogging(settings, environment);
+
if (System.getProperty("es.max-open-files", "false").equals("true")) {
ESLogger logger = Loggers.getLogger(Bootstrap.class);
logger.info("max_open_files [{}]", ProcessProbe.getInstance().getMaxFileDescriptorCount());
@@ -272,7 +260,6 @@ public class Bootstrap {
logger.warn("jvm uses the client vm, make sure to run `java` with the server vm for best performance by adding `-server` to the command line");
}
- stage = "Initialization";
try {
if (!foreground) {
Loggers.disableConsoleLogging();
@@ -284,7 +271,6 @@ public class Bootstrap {
INSTANCE.setup(true, settings, environment);
- stage = "Startup";
INSTANCE.start();
if (!foreground) {
@@ -295,14 +281,9 @@ public class Bootstrap {
if (INSTANCE.node != null) {
logger = Loggers.getLogger(Bootstrap.class, INSTANCE.node.settings().get("name"));
}
- String errorMessage = buildErrorMessage(stage, e);
- if (foreground) {
- sysError(errorMessage, true);
- Loggers.disableConsoleLogging();
- }
logger.error("Exception", e);
- System.exit(3);
+ throw e;
}
}
@@ -323,38 +304,4 @@ public class Bootstrap {
System.err.flush();
}
}
-
- private static String buildErrorMessage(String stage, Throwable e) {
- StringBuilder errorMessage = new StringBuilder("{").append(Version.CURRENT).append("}: ");
- errorMessage.append(stage).append(" Failed ...\n");
- if (e instanceof CreationException) {
- CreationException createException = (CreationException) e;
- Set seenMessages = newHashSet();
- int counter = 1;
- for (Message message : createException.getErrorMessages()) {
- String detailedMessage;
- if (message.getCause() == null) {
- detailedMessage = message.getMessage();
- } else {
- detailedMessage = ExceptionsHelper.detailedMessage(message.getCause(), true, 0);
- }
- if (detailedMessage == null) {
- detailedMessage = message.getMessage();
- }
- if (seenMessages.contains(detailedMessage)) {
- continue;
- }
- seenMessages.add(detailedMessage);
- errorMessage.append("").append(counter++).append(") ").append(detailedMessage);
- }
- } else {
- errorMessage.append("- ").append(ExceptionsHelper.detailedMessage(e, true, 0));
- }
- if (Loggers.getLogger(Bootstrap.class).isDebugEnabled()) {
- errorMessage.append("\n").append(ExceptionsHelper.stackTrace(e));
- }
- return errorMessage.toString();
- }
-
-
}
diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java b/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java
index e9a851ecea1..21910e5cd96 100644
--- a/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java
+++ b/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java
@@ -24,7 +24,7 @@ package org.elasticsearch.bootstrap;
*/
public class Elasticsearch extends Bootstrap {
- public static void main(String[] args) {
+ public static void main(String[] args) throws Throwable {
Bootstrap.main(args);
}
}
\ No newline at end of file
diff --git a/core/src/main/java/org/elasticsearch/bootstrap/ElasticsearchF.java b/core/src/main/java/org/elasticsearch/bootstrap/ElasticsearchF.java
index 96e310eff3f..9190b6eca6f 100644
--- a/core/src/main/java/org/elasticsearch/bootstrap/ElasticsearchF.java
+++ b/core/src/main/java/org/elasticsearch/bootstrap/ElasticsearchF.java
@@ -25,7 +25,7 @@ package org.elasticsearch.bootstrap;
*/
public class ElasticsearchF {
- public static void main(String[] args) {
+ public static void main(String[] args) throws Throwable {
System.setProperty("es.foreground", "yes");
Bootstrap.main(args);
}
diff --git a/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java b/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java
index a77392f1197..1f6e3345c38 100644
--- a/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java
+++ b/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java
@@ -47,8 +47,11 @@ import java.util.jar.Manifest;
public class JarHell {
/** Simple driver class, can be used eg. from builds. Returns non-zero on jar-hell */
+ @SuppressForbidden(reason = "command line tool")
public static void main(String args[]) throws Exception {
+ System.out.println("checking for jar hell...");
checkJarHell();
+ System.out.println("no jar hell found");
}
/**
diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java
index 4c0cde1389e..ca6fb9f0eb0 100644
--- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java
+++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java
@@ -116,14 +116,15 @@ final class Security {
/** returns dynamic Permissions to configured paths */
static Permissions createPermissions(Environment environment) throws IOException {
- // TODO: improve test infra so we can reduce permissions where read/write
- // is not really needed...
Permissions policy = new Permissions();
+ // read-only dirs
+ addPath(policy, environment.binFile(), "read,readlink");
+ addPath(policy, environment.libFile(), "read,readlink");
+ addPath(policy, environment.pluginsFile(), "read,readlink");
+ addPath(policy, environment.configFile(), "read,readlink");
+ // read-write dirs
addPath(policy, environment.tmpFile(), "read,readlink,write,delete");
- addPath(policy, environment.homeFile(), "read,readlink,write,delete");
- addPath(policy, environment.configFile(), "read,readlink,write,delete");
addPath(policy, environment.logsFile(), "read,readlink,write,delete");
- addPath(policy, environment.pluginsFile(), "read,readlink,write,delete");
for (Path path : environment.dataFiles()) {
addPath(policy, path, "read,readlink,write,delete");
}
@@ -134,7 +135,8 @@ final class Security {
addPath(policy, path, "read,readlink,write,delete");
}
if (environment.pidFile() != null) {
- addPath(policy, environment.pidFile().getParent(), "read,readlink,write,delete");
+ // we just need permission to remove the file if its elsewhere.
+ policy.add(new FilePermission(environment.pidFile().toString(), "delete"));
}
return policy;
}
diff --git a/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java b/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java
index fe1b2a2438d..65998b57cc7 100644
--- a/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java
+++ b/core/src/main/java/org/elasticsearch/common/util/concurrent/PrioritizedEsThreadPoolExecutor.java
@@ -19,6 +19,7 @@
package org.elasticsearch.common.util.concurrent;
import com.google.common.collect.Lists;
+
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.unit.TimeValue;
@@ -161,8 +162,10 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
private Runnable runnable;
private final long insertionOrder;
- private volatile ScheduledFuture> timeoutFuture;
- private volatile boolean started = false;
+
+ // these two variables are protected by 'this'
+ private ScheduledFuture> timeoutFuture;
+ private boolean started = false;
TieBreakingPrioritizedRunnable(PrioritizedRunnable runnable, long insertionOrder) {
this(runnable, runnable.priority(), insertionOrder);
@@ -176,10 +179,12 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
@Override
public void run() {
- // make the task as stared. This is needed for synchronization with the timeout handling
- // see #scheduleTimeout()
- started = true;
- FutureUtils.cancel(timeoutFuture);
+ synchronized (this) {
+ // make the task as stared. This is needed for synchronization with the timeout handling
+ // see #scheduleTimeout()
+ started = true;
+ FutureUtils.cancel(timeoutFuture);
+ }
runAndClean(runnable);
}
@@ -193,17 +198,20 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
}
public void scheduleTimeout(ScheduledExecutorService timer, final Runnable timeoutCallback, TimeValue timeValue) {
- timeoutFuture = timer.schedule(new Runnable() {
- @Override
- public void run() {
- if (remove(TieBreakingPrioritizedRunnable.this)) {
- runAndClean(timeoutCallback);
- }
+ synchronized (this) {
+ if (timeoutFuture != null) {
+ throw new IllegalStateException("scheduleTimeout may only be called once");
+ }
+ if (started == false) {
+ timeoutFuture = timer.schedule(new Runnable() {
+ @Override
+ public void run() {
+ if (remove(TieBreakingPrioritizedRunnable.this)) {
+ runAndClean(timeoutCallback);
+ }
+ }
+ }, timeValue.nanos(), TimeUnit.NANOSECONDS);
}
- }, timeValue.nanos(), TimeUnit.NANOSECONDS);
- if (started) {
- // if the actual action already it might have missed the setting of the future. Clean it ourselves.
- FutureUtils.cancel(timeoutFuture);
}
}
diff --git a/core/src/main/java/org/elasticsearch/env/Environment.java b/core/src/main/java/org/elasticsearch/env/Environment.java
index 445ec7a61de..113caa0003a 100644
--- a/core/src/main/java/org/elasticsearch/env/Environment.java
+++ b/core/src/main/java/org/elasticsearch/env/Environment.java
@@ -45,8 +45,6 @@ public class Environment {
private final Settings settings;
- private final Path homeFile;
-
private final Path[] dataFiles;
private final Path[] dataWithClusterFiles;
@@ -57,6 +55,12 @@ public class Environment {
private final Path pluginsFile;
+ /** location of bin/, used by plugin manager */
+ private final Path binFile;
+
+ /** location of lib/, */
+ private final Path libFile;
+
private final Path logsFile;
/** Path to the PID file (can be null if no PID file is configured) **/
@@ -83,6 +87,7 @@ public class Environment {
public Environment(Settings settings) {
this.settings = settings;
+ final Path homeFile;
if (settings.get("path.home") != null) {
homeFile = PathUtils.get(cleanPath(settings.get("path.home")));
} else {
@@ -133,6 +138,9 @@ public class Environment {
} else {
pidFile = null;
}
+
+ binFile = homeFile.resolve("bin");
+ libFile = homeFile.resolve("lib");
}
/**
@@ -142,13 +150,6 @@ public class Environment {
return this.settings;
}
- /**
- * The home of the installation.
- */
- public Path homeFile() {
- return homeFile;
- }
-
/**
* The data location.
*/
@@ -236,6 +237,14 @@ public class Environment {
return pluginsFile;
}
+ public Path binFile() {
+ return binFile;
+ }
+
+ public Path libFile() {
+ return libFile;
+ }
+
public Path logsFile() {
return logsFile;
}
diff --git a/core/src/main/java/org/elasticsearch/node/Node.java b/core/src/main/java/org/elasticsearch/node/Node.java
index 0c4f4d4e7b4..de211dfadc4 100644
--- a/core/src/main/java/org/elasticsearch/node/Node.java
+++ b/core/src/main/java/org/elasticsearch/node/Node.java
@@ -140,8 +140,8 @@ public class Node implements Releasable {
if (logger.isDebugEnabled()) {
Environment env = tuple.v2();
- logger.debug("using home [{}], config [{}], data [{}], logs [{}], plugins [{}]",
- env.homeFile(), env.configFile(), Arrays.toString(env.dataFiles()), env.logsFile(), env.pluginsFile());
+ logger.debug("using config [{}], data [{}], logs [{}], plugins [{}]",
+ env.configFile(), Arrays.toString(env.dataFiles()), env.logsFile(), env.pluginsFile());
}
this.pluginsService = new PluginsService(tuple.v1(), tuple.v2());
diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java
index e7d5c3fcb07..bf3b060db12 100644
--- a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java
+++ b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java
@@ -32,6 +32,7 @@ import org.apache.lucene.util.Counter;
import org.elasticsearch.action.percolate.PercolateShardRequest;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.cache.recycler.PageCacheRecycler;
+import org.elasticsearch.client.Client;
import org.elasticsearch.common.*;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.lease.Releasables;
@@ -58,7 +59,7 @@ import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.dfs.DfsSearchResult;
import org.elasticsearch.search.fetch.FetchSearchResult;
import org.elasticsearch.search.fetch.FetchSubPhase;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -116,6 +117,7 @@ public class PercolateContext extends SearchContext {
private SearchContextAggregations aggregations;
private QuerySearchResult querySearchResult;
private Sort sort;
+ private final Map subPhaseContexts = new HashMap<>();
public PercolateContext(PercolateShardRequest request, SearchShardTarget searchShardTarget, IndexShard indexShard,
IndexService indexService, PageCacheRecycler pageCacheRecycler,
@@ -282,6 +284,15 @@ public class PercolateContext extends SearchContext {
return this;
}
+ @Override
+ public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) {
+ String subPhaseName = contextFactory.getName();
+ if (subPhaseContexts.get(subPhaseName) == null) {
+ subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance());
+ }
+ return (SubPhaseContext) subPhaseContexts.get(subPhaseName);
+ }
+
// Unused:
@Override
public void preProcess() {
@@ -378,16 +389,6 @@ public class PercolateContext extends SearchContext {
throw new UnsupportedOperationException();
}
- @Override
- public boolean hasFieldDataFields() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public FieldDataFieldsContext fieldDataFields() {
- throw new UnsupportedOperationException();
- }
-
@Override
public boolean hasScriptFields() {
throw new UnsupportedOperationException();
diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java
index 1c7ab64fa31..7c0f2bfcc8c 100644
--- a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java
+++ b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java
@@ -462,7 +462,7 @@ public class PluginManager {
}
Path binDir(Environment env) {
- return env.homeFile().resolve("bin").resolve(name);
+ return env.binFile().resolve(name);
}
Path configDir(Environment env) {
diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java
index 352588cca71..c3aa077b63d 100644
--- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java
+++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestIndicesAction.java
@@ -42,6 +42,8 @@ import org.elasticsearch.rest.*;
import org.elasticsearch.rest.action.support.RestActionListener;
import org.elasticsearch.rest.action.support.RestResponseListener;
import org.elasticsearch.rest.action.support.RestTable;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
import java.util.Locale;
@@ -112,6 +114,9 @@ public class RestIndicesAction extends AbstractCatAction {
table.addCell("docs.count", "alias:dc,docsCount;text-align:right;desc:available docs");
table.addCell("docs.deleted", "alias:dd,docsDeleted;text-align:right;desc:deleted docs");
+ table.addCell("creation.date", "alias:cd;default:false;desc:index creation date (millisecond value)");
+ table.addCell("creation.date.string", "alias:cds;default:false;desc:index creation date (as string)");
+
table.addCell("store.size", "sibling:pri;alias:ss,storeSize;text-align:right;desc:store size of primaries & replicas");
table.addCell("pri.store.size", "text-align:right;desc:store size of primaries");
@@ -320,6 +325,9 @@ public class RestIndicesAction extends AbstractCatAction {
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getDocs().getCount());
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getDocs().getDeleted());
+ table.addCell(indexMetaData.creationDate());
+ table.addCell(new DateTime(indexMetaData.creationDate(), DateTimeZone.getDefault()));
+
table.addCell(indexStats == null ? null : indexStats.getTotal().getStore().size());
table.addCell(indexStats == null ? null : indexStats.getPrimaries().getStore().size());
diff --git a/core/src/main/java/org/elasticsearch/search/SearchModule.java b/core/src/main/java/org/elasticsearch/search/SearchModule.java
index cf1cf71afef..eba17c8afd7 100644
--- a/core/src/main/java/org/elasticsearch/search/SearchModule.java
+++ b/core/src/main/java/org/elasticsearch/search/SearchModule.java
@@ -32,6 +32,7 @@ import org.elasticsearch.search.aggregations.AggregationModule;
import org.elasticsearch.search.controller.SearchPhaseController;
import org.elasticsearch.search.dfs.DfsPhase;
import org.elasticsearch.search.fetch.FetchPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseModule;
import org.elasticsearch.search.fetch.explain.ExplainFetchSubPhase;
import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsFetchSubPhase;
import org.elasticsearch.search.fetch.innerhits.InnerHitsFetchSubPhase;
@@ -63,7 +64,8 @@ public class SearchModule extends AbstractModule implements SpawnModules {
new HighlightModule(),
new SuggestModule(),
new FunctionScoreModule(),
- new AggregationModule());
+ new AggregationModule(),
+ new FetchSubPhaseModule());
}
@Override
@@ -73,14 +75,6 @@ public class SearchModule extends AbstractModule implements SpawnModules {
bind(SearchPhaseController.class).asEagerSingleton();
bind(FetchPhase.class).asEagerSingleton();
- bind(ExplainFetchSubPhase.class).asEagerSingleton();
- bind(FieldDataFieldsFetchSubPhase.class).asEagerSingleton();
- bind(ScriptFieldsFetchSubPhase.class).asEagerSingleton();
- bind(FetchSourceSubPhase.class).asEagerSingleton();
- bind(VersionFetchSubPhase.class).asEagerSingleton();
- bind(MatchedQueriesFetchSubPhase.class).asEagerSingleton();
- bind(HighlightPhase.class).asEagerSingleton();
- bind(InnerHitsFetchSubPhase.class).asEagerSingleton();
bind(SearchServiceTransportAction.class).asEagerSingleton();
bind(MoreLikeThisFetchService.class).asEagerSingleton();
diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactories.java b/core/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactories.java
index 344d92de008..0a76f1f7e86 100644
--- a/core/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactories.java
+++ b/core/src/main/java/org/elasticsearch/search/aggregations/AggregatorFactories.java
@@ -22,6 +22,7 @@ import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorFactory;
import org.elasticsearch.search.aggregations.support.AggregationContext;
import org.elasticsearch.search.aggregations.support.AggregationPath;
+import org.elasticsearch.search.aggregations.support.AggregationPath.PathElement;
import java.io.IOException;
import java.util.ArrayList;
@@ -162,40 +163,79 @@ public class AggregatorFactories {
for (PipelineAggregatorFactory factory : pipelineAggregatorFactories) {
pipelineAggregatorFactoriesMap.put(factory.getName(), factory);
}
- Set aggFactoryNames = new HashSet<>();
+ Map aggFactoriesMap = new HashMap<>();
for (AggregatorFactory aggFactory : aggFactories) {
- aggFactoryNames.add(aggFactory.name);
+ aggFactoriesMap.put(aggFactory.name, aggFactory);
}
List orderedPipelineAggregatorrs = new LinkedList<>();
List unmarkedFactories = new ArrayList(pipelineAggregatorFactories);
Set temporarilyMarked = new HashSet();
while (!unmarkedFactories.isEmpty()) {
PipelineAggregatorFactory factory = unmarkedFactories.get(0);
- resolvePipelineAggregatorOrder(aggFactoryNames, pipelineAggregatorFactoriesMap, orderedPipelineAggregatorrs, unmarkedFactories, temporarilyMarked, factory);
+ resolvePipelineAggregatorOrder(aggFactoriesMap, pipelineAggregatorFactoriesMap, orderedPipelineAggregatorrs,
+ unmarkedFactories, temporarilyMarked, factory);
}
return orderedPipelineAggregatorrs;
}
- private void resolvePipelineAggregatorOrder(Set aggFactoryNames, Map pipelineAggregatorFactoriesMap,
+ private void resolvePipelineAggregatorOrder(Map aggFactoriesMap,
+ Map pipelineAggregatorFactoriesMap,
List orderedPipelineAggregators, List unmarkedFactories, Set temporarilyMarked,
PipelineAggregatorFactory factory) {
if (temporarilyMarked.contains(factory)) {
- throw new IllegalStateException("Cyclical dependancy found with pipeline aggregator [" + factory.getName() + "]");
+ throw new IllegalArgumentException("Cyclical dependancy found with pipeline aggregator [" + factory.getName() + "]");
} else if (unmarkedFactories.contains(factory)) {
temporarilyMarked.add(factory);
String[] bucketsPaths = factory.getBucketsPaths();
for (String bucketsPath : bucketsPaths) {
- List bucketsPathElements = AggregationPath.parse(bucketsPath).getPathElementsAsStringList();
- String firstAggName = bucketsPathElements.get(0);
- if (bucketsPath.equals("_count") || bucketsPath.equals("_key") || aggFactoryNames.contains(firstAggName)) {
+ List bucketsPathElements = AggregationPath.parse(bucketsPath).getPathElements();
+ String firstAggName = bucketsPathElements.get(0).name;
+ if (bucketsPath.equals("_count") || bucketsPath.equals("_key")) {
+ continue;
+ } else if (aggFactoriesMap.containsKey(firstAggName)) {
+ AggregatorFactory aggFactory = aggFactoriesMap.get(firstAggName);
+ for (int i = 1; i < bucketsPathElements.size(); i++) {
+ PathElement pathElement = bucketsPathElements.get(i);
+ String aggName = pathElement.name;
+ if ((i == bucketsPathElements.size() - 1) && (aggName.equalsIgnoreCase("_key") || aggName.equals("_count"))) {
+ break;
+ } else {
+ // Check the non-pipeline sub-aggregator
+ // factories
+ AggregatorFactory[] subFactories = aggFactory.factories.factories;
+ boolean foundSubFactory = false;
+ for (AggregatorFactory subFactory : subFactories) {
+ if (aggName.equals(subFactory.name)) {
+ aggFactory = subFactory;
+ foundSubFactory = true;
+ break;
+ }
+ }
+ // Check the pipeline sub-aggregator factories
+ if (!foundSubFactory && (i == bucketsPathElements.size() - 1)) {
+ List subPipelineFactories = aggFactory.factories.pipelineAggregatorFactories;
+ for (PipelineAggregatorFactory subFactory : subPipelineFactories) {
+ if (aggName.equals(subFactory.name())) {
+ foundSubFactory = true;
+ break;
+ }
+ }
+ }
+ if (!foundSubFactory) {
+ throw new IllegalArgumentException("No aggregation [" + aggName + "] found for path [" + bucketsPath
+ + "]");
+ }
+ }
+ }
continue;
} else {
PipelineAggregatorFactory matchingFactory = pipelineAggregatorFactoriesMap.get(firstAggName);
if (matchingFactory != null) {
- resolvePipelineAggregatorOrder(aggFactoryNames, pipelineAggregatorFactoriesMap, orderedPipelineAggregators, unmarkedFactories,
+ resolvePipelineAggregatorOrder(aggFactoriesMap, pipelineAggregatorFactoriesMap, orderedPipelineAggregators,
+ unmarkedFactories,
temporarilyMarked, matchingFactory);
} else {
- throw new IllegalStateException("No aggregation found for path [" + bucketsPath + "]");
+ throw new IllegalArgumentException("No aggregation found for path [" + bucketsPath + "]");
}
}
}
diff --git a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java
index 5109156af65..26b38ee67de 100644
--- a/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java
+++ b/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregatorFactory.java
@@ -37,7 +37,7 @@ public abstract class PipelineAggregatorFactory {
/**
* Constructs a new pipeline aggregator factory.
- *
+ *
* @param name
* The aggregation name
* @param type
@@ -49,10 +49,14 @@ public abstract class PipelineAggregatorFactory {
this.bucketsPaths = bucketsPaths;
}
+ public String name() {
+ return name;
+ }
+
/**
* Validates the state of this factory (makes sure the factory is properly
* configured)
- *
+ *
* @param pipelineAggregatorFactories
* @param factories
* @param parent
@@ -66,7 +70,7 @@ public abstract class PipelineAggregatorFactory {
/**
* Creates the pipeline aggregator
- *
+ *
* @param context
* The aggregation context
* @param parent
@@ -77,7 +81,7 @@ public abstract class PipelineAggregatorFactory {
* with 0 as a bucket ordinal. Some factories can take
* advantage of this in order to return more optimized
* implementations.
- *
+ *
* @return The created aggregator
*/
public final PipelineAggregator create() throws IOException {
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
index 8e9782c3547..81f13c32727 100644
--- a/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
+++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java
@@ -45,6 +45,7 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.internal.SourceFieldMapper;
import org.elasticsearch.index.mapper.object.ObjectMapper;
+import org.elasticsearch.index.query.functionscore.ScoreFunctionParser;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
import org.elasticsearch.search.SearchParseElement;
@@ -83,13 +84,10 @@ public class FetchPhase implements SearchPhase {
private final FetchSubPhase[] fetchSubPhases;
@Inject
- public FetchPhase(HighlightPhase highlightPhase, ScriptFieldsFetchSubPhase scriptFieldsPhase,
- MatchedQueriesFetchSubPhase matchedQueriesPhase, ExplainFetchSubPhase explainPhase, VersionFetchSubPhase versionPhase,
- FetchSourceSubPhase fetchSourceSubPhase, FieldDataFieldsFetchSubPhase fieldDataFieldsFetchSubPhase,
- InnerHitsFetchSubPhase innerHitsFetchSubPhase) {
+ public FetchPhase(Set fetchSubPhases, InnerHitsFetchSubPhase innerHitsFetchSubPhase) {
innerHitsFetchSubPhase.setFetchPhase(this);
- this.fetchSubPhases = new FetchSubPhase[]{scriptFieldsPhase, matchedQueriesPhase, explainPhase, highlightPhase,
- fetchSourceSubPhase, versionPhase, fieldDataFieldsFetchSubPhase, innerHitsFetchSubPhase};
+ this.fetchSubPhases = fetchSubPhases.toArray(new FetchSubPhase[fetchSubPhases.size() + 1]);
+ this.fetchSubPhases[fetchSubPhases.size()] = innerHitsFetchSubPhase;
}
@Override
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java
index a6dc424683c..91cc7034401 100644
--- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java
+++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java
@@ -114,4 +114,23 @@ public interface FetchSubPhase {
boolean hitsExecutionNeeded(SearchContext context);
void hitsExecute(SearchContext context, InternalSearchHit[] hits);
+
+ /**
+ * This interface is in the fetch phase plugin mechanism.
+ * Whenever a new search is executed we create a new {@link SearchContext} that holds individual contexts for each {@link org.elasticsearch.search.fetch.FetchSubPhase}.
+ * Fetch phases that use the plugin mechanism must provide a ContextFactory to the SearchContext that creates the fetch phase context and also associates them with a name.
+ * See {@link SearchContext#getFetchSubPhaseContext(FetchSubPhase.ContextFactory)}
+ */
+ public interface ContextFactory {
+
+ /**
+ * The name of the context.
+ */
+ public String getName();
+
+ /**
+ * Creates a new instance of a FetchSubPhaseContext that holds all information a FetchSubPhase needs to execute on hits.
+ */
+ public SubPhaseContext newContextInstance();
+ }
}
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java
new file mode 100644
index 00000000000..237f43519fa
--- /dev/null
+++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.elasticsearch.search.fetch;
+
+/**
+ * All configuration and context needed by the FetchSubPhase to execute on hits.
+ * The only required information in this base class is whether or not the sub phase needs to be run at all.
+ * It can be extended by FetchSubPhases to hold information the phase needs to execute on hits.
+ * See {@link org.elasticsearch.search.fetch.FetchSubPhase.ContextFactory} and also {@link org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext} for an example.
+ */
+public class FetchSubPhaseContext {
+
+ // This is to store if the FetchSubPhase should be executed at all.
+ private boolean hitExecutionNeeded = false;
+
+ /**
+ * Set if this phase should be executed at all.
+ */
+ void setHitExecutionNeeded(boolean hitExecutionNeeded) {
+ this.hitExecutionNeeded = hitExecutionNeeded;
+ }
+
+ /**
+ * Returns if this phase be executed at all.
+ */
+ public boolean hitExecutionNeeded() {
+ return hitExecutionNeeded;
+ }
+
+}
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java
new file mode 100644
index 00000000000..e01de72b232
--- /dev/null
+++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.elasticsearch.search.fetch;
+
+import com.google.common.collect.Lists;
+import org.elasticsearch.common.inject.AbstractModule;
+import org.elasticsearch.common.inject.multibindings.Multibinder;
+import org.elasticsearch.search.fetch.explain.ExplainFetchSubPhase;
+import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsFetchSubPhase;
+import org.elasticsearch.search.fetch.innerhits.InnerHitsFetchSubPhase;
+import org.elasticsearch.search.fetch.matchedqueries.MatchedQueriesFetchSubPhase;
+import org.elasticsearch.search.fetch.script.ScriptFieldsFetchSubPhase;
+import org.elasticsearch.search.fetch.source.FetchSourceSubPhase;
+import org.elasticsearch.search.fetch.version.VersionFetchSubPhase;
+import org.elasticsearch.search.highlight.HighlightPhase;
+
+import java.util.List;
+
+/**
+ * Module for registering fetch sub phases. Fetch phases are executed when the document is finally
+ * retrieved from the shard. To implement a new fetch phase one needs to implement the following classes and interfaces
+ *
+ *
+ * {@link FetchSubPhaseParseElement}
+ * {@link FetchSubPhase}
+ * {@link FetchSubPhaseContext}
+ *
+ *
+ * The FetchSubPhase must then be registered with this module with {@link FetchSubPhaseModule#registerFetchSubPhase(Class extends FetchSubPhase>)}.
+ * See {@link FieldDataFieldsFetchSubPhase} for an example.
+ */
+public class FetchSubPhaseModule extends AbstractModule {
+
+ private List> fetchSubPhases = Lists.newArrayList();
+
+ public FetchSubPhaseModule() {
+ registerFetchSubPhase(ExplainFetchSubPhase.class);
+ registerFetchSubPhase(FieldDataFieldsFetchSubPhase.class);
+ registerFetchSubPhase(ScriptFieldsFetchSubPhase.class);
+ registerFetchSubPhase(FetchSourceSubPhase.class);
+ registerFetchSubPhase(VersionFetchSubPhase.class);
+ registerFetchSubPhase(MatchedQueriesFetchSubPhase.class);
+ registerFetchSubPhase(HighlightPhase.class);
+ }
+
+ public void registerFetchSubPhase(Class extends FetchSubPhase> subPhase) {
+ fetchSubPhases.add(subPhase);
+ }
+
+ @Override
+ protected void configure() {
+ Multibinder parserMapBinder = Multibinder.newSetBinder(binder(), FetchSubPhase.class);
+ for (Class extends FetchSubPhase> clazz : fetchSubPhases) {
+ parserMapBinder.addBinding().to(clazz);
+ }
+ bind(InnerHitsFetchSubPhase.class).asEagerSingleton();
+ }
+}
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java
new file mode 100644
index 00000000000..f43ed68d769
--- /dev/null
+++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.elasticsearch.search.fetch;
+
+import org.elasticsearch.common.xcontent.XContentParser;
+import org.elasticsearch.search.SearchParseElement;
+import org.elasticsearch.search.internal.SearchContext;
+
+/**
+ * A parse element for a {@link org.elasticsearch.search.fetch.FetchSubPhase} that is used when parsing a search request.
+ */
+public abstract class FetchSubPhaseParseElement implements SearchParseElement {
+
+ @Override
+ final public void parse(XContentParser parser, SearchContext context) throws Exception {
+ SubPhaseContext fetchSubPhaseContext = context.getFetchSubPhaseContext(getContextFactory());
+ // this is to make sure that the SubFetchPhase knows it should execute
+ fetchSubPhaseContext.setHitExecutionNeeded(true);
+ innerParse(parser, fetchSubPhaseContext, context);
+ }
+
+ /**
+ * Implement the actual parsing here.
+ */
+ protected abstract void innerParse(XContentParser parser, SubPhaseContext fetchSubPhaseContext, SearchContext searchContext) throws Exception;
+
+ /**
+ * Return the ContextFactory for this FetchSubPhase.
+ */
+ protected abstract FetchSubPhase.ContextFactory getContextFactory();
+}
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsContext.java b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsContext.java
index aebed3956a0..9f1bfc08ed7 100644
--- a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsContext.java
+++ b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsContext.java
@@ -19,13 +19,14 @@
package org.elasticsearch.search.fetch.fielddata;
import com.google.common.collect.Lists;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import java.util.List;
/**
* All the required context to pull a field from the field data cache.
*/
-public class FieldDataFieldsContext {
+public class FieldDataFieldsContext extends FetchSubPhaseContext {
public static class FieldDataField {
private final String name;
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsFetchSubPhase.java b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsFetchSubPhase.java
index 7d8bb51e94b..1ec0a98b1fa 100644
--- a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsFetchSubPhase.java
+++ b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsFetchSubPhase.java
@@ -27,6 +27,7 @@ import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.search.SearchHitField;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.internal.InternalSearchHit;
import org.elasticsearch.search.internal.InternalSearchHitField;
import org.elasticsearch.search.internal.SearchContext;
@@ -43,6 +44,20 @@ import java.util.Map;
*/
public class FieldDataFieldsFetchSubPhase implements FetchSubPhase {
+ public static final String[] NAMES = {"fielddata_fields", "fielddataFields"};
+ public static final ContextFactory CONTEXT_FACTORY = new ContextFactory() {
+
+ @Override
+ public String getName() {
+ return NAMES[0];
+ }
+
+ @Override
+ public FieldDataFieldsContext newContextInstance() {
+ return new FieldDataFieldsContext();
+ }
+ };
+
@Inject
public FieldDataFieldsFetchSubPhase() {
}
@@ -66,12 +81,12 @@ public class FieldDataFieldsFetchSubPhase implements FetchSubPhase {
@Override
public boolean hitExecutionNeeded(SearchContext context) {
- return context.hasFieldDataFields();
+ return context.getFetchSubPhaseContext(CONTEXT_FACTORY).hitExecutionNeeded();
}
@Override
public void hitExecute(SearchContext context, HitContext hitContext) {
- for (FieldDataFieldsContext.FieldDataField field : context.fieldDataFields().fields()) {
+ for (FieldDataFieldsContext.FieldDataField field : context.getFetchSubPhaseContext(CONTEXT_FACTORY).fields()) {
if (hitContext.hit().fieldsOrNull() == null) {
hitContext.hit().fields(new HashMap(2));
}
diff --git a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java
index 3c45148cdfa..cd5cb7d323d 100644
--- a/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java
+++ b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsParseElement.java
@@ -20,12 +20,15 @@ package org.elasticsearch.search.fetch.fielddata;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.search.SearchParseElement;
+import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
+import org.elasticsearch.search.fetch.FetchSubPhaseParseElement;
import org.elasticsearch.search.internal.SearchContext;
/**
* Parses field name values from the {@code fielddata_fields} parameter in a
* search request.
- *
+ *
*
* {
* "query": {...},
@@ -33,20 +36,26 @@ import org.elasticsearch.search.internal.SearchContext;
* }
*
*/
-public class FieldDataFieldsParseElement implements SearchParseElement {
+public class FieldDataFieldsParseElement extends FetchSubPhaseParseElement {
+
@Override
- public void parse(XContentParser parser, SearchContext context) throws Exception {
+ protected void innerParse(XContentParser parser, FieldDataFieldsContext fieldDataFieldsContext, SearchContext searchContext) throws Exception {
XContentParser.Token token = parser.currentToken();
if (token == XContentParser.Token.START_ARRAY) {
while (parser.nextToken() != XContentParser.Token.END_ARRAY) {
String fieldName = parser.text();
- context.fieldDataFields().add(new FieldDataFieldsContext.FieldDataField(fieldName));
+ fieldDataFieldsContext.add(new FieldDataFieldsContext.FieldDataField(fieldName));
}
} else if (token == XContentParser.Token.VALUE_STRING) {
String fieldName = parser.text();
- context.fieldDataFields().add(new FieldDataFieldsContext.FieldDataField(fieldName));
- } else {
+ fieldDataFieldsContext.add(new FieldDataFieldsContext.FieldDataField(fieldName));
+ } else {
throw new IllegalStateException("Expected either a VALUE_STRING or an START_ARRAY but got " + token);
}
}
+
+ @Override
+ protected FetchSubPhase.ContextFactory getContextFactory() {
+ return FieldDataFieldsFetchSubPhase.CONTEXT_FACTORY;
+ }
}
diff --git a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java
index d564a6c06c1..f420986272d 100644
--- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java
+++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java
@@ -53,7 +53,8 @@ import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.dfs.DfsSearchResult;
import org.elasticsearch.search.fetch.FetchSearchResult;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
+import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -99,7 +100,6 @@ public class DefaultSearchContext extends SearchContext {
private boolean explain;
private boolean version = false; // by default, we don't return versions
private List fieldNames;
- private FieldDataFieldsContext fieldDataFields;
private ScriptFieldsContext scriptFields;
private FetchSourceContext fetchSourceContext;
private int from = -1;
@@ -126,11 +126,13 @@ public class DefaultSearchContext extends SearchContext {
private volatile long lastAccessTime = -1;
private InnerHitsContext innerHitsContext;
+ private final Map subPhaseContexts = new HashMap<>();
+
public DefaultSearchContext(long id, ShardSearchRequest request, SearchShardTarget shardTarget,
- Engine.Searcher engineSearcher, IndexService indexService, IndexShard indexShard,
- ScriptService scriptService, PageCacheRecycler pageCacheRecycler,
- BigArrays bigArrays, Counter timeEstimateCounter, ParseFieldMatcher parseFieldMatcher,
- TimeValue timeout
+ Engine.Searcher engineSearcher, IndexService indexService, IndexShard indexShard,
+ ScriptService scriptService, PageCacheRecycler pageCacheRecycler,
+ BigArrays bigArrays, Counter timeEstimateCounter, ParseFieldMatcher parseFieldMatcher,
+ TimeValue timeout
) {
super(parseFieldMatcher);
this.id = id;
@@ -302,6 +304,16 @@ public class DefaultSearchContext extends SearchContext {
return this;
}
+ @Override
+ public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) {
+ String subPhaseName = contextFactory.getName();
+ if (subPhaseContexts.get(subPhaseName) == null) {
+ subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance());
+ }
+ return (SubPhaseContext) subPhaseContexts.get(subPhaseName);
+ }
+
+
@Override
public SearchContextHighlight highlight() {
return highlight;
@@ -338,19 +350,6 @@ public class DefaultSearchContext extends SearchContext {
this.rescore.add(rescore);
}
- @Override
- public boolean hasFieldDataFields() {
- return fieldDataFields != null;
- }
-
- @Override
- public FieldDataFieldsContext fieldDataFields() {
- if (fieldDataFields == null) {
- fieldDataFields = new FieldDataFieldsContext();
- }
- return this.fieldDataFields;
- }
-
@Override
public boolean hasScriptFields() {
return scriptFields != null;
diff --git a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java
index b4308c93215..c22842e7093 100644
--- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java
+++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java
@@ -45,7 +45,8 @@ import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.dfs.DfsSearchResult;
import org.elasticsearch.search.fetch.FetchSearchResult;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
+import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -209,16 +210,6 @@ public abstract class FilteredSearchContext extends SearchContext {
in.addRescore(rescore);
}
- @Override
- public boolean hasFieldDataFields() {
- return in.hasFieldDataFields();
- }
-
- @Override
- public FieldDataFieldsContext fieldDataFields() {
- return in.fieldDataFields();
- }
-
@Override
public boolean hasScriptFields() {
return in.hasScriptFields();
@@ -628,4 +619,9 @@ public abstract class FilteredSearchContext extends SearchContext {
public void copyContextAndHeadersFrom(HasContextAndHeaders other) {
in.copyContextAndHeadersFrom(other);
}
+
+ @Override
+ public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) {
+ return in.getFetchSubPhaseContext(contextFactory);
+ }
}
diff --git a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java
index b7030954930..901b721c3b5 100644
--- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java
+++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java
@@ -50,7 +50,8 @@ import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.dfs.DfsSearchResult;
import org.elasticsearch.search.fetch.FetchSearchResult;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
+import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -163,6 +164,8 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders
public abstract SearchContext aggregations(SearchContextAggregations aggregations);
+ public abstract SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory);
+
public abstract SearchContextHighlight highlight();
public abstract void highlight(SearchContextHighlight highlight);
@@ -182,10 +185,6 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders
public abstract void addRescore(RescoreSearchContext rescore);
- public abstract boolean hasFieldDataFields();
-
- public abstract FieldDataFieldsContext fieldDataFields();
-
public abstract boolean hasScriptFields();
public abstract ScriptFieldsContext scriptFields();
diff --git a/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java b/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java
index f1162a98e86..be445c99e88 100644
--- a/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java
+++ b/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java
@@ -30,7 +30,6 @@ import org.elasticsearch.index.query.ParsedQuery;
import org.elasticsearch.search.Scroll;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.fetch.FetchSearchResult;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -62,7 +61,6 @@ public class SubSearchContext extends FilteredSearchContext {
private int docsIdsToLoadSize;
private List fieldNames;
- private FieldDataFieldsContext fieldDataFields;
private ScriptFieldsContext scriptFields;
private FetchSourceContext fetchSourceContext;
private SearchContextHighlight highlight;
@@ -132,19 +130,6 @@ public class SubSearchContext extends FilteredSearchContext {
throw new UnsupportedOperationException("Not supported");
}
- @Override
- public boolean hasFieldDataFields() {
- return fieldDataFields != null;
- }
-
- @Override
- public FieldDataFieldsContext fieldDataFields() {
- if (fieldDataFields == null) {
- fieldDataFields = new FieldDataFieldsContext();
- }
- return this.fieldDataFields;
- }
-
@Override
public boolean hasScriptFields() {
return scriptFields != null;
diff --git a/core/src/test/java/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilterTests.java b/core/src/test/java/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilterTests.java
index 9f95ec6147d..6a563afc002 100644
--- a/core/src/test/java/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilterTests.java
+++ b/core/src/test/java/org/apache/lucene/analysis/miscellaneous/TruncateTokenFilterTests.java
@@ -24,7 +24,7 @@ import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class TruncateTokenFilterTests extends ElasticsearchTestCase {
+public class TruncateTokenFilterTests extends ESTestCase {
@Test
public void simpleTest() throws IOException {
diff --git a/core/src/test/java/org/apache/lucene/analysis/miscellaneous/UniqueTokenFilterTests.java b/core/src/test/java/org/apache/lucene/analysis/miscellaneous/UniqueTokenFilterTests.java
index e8c074be477..25c4a688fe0 100644
--- a/core/src/test/java/org/apache/lucene/analysis/miscellaneous/UniqueTokenFilterTests.java
+++ b/core/src/test/java/org/apache/lucene/analysis/miscellaneous/UniqueTokenFilterTests.java
@@ -24,7 +24,7 @@ import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class UniqueTokenFilterTests extends ElasticsearchTestCase {
+public class UniqueTokenFilterTests extends ESTestCase {
@Test
public void simpleTest() throws IOException {
diff --git a/core/src/test/java/org/apache/lucene/queries/BlendedTermQueryTest.java b/core/src/test/java/org/apache/lucene/queries/BlendedTermQueryTest.java
index 634026a5df7..74eb4babc6c 100644
--- a/core/src/test/java/org/apache/lucene/queries/BlendedTermQueryTest.java
+++ b/core/src/test/java/org/apache/lucene/queries/BlendedTermQueryTest.java
@@ -41,7 +41,7 @@ import org.apache.lucene.search.similarities.DefaultSimilarity;
import org.apache.lucene.search.similarities.Similarity;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.TestUtil;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class BlendedTermQueryTest extends ElasticsearchTestCase {
+public class BlendedTermQueryTest extends ESTestCase {
@Test
public void testBooleanQuery() throws IOException {
diff --git a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPassageFormatterTests.java b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPassageFormatterTests.java
index 23995029259..ef7a9ac31e8 100644
--- a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPassageFormatterTests.java
+++ b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPassageFormatterTests.java
@@ -21,7 +21,7 @@ package org.apache.lucene.search.postingshighlight;
import org.apache.lucene.search.highlight.DefaultEncoder;
import org.apache.lucene.search.highlight.SimpleHTMLEncoder;
import org.apache.lucene.util.BytesRef;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -29,7 +29,7 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-public class CustomPassageFormatterTests extends ElasticsearchTestCase {
+public class CustomPassageFormatterTests extends ESTestCase {
@Test
public void testSimpleFormat() {
diff --git a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPostingsHighlighterTests.java b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPostingsHighlighterTests.java
index 8d04caae60c..450382c1ff1 100644
--- a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPostingsHighlighterTests.java
+++ b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomPostingsHighlighterTests.java
@@ -28,12 +28,12 @@ import org.apache.lucene.search.*;
import org.apache.lucene.search.highlight.DefaultEncoder;
import org.apache.lucene.store.Directory;
import org.elasticsearch.search.highlight.HighlightUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.equalTo;
-public class CustomPostingsHighlighterTests extends ElasticsearchTestCase {
+public class CustomPostingsHighlighterTests extends ESTestCase {
@Test
public void testCustomPostingsHighlighter() throws Exception {
diff --git a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomSeparatorBreakIteratorTests.java b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomSeparatorBreakIteratorTests.java
index 0df6add5371..3b63f765f3c 100644
--- a/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomSeparatorBreakIteratorTests.java
+++ b/core/src/test/java/org/apache/lucene/search/postingshighlight/CustomSeparatorBreakIteratorTests.java
@@ -20,7 +20,7 @@ under the License.
package org.apache.lucene.search.postingshighlight;
import org.elasticsearch.search.highlight.HighlightUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.text.BreakIterator;
@@ -30,7 +30,7 @@ import java.util.Locale;
import static org.hamcrest.CoreMatchers.equalTo;
-public class CustomSeparatorBreakIteratorTests extends ElasticsearchTestCase {
+public class CustomSeparatorBreakIteratorTests extends ESTestCase {
@Test
public void testBreakOnCustomSeparator() throws Exception {
diff --git a/core/src/test/java/org/apache/lucene/util/SloppyMathTests.java b/core/src/test/java/org/apache/lucene/util/SloppyMathTests.java
index 61a74b49e02..f7d43fd1305 100644
--- a/core/src/test/java/org/apache/lucene/util/SloppyMathTests.java
+++ b/core/src/test/java/org/apache/lucene/util/SloppyMathTests.java
@@ -21,12 +21,12 @@ package org.apache.lucene.util;
import org.elasticsearch.common.geo.GeoDistance;
import org.elasticsearch.common.unit.DistanceUnit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.number.IsCloseTo.closeTo;
-public class SloppyMathTests extends ElasticsearchTestCase {
+public class SloppyMathTests extends ESTestCase {
@Test
public void testAccuracy() {
diff --git a/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java b/core/src/test/java/org/elasticsearch/ESExceptionTests.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java
rename to core/src/test/java/org/elasticsearch/ESExceptionTests.java
index b9995e83bef..a4a6d28847a 100644
--- a/core/src/test/java/org/elasticsearch/ElasticsearchExceptionTests.java
+++ b/core/src/test/java/org/elasticsearch/ESExceptionTests.java
@@ -40,7 +40,7 @@ import org.elasticsearch.index.query.TestQueryParsingException;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchParseException;
import org.elasticsearch.search.SearchShardTarget;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.elasticsearch.test.VersionUtils;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
@@ -55,7 +55,7 @@ import java.nio.file.NoSuchFileException;
import static org.hamcrest.Matchers.equalTo;
-public class ElasticsearchExceptionTests extends ElasticsearchTestCase {
+public class ESExceptionTests extends ESTestCase {
@Test
public void testStatus() {
diff --git a/core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java b/core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java
index 32c0382e4c4..69d83b7bde7 100644
--- a/core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java
+++ b/core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java
@@ -62,7 +62,7 @@ import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.internal.SearchContext;
import org.elasticsearch.search.warmer.IndexWarmerMissingException;
import org.elasticsearch.snapshots.SnapshotException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.elasticsearch.test.VersionUtils;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
@@ -81,7 +81,7 @@ import java.nio.file.attribute.BasicFileAttributes;
import java.util.HashSet;
import java.util.Set;
-public class ExceptionSerializationTests extends ElasticsearchTestCase {
+public class ExceptionSerializationTests extends ESTestCase {
public void testExceptionRegistration()
throws ClassNotFoundException, IOException, URISyntaxException {
diff --git a/core/src/test/java/org/elasticsearch/NamingConventionTests.java b/core/src/test/java/org/elasticsearch/NamingConventionTests.java
index 11a87671433..071cd256e44 100644
--- a/core/src/test/java/org/elasticsearch/NamingConventionTests.java
+++ b/core/src/test/java/org/elasticsearch/NamingConventionTests.java
@@ -24,10 +24,11 @@ import com.google.common.collect.Sets;
import junit.framework.TestCase;
import org.apache.lucene.util.LuceneTestCase;
+import org.elasticsearch.common.SuppressForbidden;
import org.elasticsearch.common.io.PathUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
-import org.elasticsearch.test.ElasticsearchTestCase;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Ignore;
import org.junit.Test;
@@ -41,9 +42,9 @@ import java.util.HashSet;
import java.util.Set;
/**
- * Simple class that ensures that all subclasses concrete of ElasticsearchTestCase end with either Test | Tests
+ * Simple class that ensures that all subclasses concrete of ESTestCase end with either Test | Tests
*/
-public class NamingConventionTests extends ElasticsearchTestCase {
+public class NamingConventionTests extends ESTestCase {
// see https://github.com/elasticsearch/elasticsearch/issues/9945
public void testNamingConventions()
@@ -51,6 +52,7 @@ public class NamingConventionTests extends ElasticsearchTestCase {
final Set notImplementing = new HashSet<>();
final Set pureUnitTest = new HashSet<>();
final Set missingSuffix = new HashSet<>();
+ final Set integTestsInDisguise = new HashSet<>();
String[] packages = {"org.elasticsearch", "org.apache.lucene"};
for (final String packageName : packages) {
final String path = "/" + packageName.replace('.', '/');
@@ -76,12 +78,19 @@ public class NamingConventionTests extends ElasticsearchTestCase {
Class> clazz = loadClass(filename);
if (Modifier.isAbstract(clazz.getModifiers()) == false && Modifier.isInterface(clazz.getModifiers()) == false) {
if (clazz.getName().endsWith("Tests") ||
- clazz.getName().endsWith("IT") ||
clazz.getName().endsWith("Test")) { // don't worry about the ones that match the pattern
+ if (ESIntegTestCase.class.isAssignableFrom(clazz)) {
+ integTestsInDisguise.add(clazz);
+ }
if (isTestCase(clazz) == false) {
notImplementing.add(clazz);
}
+ } else if (clazz.getName().endsWith("IT")) {
+ if (isTestCase(clazz) == false) {
+ notImplementing.add(clazz);
+ }
+ // otherwise fine
} else if (isTestCase(clazz)) {
missingSuffix.add(clazz);
} else if (junit.framework.Test.class.isAssignableFrom(clazz) || hasTestAnnotation(clazz)) {
@@ -107,7 +116,7 @@ public class NamingConventionTests extends ElasticsearchTestCase {
}
private boolean isTestCase(Class> clazz) {
- return ElasticsearchTestCase.class.isAssignableFrom(clazz) || ElasticsearchTestCase.class.isAssignableFrom(clazz) || ElasticsearchTokenStreamTestCase.class.isAssignableFrom(clazz) || LuceneTestCase.class.isAssignableFrom(clazz);
+ return LuceneTestCase.class.isAssignableFrom(clazz);
}
private Class> loadClass(String filename) throws ClassNotFoundException {
@@ -140,31 +149,34 @@ public class NamingConventionTests extends ElasticsearchTestCase {
assertTrue(pureUnitTest.remove(PlainUnitTheSecond.class));
String classesToSubclass = Joiner.on(',').join(
- ElasticsearchTestCase.class.getSimpleName(),
- ElasticsearchTestCase.class.getSimpleName(),
- ElasticsearchTokenStreamTestCase.class.getSimpleName(),
+ ESTestCase.class.getSimpleName(),
+ ESTestCase.class.getSimpleName(),
+ ESTokenStreamTestCase.class.getSimpleName(),
LuceneTestCase.class.getSimpleName());
- assertTrue("Not all subclasses of " + ElasticsearchTestCase.class.getSimpleName() +
+ assertTrue("Not all subclasses of " + ESTestCase.class.getSimpleName() +
" match the naming convention. Concrete classes must end with [Test|Tests]: " + missingSuffix.toString(),
missingSuffix.isEmpty());
assertTrue("Pure Unit-Test found must subclass one of [" + classesToSubclass +"] " + pureUnitTest.toString(),
pureUnitTest.isEmpty());
assertTrue("Classes ending with Test|Tests] must subclass [" + classesToSubclass +"] " + notImplementing.toString(),
notImplementing.isEmpty());
+ assertTrue("Subclasses of ESIntegTestCase should end with IT as they are integration tests: " + integTestsInDisguise, integTestsInDisguise.isEmpty());
}
/*
* Some test the test classes
*/
+ @SuppressForbidden(reason = "Ignoring test the tester")
@Ignore
public static final class NotImplementingTests {}
+ @SuppressForbidden(reason = "Ignoring test the tester")
@Ignore
public static final class NotImplementingTest {}
- public static final class WrongName extends ElasticsearchTestCase {}
+ public static final class WrongName extends ESTestCase {}
- public static final class WrongNameTheSecond extends ElasticsearchTestCase {}
+ public static final class WrongNameTheSecond extends ESTestCase {}
public static final class PlainUnit extends TestCase {}
diff --git a/core/src/test/java/org/elasticsearch/VersionTests.java b/core/src/test/java/org/elasticsearch/VersionTests.java
index fbb9d1a2c05..4161578a5a6 100644
--- a/core/src/test/java/org/elasticsearch/VersionTests.java
+++ b/core/src/test/java/org/elasticsearch/VersionTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
-public class VersionTests extends ElasticsearchTestCase {
+public class VersionTests extends ESTestCase {
public void testMavenVersion() {
// maven sets this property to ensure that the latest version
diff --git a/core/src/test/java/org/elasticsearch/action/IndicesRequestTests.java b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/action/IndicesRequestTests.java
rename to core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
index 97f0975b40e..1b956656093 100644
--- a/core/src/test/java/org/elasticsearch/action/IndicesRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.action;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.admin.indices.alias.Alias;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeAction;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest;
@@ -92,9 +91,9 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.action.SearchServiceTransportAction;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.Transport;
import org.elasticsearch.transport.TransportChannel;
@@ -123,8 +122,7 @@ import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.instanceOf;
@ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2)
-@Slow
-public class IndicesRequestTests extends ElasticsearchIntegrationTest {
+public class IndicesRequestIT extends ESIntegTestCase {
private final List indices = new ArrayList<>();
diff --git a/core/src/test/java/org/elasticsearch/action/ListenerActionTests.java b/core/src/test/java/org/elasticsearch/action/ListenerActionIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/action/ListenerActionTests.java
rename to core/src/test/java/org/elasticsearch/action/ListenerActionIT.java
index 50cde99fcdb..7d52c6c77ca 100644
--- a/core/src/test/java/org/elasticsearch/action/ListenerActionTests.java
+++ b/core/src/test/java/org/elasticsearch/action/ListenerActionIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicReference;
/**
*/
-public class ListenerActionTests extends ElasticsearchIntegrationTest {
+public class ListenerActionIT extends ESIntegTestCase {
@Test
public void verifyThreadedListeners() throws Throwable {
diff --git a/core/src/test/java/org/elasticsearch/action/OriginalIndicesTests.java b/core/src/test/java/org/elasticsearch/action/OriginalIndicesTests.java
index 83411fcd40e..becdb933867 100644
--- a/core/src/test/java/org/elasticsearch/action/OriginalIndicesTests.java
+++ b/core/src/test/java/org/elasticsearch/action/OriginalIndicesTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.action;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -30,7 +30,7 @@ import java.io.IOException;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
-public class OriginalIndicesTests extends ElasticsearchTestCase {
+public class OriginalIndicesTests extends ESTestCase {
private static final IndicesOptions[] indicesOptionsValues = new IndicesOptions[]{
IndicesOptions.lenientExpandOpen() , IndicesOptions.strictExpand(), IndicesOptions.strictExpandOpen(),
diff --git a/core/src/test/java/org/elasticsearch/action/RejectionActionTests.java b/core/src/test/java/org/elasticsearch/action/RejectionActionIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/action/RejectionActionTests.java
rename to core/src/test/java/org/elasticsearch/action/RejectionActionIT.java
index 273caa52296..ff094e09a4c 100644
--- a/core/src/test/java/org/elasticsearch/action/RejectionActionTests.java
+++ b/core/src/test/java/org/elasticsearch/action/RejectionActionIT.java
@@ -28,8 +28,8 @@ import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Locale;
@@ -40,8 +40,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 2)
-public class RejectionActionTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 2)
+public class RejectionActionIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java
rename to core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java
index 4b3ad487495..8d88be38e8d 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java
@@ -18,13 +18,12 @@
*/
package org.elasticsearch.action.admin;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.cluster.node.hotthreads.NodeHotThreads;
import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsRequestBuilder;
import org.elasticsearch.action.admin.cluster.node.hotthreads.NodesHotThreadsResponse;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Map;
@@ -32,15 +31,17 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicBoolean;
-import static org.elasticsearch.index.query.QueryBuilders.*;
+import static org.elasticsearch.index.query.QueryBuilders.andQuery;
+import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
+import static org.elasticsearch.index.query.QueryBuilders.notQuery;
+import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
-import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.lessThan;
-/**
- */
-@Slow
-public class HotThreadsTest extends ElasticsearchIntegrationTest {
+public class HotThreadsIT extends ESIntegTestCase {
@Test
public void testHotThreadsDontFail() throws ExecutionException, InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java
index 0fa72040da9..caa88ddfb78 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java
@@ -23,8 +23,8 @@ import org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRe
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -37,8 +37,8 @@ import static org.hamcrest.Matchers.hasSize;
*
* The @ClusterScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only".
*/
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class RepositoryBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class RepositoryBlocksIT extends ESIntegTestCase {
@Test
public void testPutRepositoryWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java
index 2f755cdf334..2516310c7a3 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java
@@ -20,7 +20,6 @@ package org.elasticsearch.action.admin.cluster.snapshots;
import org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse;
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
-import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse;
@@ -28,8 +27,8 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Before;
import org.junit.Test;
@@ -45,8 +44,8 @@ import static org.hamcrest.Matchers.hasSize;
*
* The @ClusterScope TEST is needed because this class updates the cluster setting "cluster.blocks.read_only".
*/
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class SnapshotBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class SnapshotBlocksIT extends ESIntegTestCase {
protected static final String INDEX_NAME = "test-blocks-1";
protected static final String OTHER_INDEX_NAME = "test-blocks-2";
diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestTest.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestTest.java
index dd66049adfc..1b5a4ef41bc 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestTest.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestTest.java
@@ -23,7 +23,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
@@ -32,7 +32,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
/**
* Unit tests for the {@link ClusterStateRequest}.
*/
-public class ClusterStateRequestTest extends ElasticsearchTestCase {
+public class ClusterStateRequestTest extends ESTestCase {
@Test
public void testSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java
index 13c0ffa7cc1..2be808ebef8 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java
@@ -26,20 +26,20 @@ import org.elasticsearch.client.Requests;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.store.Store;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.hamcrest.Matchers;
import org.junit.Test;
import java.io.IOException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.is;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1, numClientNodes = 0)
-public class ClusterStatsTests extends ElasticsearchIntegrationTest {
+public class ClusterStatsIT extends ESIntegTestCase {
private void assertCounts(ClusterStatsNodes.Counts counts, int total, int masterOnly, int dataOnly, int masterData, int client) {
assertThat(counts.getTotal(), Matchers.equalTo(total));
diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java
similarity index 88%
rename from core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java
index 004f2c85daf..a02860e8a8f 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java
@@ -19,16 +19,16 @@
package org.elasticsearch.action.admin.cluster.tasks;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class PendingTasksBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class PendingTasksBlocksIT extends ESIntegTestCase {
@Test
public void testPendingTasksWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java
index aad405a3955..deb57cfa241 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.indices.cache.clear;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -30,8 +30,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.equalTo;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class ClearIndicesCacheBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class ClearIndicesCacheBlocksIT extends ESIntegTestCase {
@Test
public void testClearIndicesCacheWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java
index 5b020f2ab39..ed2b503c37d 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java
@@ -25,9 +25,9 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.util.HashMap;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
import static org.hamcrest.core.IsNull.notNullValue;
@ClusterScope(scope = Scope.TEST)
-public class CreateIndexTests extends ElasticsearchIntegrationTest{
+public class CreateIndexIT extends ESIntegTestCase {
@Test
public void testCreationDate_Given() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilderTest.java b/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilderTest.java
index 31576c38d06..2fff8357fd3 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilderTest.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilderTest.java
@@ -19,12 +19,11 @@
package org.elasticsearch.action.admin.indices.create;
-import org.elasticsearch.action.index.IndexRequestBuilderTest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.rest.NoOpClient;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -34,7 +33,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-public class CreateIndexRequestBuilderTest extends ElasticsearchTestCase {
+public class CreateIndexRequestBuilderTest extends ESTestCase {
private static final String KEY = "my.settings.key";
private static final String VALUE = "my.settings.value";
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java
similarity index 82%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java
index 6973f63a227..85e0072bfe3 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java
@@ -19,14 +19,14 @@
package org.elasticsearch.action.admin.indices.delete;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class DeleteIndexBlocksTests extends ElasticsearchIntegrationTest{
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class DeleteIndexBlocksIT extends ESIntegTestCase {
@Test
public void testDeleteIndexWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java
index b9fa6bcd8b5..cf03bf798d5 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.indices.flush;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -30,8 +30,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.equalTo;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class FlushBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class FlushBlocksIT extends ESIntegTestCase {
@Test
public void testFlushWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java
index e8d24c774ee..ce214dd5a9d 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java
@@ -20,7 +20,6 @@
package org.elasticsearch.action.admin.indices.get;
import com.google.common.collect.ImmutableList;
-import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.admin.indices.alias.Alias;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest.Feature;
import org.elasticsearch.cluster.metadata.AliasMetaData;
@@ -29,7 +28,7 @@ import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.search.warmer.IndexWarmersMetaData.Entry;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -41,8 +40,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.*;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GetIndexTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GetIndexIT extends ESIntegTestCase {
private static final String[] allFeatures = { "_alias", "_aliases", "_mapping", "_mappings", "_settings", "_warmer", "_warmers" };
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestTests.java
index f5c73082bcd..967a9026469 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestTests.java
@@ -20,9 +20,9 @@
package org.elasticsearch.action.admin.indices.mapping.put;
import org.elasticsearch.action.ActionRequestValidationException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
-public class PutMappingRequestTests extends ElasticsearchTestCase {
+public class PutMappingRequestTests extends ESTestCase {
public void testValidation() {
PutMappingRequest r = new PutMappingRequest("myindex");
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksIT.java
index 47b5fbe0da8..06c19564c3e 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksIT.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.indices.optimize;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -30,8 +30,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.equalTo;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class OptimizeBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class OptimizeBlocksIT extends ESIntegTestCase {
@Test
public void testOptimizeWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java
index fc83f96eb3c..65c37c686b7 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java
@@ -20,8 +20,8 @@
package org.elasticsearch.action.admin.indices.refresh;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -31,8 +31,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.equalTo;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class RefreshBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class RefreshBlocksIT extends ESIntegTestCase {
@Test
public void testRefreshWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java
index a3f2f9f1044..fcb7a509d5c 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java
@@ -19,8 +19,8 @@
package org.elasticsearch.action.admin.indices.segments;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -29,8 +29,8 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class IndicesSegmentsBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class IndicesSegmentsBlocksIT extends ESIntegTestCase {
@Test
public void testIndicesSegmentsWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java
index df9fbda67cc..9db47f6ab37 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.action.admin.indices.segments;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.engine.Segment;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
-public class IndicesSegmentsRequestTests extends ElasticsearchSingleNodeTest {
+public class IndicesSegmentsRequestTests extends ESSingleNodeTestCase {
@Before
public void setupIndex() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java
index 4189455e783..396e442b804 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java
@@ -24,7 +24,6 @@ import com.carrotsearch.hppc.cursors.IntObjectCursor;
import com.carrotsearch.hppc.cursors.ObjectCursor;
import com.google.common.base.Predicate;
import org.apache.lucene.index.CorruptIndexException;
-import org.elasticsearch.action.admin.indices.shards.IndicesShardStoresResponse;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.client.Requests;
import org.elasticsearch.cluster.ClusterState;
@@ -36,7 +35,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.junit.Test;
@@ -48,8 +47,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
import static org.hamcrest.Matchers.*;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class IndicesShardStoreRequestTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class IndicesShardStoreRequestIT extends ESIntegTestCase {
@Test
public void testEmpty() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreResponseTest.java b/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreResponseTest.java
index 41372759da8..12b61e2c2a5 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreResponseTest.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreResponseTest.java
@@ -20,17 +20,15 @@
package org.elasticsearch.action.admin.indices.shards;
import com.google.common.collect.ImmutableList;
-import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.util.CollectionUtil;
import org.elasticsearch.Version;
-import org.elasticsearch.action.admin.indices.shards.IndicesShardStoresResponse;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.collect.ImmutableOpenIntMap;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.common.xcontent.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.transport.NodeDisconnectedException;
import org.junit.Test;
@@ -39,7 +37,7 @@ import java.util.*;
import static org.hamcrest.Matchers.equalTo;
-public class IndicesShardStoreResponseTest extends ElasticsearchTestCase {
+public class IndicesShardStoreResponseTest extends ESTestCase {
@Test
public void testBasicSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksTests.java
rename to core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java
index d6dba10e696..125c4e46021 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java
@@ -21,16 +21,16 @@ package org.elasticsearch.action.admin.indices.stats;
import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class IndicesStatsBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class IndicesStatsBlocksIT extends ESIntegTestCase {
@Test
public void testIndicesStatsWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsTests.java
index a8c40a8ce4e..8539c6cb8ec 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsTests.java
@@ -24,12 +24,12 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.engine.CommitStats;
import org.elasticsearch.index.engine.SegmentsStats;
import org.elasticsearch.index.translog.Translog;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class IndicesStatsTests extends ElasticsearchSingleNodeTest {
+public class IndicesStatsTests extends ESSingleNodeTestCase {
public void testSegmentStatsEmptyIndex() {
createIndex("test");
diff --git a/core/src/test/java/org/elasticsearch/action/admin/indices/warmer/put/PutWarmerRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/indices/warmer/put/PutWarmerRequestTests.java
index 67ed2bee126..1a17a4c78ac 100644
--- a/core/src/test/java/org/elasticsearch/action/admin/indices/warmer/put/PutWarmerRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/admin/indices/warmer/put/PutWarmerRequestTests.java
@@ -19,13 +19,13 @@
package org.elasticsearch.action.admin.indices.warmer.put;
import org.elasticsearch.action.ActionRequestValidationException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.Matchers.hasSize;
-public class PutWarmerRequestTests extends ElasticsearchTestCase {
+public class PutWarmerRequestTests extends ESTestCase {
@Test // issue 4196
public void testThatValidationWithoutSpecifyingSearchRequestFails() {
diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationTests.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java
index ea25cfb767f..fe5c0821330 100644
--- a/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java
@@ -23,12 +23,12 @@ package org.elasticsearch.action.bulk;
import com.google.common.base.Charsets;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.io.Streams.copyToStringFromClasspath;
-public class BulkIntegrationTests extends ElasticsearchIntegrationTest {
+public class BulkIntegrationIT extends ESIntegTestCase {
@Test
public void testBulkIndexCreatesMapping() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsTests.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java
similarity index 88%
rename from core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsTests.java
rename to core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java
index d450d2399cf..b26a10f100e 100644
--- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java
@@ -20,13 +20,13 @@
package org.elasticsearch.action.bulk;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class BulkProcessorClusterSettingsTests extends ElasticsearchIntegrationTest {
+public class BulkProcessorClusterSettingsIT extends ESIntegTestCase {
@Test
public void testBulkProcessorAutoCreateRestrictions() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorTests.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorTests.java
rename to core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java
index 358ffb820f9..dd39f85338b 100644
--- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorTests.java
+++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class BulkProcessorTests extends ElasticsearchIntegrationTest {
+public class BulkProcessorIT extends ESIntegTestCase {
@Test
public void testThatBulkProcessorCountIsCorrect() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
index 6220958a0c6..61361d48fb0 100644
--- a/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkRequestTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.client.Requests;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.script.Script;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.notNullValue;
-public class BulkRequestTests extends ElasticsearchTestCase {
+public class BulkRequestTests extends ESTestCase {
@Test
public void testSimpleBulk1() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/count/CountRequestBuilderTests.java b/core/src/test/java/org/elasticsearch/action/count/CountRequestBuilderTests.java
index 98ab1632e2c..5d77247d38a 100644
--- a/core/src/test/java/org/elasticsearch/action/count/CountRequestBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/action/count/CountRequestBuilderTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -39,7 +39,7 @@ import java.io.IOException;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.equalTo;
-public class CountRequestBuilderTests extends ElasticsearchTestCase {
+public class CountRequestBuilderTests extends ESTestCase {
private static Client client;
diff --git a/core/src/test/java/org/elasticsearch/action/count/CountRequestTests.java b/core/src/test/java/org/elasticsearch/action/count/CountRequestTests.java
index a972ff56d12..407cfbaec91 100644
--- a/core/src/test/java/org/elasticsearch/action/count/CountRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/count/CountRequestTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.support.QuerySourceBuilder;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -34,7 +34,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
-public class CountRequestTests extends ElasticsearchTestCase {
+public class CountRequestTests extends ESTestCase {
@Test
public void testToSearchRequest() {
diff --git a/core/src/test/java/org/elasticsearch/action/count/CountResponseTests.java b/core/src/test/java/org/elasticsearch/action/count/CountResponseTests.java
index bbe6c64edf3..11fd191c780 100644
--- a/core/src/test/java/org/elasticsearch/action/count/CountResponseTests.java
+++ b/core/src/test/java/org/elasticsearch/action/count/CountResponseTests.java
@@ -24,12 +24,12 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.search.internal.InternalSearchHits;
import org.elasticsearch.search.internal.InternalSearchResponse;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.equalTo;
-public class CountResponseTests extends ElasticsearchTestCase {
+public class CountResponseTests extends ESTestCase {
@Test
public void testFromSearchResponse() {
diff --git a/core/src/test/java/org/elasticsearch/action/fieldstats/FieldStatsRequestTest.java b/core/src/test/java/org/elasticsearch/action/fieldstats/FieldStatsRequestTest.java
index e8521c7d502..e2c98ce65a6 100644
--- a/core/src/test/java/org/elasticsearch/action/fieldstats/FieldStatsRequestTest.java
+++ b/core/src/test/java/org/elasticsearch/action/fieldstats/FieldStatsRequestTest.java
@@ -21,14 +21,14 @@ package org.elasticsearch.action.fieldstats;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.Streams;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import static org.elasticsearch.action.fieldstats.IndexConstraint.Comparison.*;
import static org.elasticsearch.action.fieldstats.IndexConstraint.Property.MAX;
import static org.elasticsearch.action.fieldstats.IndexConstraint.Property.MIN;
import static org.hamcrest.Matchers.equalTo;
-public class FieldStatsRequestTest extends ElasticsearchTestCase {
+public class FieldStatsRequestTest extends ESTestCase {
public void testFieldsParsing() throws Exception {
byte[] data = Streams.copyToBytesFromClasspath("/org/elasticsearch/action/fieldstats/fieldstats-index-constraints-request.json");
diff --git a/core/src/test/java/org/elasticsearch/action/get/MultiGetShardRequestTests.java b/core/src/test/java/org/elasticsearch/action/get/MultiGetShardRequestTests.java
index 073d2596636..c48f65be4b8 100644
--- a/core/src/test/java/org/elasticsearch/action/get/MultiGetShardRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/get/MultiGetShardRequestTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.index.VersionType;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -31,7 +31,7 @@ import java.io.IOException;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
-public class MultiGetShardRequestTests extends ElasticsearchTestCase {
+public class MultiGetShardRequestTests extends ESTestCase {
@Test
public void testSerialization() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/action/index/IndexRequestBuilderTest.java b/core/src/test/java/org/elasticsearch/action/index/IndexRequestBuilderTest.java
index 478e12051d6..8e3b8b2a575 100644
--- a/core/src/test/java/org/elasticsearch/action/index/IndexRequestBuilderTest.java
+++ b/core/src/test/java/org/elasticsearch/action/index/IndexRequestBuilderTest.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.rest.NoOpClient;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -33,7 +33,7 @@ import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Map;
-public class IndexRequestBuilderTest extends ElasticsearchTestCase {
+public class IndexRequestBuilderTest extends ESTestCase {
private static final String EXPECTED_SOURCE = "{\"SomeKey\":\"SomeValue\"}";
private NoOpClient testClient;
diff --git a/core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java b/core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
index a8aead541c7..1cdea965424 100644
--- a/core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
@@ -18,13 +18,13 @@
*/
package org.elasticsearch.action.index;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class IndexRequestTests extends ElasticsearchTestCase {
+public class IndexRequestTests extends ESTestCase {
@Test
public void testIndexRequestOpTypeFromString() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/indexedscripts/get/GetIndexedScriptRequestTests.java b/core/src/test/java/org/elasticsearch/action/indexedscripts/get/GetIndexedScriptRequestTests.java
index 3ff5cf93922..ea1d3ba8d92 100644
--- a/core/src/test/java/org/elasticsearch/action/indexedscripts/get/GetIndexedScriptRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/indexedscripts/get/GetIndexedScriptRequestTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.action.indexedscripts.get;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.index.VersionType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -30,7 +30,7 @@ import java.io.IOException;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
-public class GetIndexedScriptRequestTests extends ElasticsearchTestCase {
+public class GetIndexedScriptRequestTests extends ESTestCase {
@Test
public void testGetIndexedScriptRequestSerialization() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/action/percolate/MultiPercolatorRequestTests.java b/core/src/test/java/org/elasticsearch/action/percolate/MultiPercolatorRequestTests.java
index 50f915bfe67..2f2a0728c67 100644
--- a/core/src/test/java/org/elasticsearch/action/percolate/MultiPercolatorRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/percolate/MultiPercolatorRequestTests.java
@@ -22,7 +22,7 @@ import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class MultiPercolatorRequestTests extends ElasticsearchTestCase {
+public class MultiPercolatorRequestTests extends ESTestCase {
@Test
public void testParseBulkRequests() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java b/core/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
index 538a8d452e9..05f7d522346 100644
--- a/core/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/search/MultiSearchRequestTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-public class MultiSearchRequestTests extends ElasticsearchTestCase {
+public class MultiSearchRequestTests extends ESTestCase {
@Test
public void simpleAdd() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/search/SearchRequestBuilderTests.java b/core/src/test/java/org/elasticsearch/action/search/SearchRequestBuilderTests.java
index 900c2787804..3c2bada2241 100644
--- a/core/src/test/java/org/elasticsearch/action/search/SearchRequestBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/action/search/SearchRequestBuilderTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -38,7 +38,7 @@ import java.io.IOException;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.equalTo;
-public class SearchRequestBuilderTests extends ElasticsearchTestCase {
+public class SearchRequestBuilderTests extends ESTestCase {
private static Client client;
diff --git a/core/src/test/java/org/elasticsearch/action/support/IndicesOptionsTests.java b/core/src/test/java/org/elasticsearch/action/support/IndicesOptionsTests.java
index 13657fb06da..c681a6107c3 100644
--- a/core/src/test/java/org/elasticsearch/action/support/IndicesOptionsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/support/IndicesOptionsTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.action.support;
import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
-public class IndicesOptionsTests extends ElasticsearchTestCase {
+public class IndicesOptionsTests extends ESTestCase {
@Test
public void testSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/support/ListenableActionFutureTests.java b/core/src/test/java/org/elasticsearch/action/support/ListenableActionFutureTests.java
index 2c97caf6e8c..a6c21ca3d66 100644
--- a/core/src/test/java/org/elasticsearch/action/support/ListenableActionFutureTests.java
+++ b/core/src/test/java/org/elasticsearch/action/support/ListenableActionFutureTests.java
@@ -20,7 +20,7 @@ package org.elasticsearch.action.support;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.Transports;
@@ -28,7 +28,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
-public class ListenableActionFutureTests extends ElasticsearchTestCase {
+public class ListenableActionFutureTests extends ESTestCase {
public void testListenerIsCallableFromNetworkThreads() throws Throwable {
ThreadPool threadPool = new ThreadPool("testListenerIsCallableFromNetworkThreads");
diff --git a/core/src/test/java/org/elasticsearch/action/support/TransportActionFilterChainTests.java b/core/src/test/java/org/elasticsearch/action/support/TransportActionFilterChainTests.java
index 2295f549fbe..41fb1d919b0 100644
--- a/core/src/test/java/org/elasticsearch/action/support/TransportActionFilterChainTests.java
+++ b/core/src/test/java/org/elasticsearch/action/support/TransportActionFilterChainTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +39,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.CoreMatchers.*;
-public class TransportActionFilterChainTests extends ElasticsearchTestCase {
+public class TransportActionFilterChainTests extends ESTestCase {
private AtomicInteger counter;
diff --git a/core/src/test/java/org/elasticsearch/action/support/replication/ShardReplicationTests.java b/core/src/test/java/org/elasticsearch/action/support/replication/ShardReplicationTests.java
index 5cfeceb3bd8..d08840b0771 100644
--- a/core/src/test/java/org/elasticsearch/action/support/replication/ShardReplicationTests.java
+++ b/core/src/test/java/org/elasticsearch/action/support/replication/ShardReplicationTests.java
@@ -54,7 +54,7 @@ import org.elasticsearch.index.shard.IndexShardNotStartedException;
import org.elasticsearch.index.shard.IndexShardState;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cluster.TestClusterService;
import org.elasticsearch.test.transport.CapturingTransport;
import org.elasticsearch.threadpool.ThreadPool;
@@ -80,7 +80,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.hamcrest.Matchers.*;
-public class ShardReplicationTests extends ElasticsearchTestCase {
+public class ShardReplicationTests extends ESTestCase {
private static ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.java b/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTestCase.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.java
rename to core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTestCase.java
index 06b21bbaabc..62f4dc77060 100644
--- a/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTestCase.java
@@ -40,8 +40,7 @@ import org.elasticsearch.action.admin.indices.alias.Alias;
import org.elasticsearch.common.inject.internal.Join;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.index.*;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import java.util.*;
@@ -50,7 +49,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-public abstract class AbstractTermVectorsTests extends ElasticsearchIntegrationTest {
+public abstract class AbstractTermVectorsTestCase extends ESIntegTestCase {
protected static class TestFieldSetting {
final public String name;
diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqTests.java b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqTests.java
rename to core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java
index 7021885b2d2..0e1c978dda8 100644
--- a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqTests.java
+++ b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -38,7 +38,7 @@ import java.io.IOException;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-public class GetTermVectorsCheckDocFreqTests extends ElasticsearchIntegrationTest {
+public class GetTermVectorsCheckDocFreqIT extends ESIntegTestCase {
@Override
protected int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsTests.java b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsTests.java
rename to core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java
index a78c8b6e7a1..47031b828b3 100644
--- a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java
@@ -20,12 +20,14 @@
package org.elasticsearch.action.termvectors;
import com.carrotsearch.hppc.ObjectIntHashMap;
-
import org.apache.lucene.analysis.payloads.PayloadHelper;
import org.apache.lucene.document.FieldType;
-import org.apache.lucene.index.*;
+import org.apache.lucene.index.DirectoryReader;
+import org.apache.lucene.index.Fields;
+import org.apache.lucene.index.PostingsEnum;
+import org.apache.lucene.index.Terms;
+import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.admin.indices.alias.Alias;
@@ -42,17 +44,25 @@ import org.hamcrest.Matcher;
import org.junit.Test;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThrows;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.lessThan;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
-@Slow
-public class GetTermVectorsTests extends AbstractTermVectorsTests {
+public class GetTermVectorsIT extends AbstractTermVectorsTestCase {
@Test
public void testNoSuchDoc() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsTests.java b/core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsTests.java
rename to core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java
index 2fdd8df3541..89f34b9e05a 100644
--- a/core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsTests.java
+++ b/core/src/test/java/org/elasticsearch/action/termvectors/MultiTermVectorsIT.java
@@ -33,20 +33,20 @@ import java.io.IOException;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class MultiTermVectorsTests extends AbstractTermVectorsTests {
+public class MultiTermVectorsIT extends AbstractTermVectorsTestCase {
@Test
public void testDuelESLucene() throws Exception {
- AbstractTermVectorsTests.TestFieldSetting[] testFieldSettings = getFieldSettings();
+ AbstractTermVectorsTestCase.TestFieldSetting[] testFieldSettings = getFieldSettings();
createIndexBasedOnFieldSettings("test", "alias", testFieldSettings);
//we generate as many docs as many shards we have
TestDoc[] testDocs = generateTestDocs("test", testFieldSettings);
DirectoryReader directoryReader = indexDocsWithLucene(testDocs);
- AbstractTermVectorsTests.TestConfig[] testConfigs = generateTestConfigs(20, testDocs, testFieldSettings);
+ AbstractTermVectorsTestCase.TestConfig[] testConfigs = generateTestConfigs(20, testDocs, testFieldSettings);
MultiTermVectorsRequestBuilder requestBuilder = client().prepareMultiTermVectors();
- for (AbstractTermVectorsTests.TestConfig test : testConfigs) {
+ for (AbstractTermVectorsTestCase.TestConfig test : testConfigs) {
requestBuilder.add(getRequestForConfig(test).request());
}
diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java b/core/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
index d48473d8507..13d923a7901 100644
--- a/core/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/action/termvectors/TermVectorsUnitTests.java
@@ -42,7 +42,7 @@ import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.core.TypeParsers;
import org.elasticsearch.index.mapper.internal.AllFieldMapper;
import org.elasticsearch.rest.action.termvectors.RestTermVectorsAction;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -56,7 +56,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.equalTo;
-public class TermVectorsUnitTests extends ElasticsearchTestCase {
+public class TermVectorsUnitTests extends ESTestCase {
@Test
public void streamResponse() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/action/update/UpdateRequestTests.java b/core/src/test/java/org/elasticsearch/action/update/UpdateRequestTests.java
index e127ec81511..6be5fe95fd2 100644
--- a/core/src/test/java/org/elasticsearch/action/update/UpdateRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/action/update/UpdateRequestTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.index.get.GetResult;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService.ScriptType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
-public class UpdateRequestTests extends ElasticsearchTestCase {
+public class UpdateRequestTests extends ESTestCase {
@Test
public void testUpdateRequest() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java
rename to core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java
index 7c0b1e8371c..80f4c45455b 100644
--- a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java
+++ b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.aliases;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.admin.indices.alias.Alias;
@@ -46,7 +45,7 @@ import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -58,18 +57,31 @@ import java.util.concurrent.TimeUnit;
import static com.google.common.collect.Sets.newHashSet;
import static org.elasticsearch.client.Requests.createIndexRequest;
import static org.elasticsearch.client.Requests.indexRequest;
-import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.INDEX_METADATA_BLOCK;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.INDEX_READ_ONLY_BLOCK;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_BLOCKS_METADATA;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_BLOCKS_READ;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_BLOCKS_WRITE;
+import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_READ_ONLY;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.index.query.QueryBuilders.*;
+import static org.elasticsearch.index.query.QueryBuilders.hasChildQuery;
+import static org.elasticsearch.index.query.QueryBuilders.hasParentQuery;
+import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
+import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
+import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.test.hamcrest.CollectionAssertions.hasKey;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
-import static org.hamcrest.Matchers.*;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.lessThan;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
-/**
- *
- */
-@Slow
-public class IndexAliasesTests extends ElasticsearchIntegrationTest {
+public class IndexAliasesIT extends ESIntegTestCase {
@Test
public void testAliases() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/benchmark/cluster/ClusterAllocationRerouteBenchmark.java b/core/src/test/java/org/elasticsearch/benchmark/cluster/ClusterAllocationRerouteBenchmark.java
index bcb21573171..ef7afbe8edf 100644
--- a/core/src/test/java/org/elasticsearch/benchmark/cluster/ClusterAllocationRerouteBenchmark.java
+++ b/core/src/test/java/org/elasticsearch/benchmark/cluster/ClusterAllocationRerouteBenchmark.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import java.util.Random;
@@ -48,9 +48,9 @@ public class ClusterAllocationRerouteBenchmark {
final int numReplicas = 2;
final int numberOfNodes = 30;
final int numberOfTags = 2;
- AllocationService strategy = ElasticsearchAllocationTestCase.createAllocationService(Settings.builder()
- .put("cluster.routing.allocation.awareness.attributes", "tag")
- .build(), new Random(1));
+ AllocationService strategy = ESAllocationTestCase.createAllocationService(Settings.builder()
+ .put("cluster.routing.allocation.awareness.attributes", "tag")
+ .build(), new Random(1));
MetaData.Builder mb = MetaData.builder();
for (int i = 1; i <= numIndices; i++) {
@@ -64,7 +64,7 @@ public class ClusterAllocationRerouteBenchmark {
RoutingTable routingTable = rb.build();
DiscoveryNodes.Builder nb = DiscoveryNodes.builder();
for (int i = 1; i <= numberOfNodes; i++) {
- nb.put(ElasticsearchAllocationTestCase.newNode("node" + i, numberOfTags == 0 ? ImmutableMap.of() : ImmutableMap.of("tag", "tag_" + (i % numberOfTags))));
+ nb.put(ESAllocationTestCase.newNode("node" + i, numberOfTags == 0 ? ImmutableMap.of() : ImmutableMap.of("tag", "tag_" + (i % numberOfTags))));
}
ClusterState initialClusterState = ClusterState.builder(ClusterName.DEFAULT).metaData(metaData).routingTable(routingTable).nodes(nb).build();
diff --git a/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java b/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java
rename to core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java
index b70ba625414..d256c6a2c98 100644
--- a/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -35,8 +35,8 @@ import java.util.HashMap;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class SimpleBlocksTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class SimpleBlocksIT extends ESIntegTestCase {
@Test
public void verifyIndexAndClusterReadOnly() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/bootstrap/JNANativesTests.java b/core/src/test/java/org/elasticsearch/bootstrap/JNANativesTests.java
index ead01b38cd8..8497f91cdca 100644
--- a/core/src/test/java/org/elasticsearch/bootstrap/JNANativesTests.java
+++ b/core/src/test/java/org/elasticsearch/bootstrap/JNANativesTests.java
@@ -20,12 +20,12 @@
package org.elasticsearch.bootstrap;
import org.apache.lucene.util.Constants;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class JNANativesTests extends ElasticsearchTestCase {
+public class JNANativesTests extends ESTestCase {
@Test
public void testMlockall() {
diff --git a/core/src/test/java/org/elasticsearch/bootstrap/JarHellTests.java b/core/src/test/java/org/elasticsearch/bootstrap/JarHellTests.java
index 819cb1f51e4..50c68eba281 100644
--- a/core/src/test/java/org/elasticsearch/bootstrap/JarHellTests.java
+++ b/core/src/test/java/org/elasticsearch/bootstrap/JarHellTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.bootstrap;
import org.elasticsearch.Version;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.net.URL;
@@ -33,7 +33,7 @@ import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
-public class JarHellTests extends ElasticsearchTestCase {
+public class JarHellTests extends ESTestCase {
URL makeJar(Path dir, String name, Manifest manifest, String... files) throws IOException {
Path jarpath = dir.resolve(name);
diff --git a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java
index 3c3db267292..664b677fe7f 100644
--- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java
+++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java
@@ -20,17 +20,20 @@
package org.elasticsearch.bootstrap;
import org.apache.lucene.util.Constants;
+import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.FilePermission;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.security.PermissionCollection;
import java.security.Permissions;
+import java.util.Set;
-public class SecurityTests extends ElasticsearchTestCase {
+public class SecurityTests extends ESTestCase {
/** test generated permissions */
public void testGeneratedPermissions() throws Exception {
@@ -53,26 +56,28 @@ public class SecurityTests extends ElasticsearchTestCase {
}
// the fake es home
- assertTrue(permissions.implies(new FilePermission(esHome.toString(), "read")));
+ assertNoPermissions(esHome, permissions);
// its parent
- assertFalse(permissions.implies(new FilePermission(path.toString(), "read")));
+ assertNoPermissions(esHome.getParent(), permissions);
// some other sibling
- assertFalse(permissions.implies(new FilePermission(path.resolve("other").toString(), "read")));
+ assertNoPermissions(esHome.getParent().resolve("other"), permissions);
// double check we overwrote java.io.tmpdir correctly for the test
- assertFalse(permissions.implies(new FilePermission(realTmpDir.toString(), "read")));
+ assertNoPermissions(PathUtils.get(realTmpDir), permissions);
}
/** test generated permissions for all configured paths */
public void testEnvironmentPaths() throws Exception {
Path path = createTempDir();
+ // make a fake ES home and ensure we only grant permissions to that.
+ Path esHome = path.resolve("esHome");
Settings.Builder settingsBuilder = Settings.builder();
- settingsBuilder.put("path.home", path.resolve("home").toString());
- settingsBuilder.put("path.conf", path.resolve("conf").toString());
- settingsBuilder.put("path.plugins", path.resolve("plugins").toString());
- settingsBuilder.putArray("path.data", path.resolve("data1").toString(), path.resolve("data2").toString());
- settingsBuilder.put("path.logs", path.resolve("logs").toString());
- settingsBuilder.put("pidfile", path.resolve("test.pid").toString());
+ settingsBuilder.put("path.home", esHome.resolve("home").toString());
+ settingsBuilder.put("path.conf", esHome.resolve("conf").toString());
+ settingsBuilder.put("path.plugins", esHome.resolve("plugins").toString());
+ settingsBuilder.putArray("path.data", esHome.resolve("data1").toString(), esHome.resolve("data2").toString());
+ settingsBuilder.put("path.logs", esHome.resolve("logs").toString());
+ settingsBuilder.put("pidfile", esHome.resolve("test.pid").toString());
Settings settings = settingsBuilder.build();
Path fakeTmpDir = createTempDir();
@@ -87,30 +92,39 @@ public class SecurityTests extends ElasticsearchTestCase {
System.setProperty("java.io.tmpdir", realTmpDir);
}
+ // the fake es home
+ assertNoPermissions(esHome, permissions);
+ // its parent
+ assertNoPermissions(esHome.getParent(), permissions);
+ // some other sibling
+ assertNoPermissions(esHome.getParent().resolve("other"), permissions);
+ // double check we overwrote java.io.tmpdir correctly for the test
+ assertNoPermissions(PathUtils.get(realTmpDir), permissions);
+
// check that all directories got permissions:
- // homefile: this is needed unless we break out rules for "lib" dir.
- // TODO: make read-only
- assertTrue(permissions.implies(new FilePermission(environment.homeFile().toString(), "read,readlink,write,delete")));
- // config file
- // TODO: make read-only
- assertTrue(permissions.implies(new FilePermission(environment.configFile().toString(), "read,readlink,write,delete")));
- // plugins: r/w, TODO: can this be minimized?
- assertTrue(permissions.implies(new FilePermission(environment.pluginsFile().toString(), "read,readlink,write,delete")));
+
+ // bin file: ro
+ assertExactPermissions(new FilePermission(environment.binFile().toString(), "read,readlink"), permissions);
+ // lib file: ro
+ assertExactPermissions(new FilePermission(environment.libFile().toString(), "read,readlink"), permissions);
+ // config file: ro
+ assertExactPermissions(new FilePermission(environment.configFile().toString(), "read,readlink"), permissions);
+ // plugins: ro
+ assertExactPermissions(new FilePermission(environment.pluginsFile().toString(), "read,readlink"), permissions);
+
// data paths: r/w
for (Path dataPath : environment.dataFiles()) {
- assertTrue(permissions.implies(new FilePermission(dataPath.toString(), "read,readlink,write,delete")));
+ assertExactPermissions(new FilePermission(dataPath.toString(), "read,readlink,write,delete"), permissions);
}
for (Path dataPath : environment.dataWithClusterFiles()) {
- assertTrue(permissions.implies(new FilePermission(dataPath.toString(), "read,readlink,write,delete")));
+ assertExactPermissions(new FilePermission(dataPath.toString(), "read,readlink,write,delete"), permissions);
}
// logs: r/w
- assertTrue(permissions.implies(new FilePermission(environment.logsFile().toString(), "read,readlink,write,delete")));
+ assertExactPermissions(new FilePermission(environment.logsFile().toString(), "read,readlink,write,delete"), permissions);
// temp dir: r/w
- assertTrue(permissions.implies(new FilePermission(fakeTmpDir.toString(), "read,readlink,write,delete")));
- // double check we overwrote java.io.tmpdir correctly for the test
- assertFalse(permissions.implies(new FilePermission(realTmpDir.toString(), "read")));
- // PID file: r/w
- assertTrue(permissions.implies(new FilePermission(environment.pidFile().toString(), "read,readlink,write,delete")));
+ assertExactPermissions(new FilePermission(fakeTmpDir.toString(), "read,readlink,write,delete"), permissions);
+ // PID file: delete only (for the shutdown hook)
+ assertExactPermissions(new FilePermission(environment.pidFile().toString(), "delete"), permissions);
}
public void testEnsureExists() throws IOException {
@@ -226,9 +240,40 @@ public class SecurityTests extends ElasticsearchTestCase {
}
Permissions permissions = new Permissions();
Security.addPath(permissions, link, "read");
- assertTrue(permissions.implies(new FilePermission(link.toString(), "read")));
- assertTrue(permissions.implies(new FilePermission(link.resolve("foo").toString(), "read")));
- assertTrue(permissions.implies(new FilePermission(target.toString(), "read")));
- assertTrue(permissions.implies(new FilePermission(target.resolve("foo").toString(), "read")));
+ assertExactPermissions(new FilePermission(link.toString(), "read"), permissions);
+ assertExactPermissions(new FilePermission(link.resolve("foo").toString(), "read"), permissions);
+ assertExactPermissions(new FilePermission(target.toString(), "read"), permissions);
+ assertExactPermissions(new FilePermission(target.resolve("foo").toString(), "read"), permissions);
+ }
+
+ /**
+ * checks exact file permissions, meaning those and only those for that path.
+ */
+ static void assertExactPermissions(FilePermission expected, PermissionCollection actual) {
+ String target = expected.getName(); // see javadocs
+ Set permissionSet = asSet(expected.getActions().split(","));
+ boolean read = permissionSet.remove("read");
+ boolean readlink = permissionSet.remove("readlink");
+ boolean write = permissionSet.remove("write");
+ boolean delete = permissionSet.remove("delete");
+ boolean execute = permissionSet.remove("execute");
+ assertTrue("unrecognized permission: " + permissionSet, permissionSet.isEmpty());
+ assertEquals(read, actual.implies(new FilePermission(target, "read")));
+ assertEquals(readlink, actual.implies(new FilePermission(target, "readlink")));
+ assertEquals(write, actual.implies(new FilePermission(target, "write")));
+ assertEquals(delete, actual.implies(new FilePermission(target, "delete")));
+ assertEquals(execute, actual.implies(new FilePermission(target, "execute")));
+ }
+
+ /**
+ * checks that this path has no permissions
+ */
+ static void assertNoPermissions(Path path, PermissionCollection actual) {
+ String target = path.toString();
+ assertFalse(actual.implies(new FilePermission(target, "read")));
+ assertFalse(actual.implies(new FilePermission(target, "readlink")));
+ assertFalse(actual.implies(new FilePermission(target, "write")));
+ assertFalse(actual.implies(new FilePermission(target, "delete")));
+ assertFalse(actual.implies(new FilePermission(target, "execute")));
}
}
diff --git a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java b/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java
rename to core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java
index baaa5045be7..4196a8dde8f 100644
--- a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java
+++ b/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.count.CountResponse;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-public class BroadcastActionsTests extends ElasticsearchIntegrationTest {
+public class BroadcastActionsIT extends ESIntegTestCase {
@Override
protected int maximumNumberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java
index aac1e3c73d1..aec57c57816 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java
@@ -24,8 +24,8 @@ import org.apache.lucene.util.TestUtil;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.elasticsearch.indices.analysis.PreBuiltAnalyzers;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -38,8 +38,8 @@ import java.util.regex.Pattern;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
-public class BasicAnalysisBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
+@ESIntegTestCase.ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
+public class BasicAnalysisBackwardCompatibilityIT extends ESBackcompatTestCase {
// This pattern match characters with Line_Break = Complex_Content.
final static Pattern complexUnicodeChars = Pattern.compile("[\u17B4\u17B5\u17D3\u17CB-\u17D1\u17DD\u1036\u17C6\u1A74\u1038\u17C7\u0E4E\u0E47-\u0E4D\u0EC8-\u0ECD\uAABF\uAAC1\u1037\u17C8-\u17CA\u1A75-\u1A7C\u1AA8-\u1AAB\uAADE\uAADF\u1AA0-\u1AA6\u1AAC\u1AAD\u109E\u109F\uAA77-\uAA79\u0E46\u0EC6\u17D7\u1AA7\uA9E6\uAA70\uAADD\u19DA\u0E01-\u0E3A\u0E40-\u0E45\u0EDE\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0EDF\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAB\u0EDC\u0EDD\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\uAA80-\uAABE\uAAC0\uAAC2\uAADB\uAADC\u1000\u1075\u1001\u1076\u1002\u1077\uAA60\uA9E9\u1003\uA9E0\uA9EA\u1004\u105A\u1005\u1078\uAA61\u1006\uA9E1\uAA62\uAA7E\u1007\uAA63\uA9EB\u1079\uAA72\u1008\u105B\uA9E2\uAA64\uA9EC\u1061\uAA7F\u1009\u107A\uAA65\uA9E7\u100A\u100B\uAA66\u100C\uAA67\u100D\uAA68\uA9ED\u100E\uAA69\uA9EE\u100F\u106E\uA9E3\uA9EF\u1010-\u1012\u107B\uA9FB\u1013\uAA6A\uA9FC\u1014\u107C\uAA6B\u105E\u1015\u1016\u107D\u107E\uAA6F\u108E\uA9E8\u1017\u107F\uA9FD\u1018\uA9E4\uA9FE\u1019\u105F\u101A\u103B\u101B\uAA73\uAA7A\u103C\u101C\u1060\u101D\u103D\u1082\u1080\u1050\u1051\u1065\u101E\u103F\uAA6C\u101F\u1081\uAA6D\u103E\uAA6E\uAA71\u1020\uA9FA\u105C\u105D\u106F\u1070\u1066\u1021-\u1026\u1052-\u1055\u1027-\u102A\u102C\u102B\u1083\u1072\u109C\u102D\u1071\u102E\u1033\u102F\u1073\u1074\u1030\u1056-\u1059\u1031\u1084\u1035\u1085\u1032\u109D\u1034\u1062\u1067\u1068\uA9E5\u1086\u1039\u103A\u1063\u1064\u1069-\u106D\u1087\u108B\u1088\u108C\u108D\u1089\u108A\u108F\u109A\u109B\uAA7B-\uAA7D\uAA74-\uAA76\u1780-\u17A2\u17DC\u17A3-\u17B3\u17B6-\u17C5\u17D2\u1950-\u196D\u1970-\u1974\u1980-\u199C\u19DE\u19DF\u199D-\u19AB\u19B0-\u19C9\u1A20-\u1A26\u1A58\u1A59\u1A27-\u1A3B\u1A5A\u1A5B\u1A3C-\u1A46\u1A54\u1A47-\u1A4C\u1A53\u1A6B\u1A55-\u1A57\u1A5C-\u1A5E\u1A4D-\u1A52\u1A61\u1A6C\u1A62-\u1A6A\u1A6E\u1A6F\u1A73\u1A70-\u1A72\u1A6D\u1A60]");
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java
rename to core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java
index 8315ffa32da..8faccc5c885 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java
@@ -46,7 +46,6 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.routing.IndexRoutingTable;
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
import org.elasticsearch.cluster.routing.ShardRouting;
-import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.regex.Regex;
import org.elasticsearch.common.settings.Settings;
@@ -59,7 +58,7 @@ import org.elasticsearch.index.mapper.internal.FieldNamesFieldMapper;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -76,7 +75,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
+public class BasicBackwardsCompatibilityIT extends ESBackcompatTestCase {
/**
* Basic test using Index & Realtime Get with external versioning. This test ensures routing works correctly across versions.
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatTests.java b/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java
index ba208eb739e..1fe1dbb0637 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.block.ClusterBlocks;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -38,7 +38,7 @@ import java.util.Map;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.hamcrest.Matchers.equalTo;
-public class ClusterStateBackwardsCompatTests extends ElasticsearchBackwardsCompatIntegrationTest {
+public class ClusterStateBackwardsCompatIT extends ESBackcompatTestCase {
@Test
public void testClusterState() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java
index 5da2c1ff96c..d26d0491095 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.warmer.IndexWarmersMetaData.Entry;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class GetIndexBackwardsCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
+public class GetIndexBackwardsCompatibilityIT extends ESBackcompatTestCase {
@Test
public void testGetAliases() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatTests.java b/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java
index 5220b6c7cc8..8cb9fc7566b 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java
@@ -25,15 +25,15 @@ import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequestBuilde
import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.lang.reflect.Method;
-@ElasticsearchIntegrationTest.ClusterScope(scope= ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0)
-public class NodesStatsBasicBackwardsCompatTests extends ElasticsearchBackwardsCompatIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE, numClientNodes = 0)
+public class NodesStatsBasicBackwardsCompatIT extends ESBackcompatTestCase {
@Test
public void testNodeStatsSetIndices() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java
index 76d44642e41..c2ba057f9e9 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java
@@ -24,7 +24,6 @@ import com.google.common.util.concurrent.ListenableFuture;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
-import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.indices.get.GetIndexResponse;
import org.elasticsearch.action.get.GetResponse;
@@ -43,13 +42,13 @@ import org.elasticsearch.index.engine.EngineConfig;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.indices.recovery.RecoverySettings;
-import org.elasticsearch.rest.action.admin.indices.upgrade.UpgradeTest;
+import org.elasticsearch.rest.action.admin.indices.upgrade.UpgradeIT;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.VersionUtils;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.hamcrest.Matchers;
@@ -59,9 +58,19 @@ import org.junit.Test;
import java.io.IOException;
import java.io.InputStream;
-import java.nio.file.*;
+import java.nio.file.DirectoryStream;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
@@ -69,10 +78,9 @@ import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
// needs at least 2 nodes since it bumps replicas to 1
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
@LuceneTestCase.SuppressFileSystems("ExtrasFS")
-@LuceneTestCase.Slow
-public class OldIndexBackwardsCompatibilityTests extends ElasticsearchIntegrationTest {
+public class OldIndexBackwardsCompatibilityIT extends ESIntegTestCase {
// TODO: test for proper exception on unsupported indexes (maybe via separate test?)
// We have a 0.20.6.zip etc for this.
@@ -436,10 +444,10 @@ public class OldIndexBackwardsCompatibilityTests extends ElasticsearchIntegratio
void assertUpgradeWorks(String indexName, boolean alreadyLatest) throws Exception {
if (alreadyLatest == false) {
- UpgradeTest.assertNotUpgraded(client(), indexName);
+ UpgradeIT.assertNotUpgraded(client(), indexName);
}
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).get());
- UpgradeTest.assertUpgraded(client(), indexName);
+ UpgradeIT.assertUpgraded(client(), indexName);
}
}
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesTests.java b/core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java
index d27b361b16d..d598ba9e9a0 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/RecoveryWithUnsupportedIndicesIT.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import static org.hamcrest.Matchers.containsString;
-public class RecoveryWithUnsupportedIndicesTests extends StaticIndexBackwardCompatibilityTest {
+public class RecoveryWithUnsupportedIndicesIT extends StaticIndexBackwardCompatibilityIT {
@Test
public void testUpgradeStartClusterOn_0_20_6() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java
rename to core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java
index a0d3dc4e10a..2130ea57267 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java
@@ -18,7 +18,6 @@
*/
package org.elasticsearch.bwcompat;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
@@ -29,12 +28,12 @@ import org.elasticsearch.cluster.metadata.IndexTemplateMetaData;
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.snapshots.AbstractSnapshotTests;
+import org.elasticsearch.snapshots.AbstractSnapshotIntegTestCase;
import org.elasticsearch.snapshots.RestoreInfo;
import org.elasticsearch.snapshots.SnapshotInfo;
import org.elasticsearch.snapshots.SnapshotRestoreException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.io.IOException;
@@ -52,11 +51,13 @@ import java.util.TreeSet;
import static com.google.common.collect.Lists.newArrayList;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.notNullValue;
-@Slow
@ClusterScope(scope = Scope.TEST)
-public class RestoreBackwardsCompatTests extends AbstractSnapshotTests {
+public class RestoreBackwardsCompatIT extends AbstractSnapshotIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java b/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java
similarity index 87%
rename from core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java
rename to core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java
index 2fcd9572a65..37961c3d353 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java
@@ -23,7 +23,7 @@ import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.indices.get.GetIndexResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@@ -32,8 +32,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
* a full cluster restart (ie no wire format compatibility).
*/
@LuceneTestCase.SuppressCodecs("*")
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
-public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
+public class StaticIndexBackwardCompatibilityIT extends ESIntegTestCase {
public void loadIndex(String index, Object... settings) throws Exception {
logger.info("Checking static index " + index);
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityTest.java b/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityTest.java
rename to core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java
index 11e01b2c1eb..e071c17b948 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityTest.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.test.CompositeTestCluster;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.util.concurrent.ExecutionException;
@@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
import static org.hamcrest.CoreMatchers.equalTo;
-public class TransportClientBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
+public class TransportClientBackwardsCompatibilityIT extends ESBackcompatTestCase {
@Test
public void testSniffMode() throws ExecutionException, InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java b/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java
rename to core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java
index d8019a64c65..f90eae446d5 100644
--- a/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java
+++ b/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java
@@ -21,12 +21,12 @@ package org.elasticsearch.bwcompat;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class UnicastBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
+public class UnicastBackwardsCompatibilityIT extends ESBackcompatTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/client/AbstractClientHeadersTests.java b/core/src/test/java/org/elasticsearch/client/AbstractClientHeadersTests.java
index b68ba8441ee..ab4c35f16bc 100644
--- a/core/src/test/java/org/elasticsearch/client/AbstractClientHeadersTests.java
+++ b/core/src/test/java/org/elasticsearch/client/AbstractClientHeadersTests.java
@@ -49,7 +49,7 @@ import org.elasticsearch.action.search.SearchAction;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.support.Headers;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportMessage;
import org.junit.After;
@@ -64,7 +64,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public abstract class AbstractClientHeadersTests extends ElasticsearchTestCase {
+public abstract class AbstractClientHeadersTests extends ESTestCase {
protected static final Settings HEADER_SETTINGS = Settings.builder()
.put(Headers.PREFIX + ".key1", "val1")
diff --git a/core/src/test/java/org/elasticsearch/client/node/NodeClientTests.java b/core/src/test/java/org/elasticsearch/client/node/NodeClientIT.java
similarity index 84%
rename from core/src/test/java/org/elasticsearch/client/node/NodeClientTests.java
rename to core/src/test/java/org/elasticsearch/client/node/NodeClientIT.java
index 265b9184a2c..499998096b1 100644
--- a/core/src/test/java/org/elasticsearch/client/node/NodeClientTests.java
+++ b/core/src/test/java/org/elasticsearch/client/node/NodeClientIT.java
@@ -20,19 +20,19 @@ package org.elasticsearch.client.node;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.is;
/**
*
*/
@ClusterScope(scope = Scope.SUITE)
-public class NodeClientTests extends ElasticsearchIntegrationTest {
+public class NodeClientIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java
rename to core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java
index 70f96f2ede0..144d79db35b 100644
--- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java
+++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java
@@ -26,21 +26,21 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.transport.TransportService;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 1.0)
-public class TransportClientTests extends ElasticsearchIntegrationTest {
+public class TransportClientIT extends ESIntegTestCase {
@Test
public void testPickingUpChangesInDiscoveryNode() {
diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java
index 6d1b95198f5..ae107b9496b 100644
--- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.LocalTransportAddress;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.*;
import org.junit.Test;
@@ -41,7 +41,7 @@ import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.notNullValue;
-public class TransportClientNodesServiceTests extends ElasticsearchTestCase {
+public class TransportClientNodesServiceTests extends ESTestCase {
private static class TestIteration implements Closeable {
private final ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryTests.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryTests.java
rename to core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java
index 6557b810293..307cc0dbe16 100644
--- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryTests.java
+++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java
@@ -29,8 +29,7 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.transport.TransportService;
@@ -40,14 +39,14 @@ import java.io.IOException;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
@ClusterScope(scope = Scope.TEST, numClientNodes = 0)
@TestLogging("discovery.zen:TRACE")
-public class TransportClientRetryTests extends ElasticsearchIntegrationTest {
+public class TransportClientRetryIT extends ESIntegTestCase {
@Test
public void testRetry() throws IOException, ExecutionException, InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/ClusterHealthTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java
index 658da8bde36..f34f693af95 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java
@@ -22,12 +22,12 @@ package org.elasticsearch.cluster;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.common.Priority;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class ClusterHealthTests extends ElasticsearchIntegrationTest {
+public class ClusterHealthIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthResponsesTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthResponsesTests.java
index 36c63c0d3ea..50d7bc99102 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthResponsesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthResponsesTests.java
@@ -35,7 +35,7 @@ import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -45,7 +45,7 @@ import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.*;
-public class ClusterHealthResponsesTests extends ElasticsearchTestCase {
+public class ClusterHealthResponsesTests extends ESTestCase {
private final IndexNameExpressionResolver indexNameExpressionResolver = new IndexNameExpressionResolver(Settings.EMPTY);
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java
index 699e8ed9d11..70e425e10e2 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java
@@ -36,7 +36,7 @@ import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.store.Store;
import org.elasticsearch.plugins.AbstractPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.*;
@@ -61,19 +61,19 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
/**
* Integration tests for the ClusterInfoService collecting information
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class ClusterInfoServiceTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class ClusterInfoServiceIT extends ESIntegTestCase {
public static class Plugin extends AbstractPlugin {
@Override
public String name() {
- return "ClusterInfoServiceTests";
+ return "ClusterInfoServiceIT";
}
@Override
public String description() {
- return "ClusterInfoServiceTests";
+ return "ClusterInfoServiceIT";
}
public void onModule(ActionModule module) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java
index 72f1c901106..a174215a174 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java
@@ -37,8 +37,8 @@ import org.elasticsearch.common.inject.Singleton;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.plugins.AbstractPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.MockLogAppender;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.threadpool.ThreadPool;
@@ -50,7 +50,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
@@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class ClusterServiceTests extends ElasticsearchIntegrationTest {
+public class ClusterServiceIT extends ESIntegTestCase {
@Test
public void testTimeoutUpdateTask() throws Exception {
@@ -621,7 +621,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
block2.countDown();
}
- @Test @Slow
+ @Test
public void testLocalNodeMasterListenerCallbacks() throws Exception {
Settings settings = settingsBuilder()
.put("discovery.type", "zen")
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java
index be805757174..a33730b8342 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java
@@ -41,7 +41,7 @@ import org.elasticsearch.gateway.GatewayService;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.List;
@@ -54,8 +54,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 0, numClientNodes = 0)
-public class ClusterStateDiffTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0, numClientNodes = 0)
+public class ClusterStateDiffIT extends ESIntegTestCase {
@Test
public void testClusterStateDiffSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java
index 826634dcf95..5575ed93317 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.discovery.zen.DiscoveryNodesProvider;
import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction;
import org.elasticsearch.node.service.NodeService;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.threadpool.ThreadPool;
@@ -60,7 +60,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static com.google.common.collect.Maps.newHashMap;
import static org.hamcrest.Matchers.*;
-public class ClusterStateDiffPublishingTests extends ElasticsearchTestCase {
+public class ClusterStateDiffPublishingTests extends ESTestCase {
protected ThreadPool threadPool;
protected Map nodes = newHashMap();
diff --git a/core/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java b/core/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java
index c6e5ce2fb59..df9c1883dd8 100644
--- a/core/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/DiskUsageTests.java
@@ -19,12 +19,12 @@
package org.elasticsearch.cluster;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class DiskUsageTests extends ElasticsearchTestCase {
+public class DiskUsageTests extends ESTestCase {
@Test
public void diskUsageCalcTest() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java
rename to core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java
index f18954df22f..6939df28dcd 100644
--- a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java
@@ -21,7 +21,6 @@ package org.elasticsearch.cluster;
import com.google.common.base.Predicate;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Priority;
@@ -30,8 +29,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Test;
@@ -39,13 +38,13 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest {
+public class MinimumMasterNodesIT extends ESIntegTestCase {
@Test
@TestLogging("cluster.service:TRACE,discovery.zen:TRACE,gateway:TRACE,transport.tracer:TRACE")
@@ -165,7 +164,7 @@ public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest {
}
}
- @Test @Slow
+ @Test
public void multipleNodesShutdownNonMasterNodes() throws Exception {
Settings settings = settingsBuilder()
.put("discovery.type", "zen")
diff --git a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java b/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java
rename to core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java
index 21e8682bbc1..de0952e5c63 100644
--- a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java
@@ -38,9 +38,9 @@ import org.elasticsearch.discovery.MasterNotDiscoveredException;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.util.HashMap;
@@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.lessThan;
/**
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class NoMasterNodeTests extends ElasticsearchIntegrationTest {
+public class NoMasterNodeIT extends ESIntegTestCase {
@Test
public void testNoMasterActions() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateTests.java b/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateTests.java
rename to core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java
index d3b26ac6307..4088b693468 100644
--- a/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexNotFoundException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.CollectionAssertions;
import org.junit.Before;
import org.junit.Test;
@@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.*;
* Checking simple filtering capabilites of the cluster state
*
*/
-public class SimpleClusterStateTests extends ElasticsearchIntegrationTest {
+public class SimpleClusterStateIT extends ESIntegTestCase {
@Before
public void indexData() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesTests.java b/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesTests.java
rename to core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java
index d02bf477fe5..2979b1eac85 100644
--- a/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java
@@ -23,21 +23,21 @@ import org.elasticsearch.action.UnavailableShardsException;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Requests;
import org.elasticsearch.common.Priority;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import static org.elasticsearch.client.Requests.createIndexRequest;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.unit.TimeValue.timeValueSeconds;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.hamcrest.Matchers.equalTo;
/**
*
*/
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
-public class SimpleDataNodesTests extends ElasticsearchIntegrationTest {
+public class SimpleDataNodesIT extends ESIntegTestCase {
@Test
public void testDataNodes() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesTests.java b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesTests.java
rename to core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java
index 54bb8ffafc3..2876f7911e2 100644
--- a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java
@@ -23,22 +23,18 @@ import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.MasterNotDiscoveredException;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.io.IOException;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-/**
- *
- */
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-@Slow
-public class SpecificMasterNodesTests extends ElasticsearchIntegrationTest {
+public class SpecificMasterNodesIT extends ESIntegTestCase {
protected final Settings.Builder settingsBuilder() {
return Settings.builder().put("discovery.type", "zen");
diff --git a/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationTests.java b/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationTests.java
rename to core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java
index 416bc90bd24..c91915bd9cf 100644
--- a/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java
@@ -21,20 +21,20 @@ package org.elasticsearch.cluster;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.common.Priority;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.List;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.hamcrest.Matchers.equalTo;
/**
*/
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
-public class UpdateSettingsValidationTests extends ElasticsearchIntegrationTest {
+public class UpdateSettingsValidationIT extends ESIntegTestCase {
@Test
public void testUpdateSettingsValidation() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsTests.java b/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java
index f226959dae2..9e3a1127e05 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java
@@ -32,17 +32,17 @@ import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.DiscoverySettings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.TEST;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
@ClusterScope(scope = TEST, minNumDataNodes = 2)
-public class AckClusterUpdateSettingsTests extends ElasticsearchIntegrationTest {
+public class AckClusterUpdateSettingsIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/ack/AckTests.java b/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/cluster/ack/AckTests.java
rename to core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java
index f287a95acab..de05f40aa59 100644
--- a/core/src/test/java/org/elasticsearch/cluster/ack/AckTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java
@@ -42,7 +42,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
import com.google.common.base.Predicate;
@@ -52,12 +52,12 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
@ClusterScope(minNumDataNodes = 2)
-public class AckTests extends ElasticsearchIntegrationTest {
+public class AckIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationTests.java
rename to core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java
index 2bb2802fcec..f15232db192 100644
--- a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java
@@ -31,8 +31,8 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.List;
@@ -44,10 +44,10 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-@ClusterScope(scope= ElasticsearchIntegrationTest.Scope.TEST, numDataNodes =0, minNumDataNodes = 2)
-public class AwarenessAllocationTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope= ESIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2)
+public class AwarenessAllocationIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(AwarenessAllocationTests.class);
+ private final ESLogger logger = Loggers.getLogger(AwarenessAllocationIT.class);
@Override
protected int numberOfReplicas() {
@@ -105,7 +105,6 @@ public class AwarenessAllocationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testAwarenessZones() throws Exception {
Settings commonSettings = Settings.settingsBuilder()
.put("cluster.routing.allocation.awareness.force.zone.values", "a,b")
@@ -145,7 +144,6 @@ public class AwarenessAllocationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testAwarenessZonesIncrementalNodes() throws Exception {
Settings commonSettings = Settings.settingsBuilder()
.put("cluster.routing.allocation.awareness.force.zone.values", "a,b")
diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteTests.java b/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteTests.java
rename to core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java
index b5181b64883..c9643d8601b 100644
--- a/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java
@@ -41,8 +41,8 @@ import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.nio.file.Path;
@@ -52,7 +52,7 @@ import java.util.List;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ENABLE;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.equalTo;
@@ -61,9 +61,9 @@ import static org.hamcrest.Matchers.hasSize;
/**
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class ClusterRerouteTests extends ElasticsearchIntegrationTest {
+public class ClusterRerouteIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(ClusterRerouteTests.class);
+ private final ESLogger logger = Loggers.getLogger(ClusterRerouteIT.class);
@Test
public void rerouteWithCommands_disableAllocationSettings() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationTests.java
rename to core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java
index dbc97dddfbf..80eaf296558 100644
--- a/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java
@@ -27,20 +27,20 @@ import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocation
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.List;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.hamcrest.Matchers.equalTo;
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
-public class FilteringAllocationTests extends ElasticsearchIntegrationTest {
+public class FilteringAllocationIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(FilteringAllocationTests.class);
+ private final ESLogger logger = Loggers.getLogger(FilteringAllocationIT.class);
@Test
public void testDecommissionNodeNoReplicas() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleTests.java b/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleTests.java
rename to core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java
index ac5741e93f4..edb6235b815 100644
--- a/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java
@@ -23,17 +23,17 @@ import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllo
import org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator;
import org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocatorModule;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import java.io.IOException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.hamcrest.Matchers.instanceOf;
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
-public class ShardsAllocatorModuleTests extends ElasticsearchIntegrationTest {
+public class ShardsAllocatorModuleIT extends ESIntegTestCase {
public void testLoadDefaultShardsAllocator() throws IOException {
assertAllocatorInstance(Settings.Builder.EMPTY_SETTINGS, BalancedShardsAllocator.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationTests.java
rename to core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java
index 06659cbd67b..5b07daa6ba8 100644
--- a/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java
@@ -20,7 +20,7 @@ package org.elasticsearch.cluster.allocation;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.routing.RoutingNode;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS;
@@ -28,7 +28,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-public class SimpleAllocationTests extends ElasticsearchIntegrationTest {
+public class SimpleAllocationIT extends ESIntegTestCase {
@Override
protected int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java b/core/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
index 659f552e0a2..0cc7b70796a 100644
--- a/core/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/block/ClusterBlockTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.EnumSet;
@@ -31,7 +31,7 @@ import java.util.EnumSet;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
-public class ClusterBlockTests extends ElasticsearchTestCase {
+public class ClusterBlockTests extends ESTestCase {
@Test
public void testSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/DateMathExpressionResolverTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/DateMathExpressionResolverTests.java
index 8dd5a1972d4..d63319386b4 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/DateMathExpressionResolverTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/DateMathExpressionResolverTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.Context;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.DateMathExpressionResolver;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
@@ -40,7 +40,7 @@ import java.util.List;
import static org.hamcrest.Matchers.equalTo;
import static org.joda.time.DateTimeZone.UTC;
-public class DateMathExpressionResolverTests extends ElasticsearchTestCase {
+public class DateMathExpressionResolverTests extends ESTestCase {
private final DateMathExpressionResolver expressionResolver = new DateMathExpressionResolver(Settings.EMPTY);
private final Context context = new Context(
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/HumanReadableIndexSettingsTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/HumanReadableIndexSettingsTests.java
index 5a5ee4d311e..8e906aeea0c 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/HumanReadableIndexSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/HumanReadableIndexSettingsTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.cluster.metadata;
import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.Test;
@@ -29,7 +29,7 @@ import org.junit.Test;
import static com.google.common.collect.Sets.newHashSet;
import static org.elasticsearch.test.VersionUtils.randomVersion;
-public class HumanReadableIndexSettingsTests extends ElasticsearchTestCase {
+public class HumanReadableIndexSettingsTests extends ESTestCase {
@Test
public void testHumanReadableSettings() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java
index 8be23e6f386..e8459b48002 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolverTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.Strings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.IndexClosedException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class IndexNameExpressionResolverTests extends ElasticsearchTestCase {
+public class IndexNameExpressionResolverTests extends ESTestCase {
private final IndexNameExpressionResolver indexNameExpressionResolver = new IndexNameExpressionResolver(Settings.EMPTY);
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/MappingMetaDataParserTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/MappingMetaDataParserTests.java
index 18ebbc8c430..2211b20ad95 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/MappingMetaDataParserTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/MappingMetaDataParserTests.java
@@ -23,14 +23,14 @@ import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.internal.TimestampFieldMapper;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class MappingMetaDataParserTests extends ElasticsearchTestCase {
+public class MappingMetaDataParserTests extends ESTestCase {
@Test
public void testParseIdAlone() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetaDataTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetaDataTests.java
index c5063bfc80c..4f8d98ed083 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetaDataTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetaDataTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.cluster.metadata;
import org.elasticsearch.Version;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class ToAndFromJsonMetaDataTests extends ElasticsearchTestCase {
+public class ToAndFromJsonMetaDataTests extends ESTestCase {
@Test
public void testSimpleJsonFromAndTo() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java b/core/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java
index 6c4af1e1873..d2f55fc13f8 100644
--- a/core/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/metadata/WildcardExpressionResolverTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.ClusterState;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -31,7 +31,7 @@ import java.util.Arrays;
import static com.google.common.collect.Sets.newHashSet;
import static org.hamcrest.Matchers.equalTo;
-public class WildcardExpressionResolverTests extends ElasticsearchTestCase {
+public class WildcardExpressionResolverTests extends ESTestCase {
@Test
public void testConvertWildcardsJustIndicesTests() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeFiltersTests.java b/core/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeFiltersTests.java
index c86508f756c..141d983ab92 100644
--- a/core/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeFiltersTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeFiltersTests.java
@@ -23,7 +23,7 @@ import com.google.common.collect.ImmutableMap;
import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.DummyTransportAddress;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.node.DiscoveryNodeFilters.OpType.AND;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class DiscoveryNodeFiltersTests extends ElasticsearchTestCase {
+public class DiscoveryNodeFiltersTests extends ESTestCase {
@Test
public void nameMatch() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/AllocationIdTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/AllocationIdTests.java
index 2f64f39f059..9394dc81583 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/AllocationIdTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/AllocationIdTests.java
@@ -19,14 +19,14 @@
package org.elasticsearch.cluster.routing;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
/**
*/
-public class AllocationIdTests extends ElasticsearchTestCase {
+public class AllocationIdTests extends ESTestCase {
@Test
public void testShardToStarted() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationTests.java
rename to core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java
index e60ba6cafc0..26ba7e12679 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.junit.Test;
@@ -36,8 +36,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class DelayedAllocationTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class DelayedAllocationIT extends ESIntegTestCase {
/**
* Verifies that when there is no delay timeout, a 1/1 index shard will immediately
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityTests.java
index 3892c3a2c4b..7a794977c8b 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import java.io.BufferedReader;
@@ -35,7 +35,7 @@ import java.io.InputStreamReader;
import java.nio.file.Path;
import java.util.Arrays;
-public class RoutingBackwardCompatibilityTests extends ElasticsearchTestCase {
+public class RoutingBackwardCompatibilityTests extends ESTestCase {
public void testBackwardCompatibility() throws Exception {
Path baseDir = createTempDir();
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeTests.java
rename to core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java
index 54a8c964e53..bff1977545a 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java
@@ -28,16 +28,16 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.nio.file.Path;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0)
@LuceneTestCase.SuppressFileSystems("*") // extra files break the single data cluster expectation when unzipping the static index
-public class RoutingBackwardCompatibilityUponUpgradeTests extends ElasticsearchIntegrationTest {
+public class RoutingBackwardCompatibilityUponUpgradeIT extends ESIntegTestCase {
public void testDefaultRouting() throws Exception {
test("default_routing_1_x", DjbHashFunction.class, false);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingServiceTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingServiceTests.java
index 97a1e3d790d..94c9f19c4ae 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingServiceTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.After;
import org.junit.Before;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class RoutingServiceTests extends ElasticsearchAllocationTestCase {
+public class RoutingServiceTests extends ESAllocationTestCase {
private TestRoutingService routingService;
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTest.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTest.java
index 28e93ad693b..0aa9c4c4ff1 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTest.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTest.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.RoutingAllocation;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +38,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class RoutingTableTest extends ElasticsearchAllocationTestCase {
+public class RoutingTableTest extends ESAllocationTestCase {
private static final String TEST_INDEX_1 = "test1";
private static final String TEST_INDEX_2 = "test2";
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java
index 81a187592b7..79b7ec526b7 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/ShardRoutingTests.java
@@ -26,11 +26,11 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.metadata.SnapshotId;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
-public class ShardRoutingTests extends ElasticsearchTestCase {
+public class ShardRoutingTests extends ESTestCase {
public void testFrozenAfterRead() throws IOException {
ShardRouting routing = TestShardRouting.newShardRouting("foo", 1, "node_1", null, null, false, ShardRoutingState.INITIALIZING, 1);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java b/core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java
index 9f1f8296a6b..0d60b6b5718 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/TestShardRouting.java
@@ -19,7 +19,7 @@
package org.elasticsearch.cluster.routing;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
/**
* A helper that allows to create shard routing instances within tests, while not requiring to expose
@@ -68,7 +68,7 @@ public class TestShardRouting {
switch (state) {
case UNASSIGNED:
case INITIALIZING:
- return new UnassignedInfo(ElasticsearchTestCase.randomFrom(UnassignedInfo.Reason.values()), "auto generated for test");
+ return new UnassignedInfo(ESTestCase.randomFrom(UnassignedInfo.Reason.values()), "auto generated for test");
case STARTED:
case RELOCATING:
return null;
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java
index 29e46ff1b36..21c86c82989 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/UnassignedInfoTests.java
@@ -35,7 +35,7 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.EnumSet;
@@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class UnassignedInfoTests extends ElasticsearchAllocationTestCase {
+public class UnassignedInfoTests extends ESAllocationTestCase {
@Test
public void testReasonOrdinalOrder() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java
index 46424270fa9..d774cf92951 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AddIncrementallyTests.java
@@ -34,7 +34,7 @@ import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllo
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -46,7 +46,7 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.elasticsearch.cluster.routing.ShardRoutingState.STARTED;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class AddIncrementallyTests extends ElasticsearchAllocationTestCase {
+public class AddIncrementallyTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(AddIncrementallyTests.class);
@Test
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java
index 24cd971848d..8e3b92be63a 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java
@@ -40,7 +40,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class AllocationCommandsTests extends ElasticsearchAllocationTestCase {
+public class AllocationCommandsTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(AllocationCommandsTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java
index c8d1926b6d3..f8895a73886 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/AwarenessAllocationTests.java
@@ -31,7 +31,7 @@ import org.elasticsearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class AwarenessAllocationTests extends ElasticsearchAllocationTestCase {
+public class AwarenessAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(AwarenessAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java
index cfc7d5e1689..a8311ab606c 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceConfigurationTests.java
@@ -35,9 +35,9 @@ import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllo
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.elasticsearch.test.gateway.NoopGatewayAllocator;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -45,7 +45,7 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.elasticsearch.cluster.routing.ShardRoutingState.STARTED;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class BalanceConfigurationTests extends ElasticsearchAllocationTestCase {
+public class BalanceConfigurationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(BalanceConfigurationTests.class);
// TODO maybe we can randomize these numbers somehow
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTest.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTest.java
index 481a036eafa..89e0cf8332b 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTest.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTest.java
@@ -19,7 +19,6 @@
package org.elasticsearch.cluster.routing.allocation;
import org.apache.lucene.util.TestUtil;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexMetaData;
@@ -41,8 +40,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**
* see issue #9023
*/
-@Slow
-public class BalanceUnbalancedClusterTest extends CatAllocationTestBase {
+public class BalanceUnbalancedClusterTest extends CatAllocationTestCase {
@Override
protected Path getCatPath() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestBase.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestBase.java
rename to core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java
index ff0233f7cf3..de416db0c23 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestBase.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/CatAllocationTestCase.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.*;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Ignore;
import org.junit.Test;
@@ -50,8 +50,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
* 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.
*/
-@Ignore
-public abstract class CatAllocationTestBase extends ElasticsearchAllocationTestCase {
+public abstract class CatAllocationTestCase extends ESAllocationTestCase {
protected abstract Path getCatPath() throws IOException;
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java
index d738a8cbd65..1361d276fbb 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ClusterRebalanceRoutingTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -37,7 +37,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
-public class ClusterRebalanceRoutingTests extends ElasticsearchAllocationTestCase {
+public class ClusterRebalanceRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ClusterRebalanceRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java
index 2cf4f13a3b9..688a281cb65 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ConcurrentRebalanceRoutingTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -36,7 +36,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class ConcurrentRebalanceRoutingTests extends ElasticsearchAllocationTestCase {
+public class ConcurrentRebalanceRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ConcurrentRebalanceRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java
index 5fc7cb58ab7..7697e5bb38b 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DeadNodesAllocationTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationComman
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class DeadNodesAllocationTests extends ElasticsearchAllocationTestCase {
+public class DeadNodesAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(DeadNodesAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DisableAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DisableAllocationTests.java
index fb6a3198ce4..2b66bee7c6d 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DisableAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/DisableAllocationTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.DisableAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class DisableAllocationTests extends ElasticsearchAllocationTestCase {
+public class DisableAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(DisableAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java
index eb341deded8..e776ea5ace5 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ElectReplicaAsPrimaryDuringRelocationTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class ElectReplicaAsPrimaryDuringRelocationTests extends ElasticsearchAllocationTestCase {
+public class ElectReplicaAsPrimaryDuringRelocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ElectReplicaAsPrimaryDuringRelocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java
index 12a417bf692..2240e2e3293 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedNodeRoutingTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -38,7 +38,7 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.STARTED;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.equalTo;
-public class FailedNodeRoutingTests extends ElasticsearchAllocationTestCase {
+public class FailedNodeRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(FailedNodeRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java
index a53206494d6..f45b42cd5e3 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FailedShardsRoutingTests.java
@@ -19,7 +19,6 @@
package org.elasticsearch.cluster.routing.allocation;
-import com.carrotsearch.randomizedtesting.annotations.Repeat;
import com.google.common.collect.ImmutableList;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterState;
@@ -32,7 +31,7 @@ import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationComman
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -44,7 +43,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class FailedShardsRoutingTests extends ElasticsearchAllocationTestCase {
+public class FailedShardsRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(FailedShardsRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java
index 04fb417e218..037daec3c5e 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/FilterRoutingTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class FilterRoutingTests extends ElasticsearchAllocationTestCase {
+public class FilterRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(FilterRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java
index 85bcfb8a3ee..c48cdda6148 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/IndexBalanceTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class IndexBalanceTests extends ElasticsearchAllocationTestCase {
+public class IndexBalanceTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(IndexBalanceTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java
index 2b4ff06468c..94df9af0561 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class NodeVersionAllocationDeciderTests extends ElasticsearchAllocationTestCase {
+public class NodeVersionAllocationDeciderTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(NodeVersionAllocationDeciderTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java
index de1a57e993e..f400513688c 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferLocalPrimariesToRelocatingPrimariesTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.RoutingTable;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class PreferLocalPrimariesToRelocatingPrimariesTests extends ElasticsearchAllocationTestCase {
+public class PreferLocalPrimariesToRelocatingPrimariesTests extends ESAllocationTestCase {
@Test
public void testPreferLocalPrimaryAllocationOverFiltered() {
int concurrentRecoveries = randomIntBetween(1, 10);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java
index d9607e9ac44..be0dde8f78d 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PreferPrimaryAllocationTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class PreferPrimaryAllocationTests extends ElasticsearchAllocationTestCase {
+public class PreferPrimaryAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(PreferPrimaryAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java
index 7d900e889fd..8e59326e06b 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryElectionRoutingTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class PrimaryElectionRoutingTests extends ElasticsearchAllocationTestCase {
+public class PrimaryElectionRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(PrimaryElectionRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java
index ae3df569264..3202a829cb7 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/PrimaryNotRelocatedWhileBeingRecoveredTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class PrimaryNotRelocatedWhileBeingRecoveredTests extends ElasticsearchAllocationTestCase {
+public class PrimaryNotRelocatedWhileBeingRecoveredTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(PrimaryNotRelocatedWhileBeingRecoveredTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java
index df15051c226..8ebe7e7de36 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RandomAllocationDeciderTests.java
@@ -36,8 +36,8 @@ import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.cluster.routing.allocation.decider.Decision;
import org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider;
import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.elasticsearch.test.gateway.NoopGatewayAllocator;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -49,7 +49,7 @@ import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.equalTo;
-public class RandomAllocationDeciderTests extends ElasticsearchAllocationTestCase {
+public class RandomAllocationDeciderTests extends ESAllocationTestCase {
/* This test will make random allocation decision on a growing and shrinking
* cluster leading to a random distribution of the shards. After a certain
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java
index a8d44c1df12..339f2e69853 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RebalanceAfterActiveTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class RebalanceAfterActiveTests extends ElasticsearchAllocationTestCase {
+public class RebalanceAfterActiveTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(RebalanceAfterActiveTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java
index 268fed8876f..e5b2302dae8 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ReplicaAllocatedAfterPrimaryTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class ReplicaAllocatedAfterPrimaryTests extends ElasticsearchAllocationTestCase {
+public class ReplicaAllocatedAfterPrimaryTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ReplicaAllocatedAfterPrimaryTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java
index 620ad859c8e..885132b38d0 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/RoutingNodesIntegrityTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class RoutingNodesIntegrityTests extends ElasticsearchAllocationTestCase {
+public class RoutingNodesIntegrityTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(IndexBalanceTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java
index 09dba759290..9896116a4dc 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SameShardRoutingTests.java
@@ -33,7 +33,7 @@ import org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationD
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.transport.DummyTransportAddress;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
@@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class SameShardRoutingTests extends ElasticsearchAllocationTestCase {
+public class SameShardRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(SameShardRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java
index 4ca86bfcf75..8568948964d 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardVersioningTests.java
@@ -29,14 +29,14 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.equalTo;
-public class ShardVersioningTests extends ElasticsearchAllocationTestCase {
+public class ShardVersioningTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ShardVersioningTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java
index 6b69be0a3db..cbd6233d08d 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsLimitAllocationTests.java
@@ -31,7 +31,7 @@ import org.elasticsearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class ShardsLimitAllocationTests extends ElasticsearchAllocationTestCase {
+public class ShardsLimitAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ShardsLimitAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java
index e99c8860c4a..6f8027f05dd 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardNoReplicasRoutingTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.List;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class SingleShardNoReplicasRoutingTests extends ElasticsearchAllocationTestCase {
+public class SingleShardNoReplicasRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(SingleShardNoReplicasRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java
index 9b5b955d426..de6a1c6f4c2 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/SingleShardOneReplicaRoutingTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class SingleShardOneReplicaRoutingTests extends ElasticsearchAllocationTestCase {
+public class SingleShardOneReplicaRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(SingleShardOneReplicaRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java
index 92847cb5be6..dc23085c343 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/StartedShardsRoutingTests.java
@@ -25,17 +25,15 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.*;
-import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.Arrays;
import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.hamcrest.Matchers.nullValue;
-public class StartedShardsRoutingTests extends ElasticsearchAllocationTestCase {
+public class StartedShardsRoutingTests extends ESAllocationTestCase {
@Test
public void tesStartedShardsMatching() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java
index 54ac32c01ac..2a8026870e4 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/TenShardsOneReplicaRoutingTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class TenShardsOneReplicaRoutingTests extends ElasticsearchAllocationTestCase {
+public class TenShardsOneReplicaRoutingTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(TenShardsOneReplicaRoutingTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java
index 7479bd1db36..c156aea3bd3 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ThrottlingAllocationTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class ThrottlingAllocationTests extends ElasticsearchAllocationTestCase {
+public class ThrottlingAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(ThrottlingAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java
index 4749ab5ad86..0d2d51388b6 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/UpdateNumberOfReplicasTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class UpdateNumberOfReplicasTests extends ElasticsearchAllocationTestCase {
+public class UpdateNumberOfReplicasTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(UpdateNumberOfReplicasTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java
index cc5628f605a..c86eba95685 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java
@@ -38,10 +38,10 @@ import org.elasticsearch.cluster.routing.allocation.command.AllocationCommand;
import org.elasticsearch.cluster.routing.allocation.command.AllocationCommands;
import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand;
import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.elasticsearch.test.gateway.NoopGatewayAllocator;
import org.elasticsearch.common.transport.LocalTransportAddress;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class DiskThresholdDeciderTests extends ElasticsearchAllocationTestCase {
+public class DiskThresholdDeciderTests extends ESAllocationTestCase {
private static ShardsAllocators makeShardsAllocators() {
return new ShardsAllocators(NoopGatewayAllocator.INSTANCE);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java
index 083dc79acb8..7b0f8386474 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.cluster.DiskUsage;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -38,7 +38,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
/**
* Unit tests for the DiskThresholdDecider
*/
-public class DiskThresholdDeciderUnitTests extends ElasticsearchTestCase {
+public class DiskThresholdDeciderUnitTests extends ESTestCase {
@Test
public void testDynamicSettings() {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIntegrationTest.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIT.java
index 12924234cea..940634a4657 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIT.java
@@ -19,7 +19,7 @@
package org.elasticsearch.cluster.routing.allocation.decider;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.Set;
@@ -32,8 +32,8 @@ import static org.hamcrest.Matchers.equalTo;
* {@link EnableAllocationTests} this test is meant to check if the actual update of the settings
* works as expected.
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class EnableAllocationDeciderIntegrationTest extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class EnableAllocationDeciderIT extends ESIntegTestCase {
public void testEnableRebalance() throws InterruptedException {
final String firstNode = internalCluster().startNode();
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java
index bb7944c332e..4e2be68e5b7 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationTests.java
@@ -35,7 +35,7 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.EnumSet;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class EnableAllocationTests extends ElasticsearchAllocationTestCase {
+public class EnableAllocationTests extends ESAllocationTestCase {
private final ESLogger logger = Loggers.getLogger(EnableAllocationTests.class);
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesTests.java
rename to core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java
index f5486cae475..863031a3499 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.monitor.fs.FsInfo;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.Test;
@@ -50,8 +50,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class MockDiskUsagesTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class MockDiskUsagesIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/operation/hash/murmur3/Murmur3HashFunctionTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/operation/hash/murmur3/Murmur3HashFunctionTests.java
index d19433853a5..23b928db247 100644
--- a/core/src/test/java/org/elasticsearch/cluster/routing/operation/hash/murmur3/Murmur3HashFunctionTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/routing/operation/hash/murmur3/Murmur3HashFunctionTests.java
@@ -24,9 +24,9 @@ import com.carrotsearch.randomizedtesting.generators.RandomStrings;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import org.elasticsearch.cluster.routing.Murmur3HashFunction;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
-public class Murmur3HashFunctionTests extends ElasticsearchTestCase {
+public class Murmur3HashFunctionTests extends ESTestCase {
public void test() {
// Make sure that we agree with guava
diff --git a/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java b/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java
index 71e5e62f67c..308b00031b8 100644
--- a/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterSerializationTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class ClusterSerializationTests extends ElasticsearchAllocationTestCase {
+public class ClusterSerializationTests extends ESAllocationTestCase {
@Test
public void testClusterStateSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java b/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java
index 9c812dd7b7e..573cb131050 100644
--- a/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/serialization/ClusterStateToStringTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.common.transport.DummyTransportAddress;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.containsString;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.containsString;
/**
*
*/
-public class ClusterStateToStringTests extends ElasticsearchAllocationTestCase {
+public class ClusterStateToStringTests extends ESAllocationTestCase {
@Test
public void testClusterStateSerialization() throws Exception {
MetaData metaData = MetaData.builder()
diff --git a/core/src/test/java/org/elasticsearch/cluster/serialization/DiffableTests.java b/core/src/test/java/org/elasticsearch/cluster/serialization/DiffableTests.java
index 0cc1c8c5ba8..796da33f4e0 100644
--- a/core/src/test/java/org/elasticsearch/cluster/serialization/DiffableTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/serialization/DiffableTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.cluster.DiffableUtils.KeyedReader;
import org.elasticsearch.cluster.AbstractDiffable;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.io.stream.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import java.util.Map;
import static com.google.common.collect.Maps.newHashMap;
import static org.hamcrest.CoreMatchers.equalTo;
-public class DiffableTests extends ElasticsearchTestCase {
+public class DiffableTests extends ESTestCase {
@Test
public void testImmutableMapDiff() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsTests.java b/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsTests.java
rename to core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java
index 2faf0dd4b3c..6112fe04025 100644
--- a/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java
@@ -30,19 +30,19 @@ import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.indices.store.IndicesStore;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.TEST;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = TEST)
-public class ClusterSettingsTests extends ElasticsearchIntegrationTest {
+public class ClusterSettingsIT extends ESIntegTestCase {
@Test
public void clusterNonExistingSettingsUpdate() {
@@ -209,8 +209,8 @@ public class ClusterSettingsTests extends ElasticsearchIntegrationTest {
private void createNode(Settings settings) {
internalCluster().startNode(Settings.builder()
- .put(ClusterName.SETTING, "ClusterSettingsTests")
- .put("node.name", "ClusterSettingsTests")
+ .put(ClusterName.SETTING, "ClusterSettingsIT")
+ .put("node.name", "ClusterSettingsIT")
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
.put(EsExecutors.PROCESSORS, 1) // limit the number of threads created
diff --git a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringTests.java b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringTests.java
rename to core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java
index e8876577ce4..8b3b871113e 100644
--- a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java
@@ -26,20 +26,20 @@ import org.elasticsearch.common.inject.Module;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter;
import org.elasticsearch.plugins.AbstractPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Collection;
import static com.google.common.collect.Lists.newArrayList;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
@ClusterScope(scope = SUITE, numDataNodes = 1)
-public class SettingsFilteringTests extends ElasticsearchIntegrationTest {
+public class SettingsFilteringIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsValidatorTests.java b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsValidatorTests.java
index 5208a7bb8d9..fdb54cbb6f7 100644
--- a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsValidatorTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsValidatorTests.java
@@ -19,12 +19,12 @@
package org.elasticsearch.cluster.settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
-public class SettingsValidatorTests extends ElasticsearchTestCase {
+public class SettingsValidatorTests extends ESTestCase {
@Test
public void testValidators() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsTests.java b/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsTests.java
rename to core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java
index 2daaa66d7e3..422846fc48a 100644
--- a/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java
@@ -23,22 +23,22 @@ import org.elasticsearch.action.admin.cluster.shards.ClusterSearchShardsResponse
import org.elasticsearch.cluster.metadata.AliasAction;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.equalTo;
/**
*/
@ClusterScope(scope= Scope.SUITE, numDataNodes = 2)
-public class ClusterSearchShardsTests extends ElasticsearchIntegrationTest {
+public class ClusterSearchShardsIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java b/core/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java
index d54f931e8d8..9e5f70907ce 100644
--- a/core/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java
+++ b/core/src/test/java/org/elasticsearch/cluster/structure/RoutingIteratorTests.java
@@ -34,14 +34,14 @@ import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllo
import org.elasticsearch.cluster.routing.OperationRouting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.routing.ShardRoutingState.INITIALIZING;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.*;
-public class RoutingIteratorTests extends ElasticsearchAllocationTestCase {
+public class RoutingIteratorTests extends ESAllocationTestCase {
@Test
public void testEmptyIterator() {
diff --git a/core/src/test/java/org/elasticsearch/codecs/CodecTests.java b/core/src/test/java/org/elasticsearch/codecs/CodecTests.java
index 6347dc5da72..697365151f7 100644
--- a/core/src/test/java/org/elasticsearch/codecs/CodecTests.java
+++ b/core/src/test/java/org/elasticsearch/codecs/CodecTests.java
@@ -20,7 +20,6 @@
package org.elasticsearch.codecs;
import org.apache.lucene.codecs.Codec;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
@@ -28,7 +27,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.MapperParsingException;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Assert;
@@ -36,10 +35,7 @@ import java.io.IOException;
import static org.hamcrest.Matchers.containsString;
-/**
- */
-@Slow
-public class CodecTests extends ElasticsearchSingleNodeTest {
+public class CodecTests extends ESSingleNodeTestCase {
public void testAcceptPostingsFormat() throws IOException {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/common/Base64Test.java b/core/src/test/java/org/elasticsearch/common/Base64Test.java
index f80d6afb445..07a3689130c 100644
--- a/core/src/test/java/org/elasticsearch/common/Base64Test.java
+++ b/core/src/test/java/org/elasticsearch/common/Base64Test.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common;
import com.google.common.base.Charsets;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class Base64Test extends ElasticsearchTestCase {
+public class Base64Test extends ESTestCase {
@Test // issue #6334
public void testBase64DecodeWithExtraCharactersAfterPadding() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/BooleansTests.java b/core/src/test/java/org/elasticsearch/common/BooleansTests.java
index 3bacaed7f5a..0baf4335cd3 100644
--- a/core/src/test/java/org/elasticsearch/common/BooleansTests.java
+++ b/core/src/test/java/org/elasticsearch/common/BooleansTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -28,7 +28,7 @@ import java.util.Locale;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class BooleansTests extends ElasticsearchTestCase {
+public class BooleansTests extends ESTestCase {
@Test
public void testIsBoolean() {
diff --git a/core/src/test/java/org/elasticsearch/common/ChannelsTests.java b/core/src/test/java/org/elasticsearch/common/ChannelsTests.java
index 2fae109a6aa..46e65ad1e75 100644
--- a/core/src/test/java/org/elasticsearch/common/ChannelsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/ChannelsTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.bytes.ByteBufferBytesReference;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.Channels;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.jboss.netty.buffer.ByteBufferBackedChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -32,9 +32,7 @@ import org.junit.Before;
import org.junit.Test;
import java.io.EOFException;
-import java.io.File;
import java.io.IOException;
-import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
@@ -44,7 +42,7 @@ import java.nio.channels.WritableByteChannel;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
-public class ChannelsTests extends ElasticsearchTestCase {
+public class ChannelsTests extends ESTestCase {
byte[] randomBytes;
FileChannel fileChannel;
diff --git a/core/src/test/java/org/elasticsearch/common/ParseFieldTests.java b/core/src/test/java/org/elasticsearch/common/ParseFieldTests.java
index 7b0dacf8500..6df6a50f9a3 100644
--- a/core/src/test/java/org/elasticsearch/common/ParseFieldTests.java
+++ b/core/src/test/java/org/elasticsearch/common/ParseFieldTests.java
@@ -19,14 +19,14 @@
package org.elasticsearch.common;
import org.apache.commons.lang3.ArrayUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.EnumSet;
import static org.hamcrest.CoreMatchers.*;
-public class ParseFieldTests extends ElasticsearchTestCase {
+public class ParseFieldTests extends ESTestCase {
@Test
public void testParse() {
diff --git a/core/src/test/java/org/elasticsearch/common/PidFileTests.java b/core/src/test/java/org/elasticsearch/common/PidFileTests.java
index ab098924bc7..ad083c092fa 100644
--- a/core/src/test/java/org/elasticsearch/common/PidFileTests.java
+++ b/core/src/test/java/org/elasticsearch/common/PidFileTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common;
import com.google.common.base.Charsets;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.BufferedWriter;
@@ -32,7 +32,7 @@ import java.nio.file.StandardOpenOption;
/**
* UnitTest for {@link org.elasticsearch.common.PidFile}
*/
-public class PidFileTests extends ElasticsearchTestCase {
+public class PidFileTests extends ESTestCase {
@Test(expected = IllegalArgumentException.class)
public void testParentIsFile() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/StringsTests.java b/core/src/test/java/org/elasticsearch/common/StringsTests.java
index e6f75aa9a13..611894c6a64 100644
--- a/core/src/test/java/org/elasticsearch/common/StringsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/StringsTests.java
@@ -19,10 +19,10 @@
package org.elasticsearch.common;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
-public class StringsTests extends ElasticsearchTestCase {
+public class StringsTests extends ESTestCase {
@Test
public void testToCamelCase() {
diff --git a/core/src/test/java/org/elasticsearch/common/TableTests.java b/core/src/test/java/org/elasticsearch/common/TableTests.java
index 032299cd1b2..1afdf592960 100644
--- a/core/src/test/java/org/elasticsearch/common/TableTests.java
+++ b/core/src/test/java/org/elasticsearch/common/TableTests.java
@@ -19,13 +19,13 @@
package org.elasticsearch.common;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.List;
import java.util.Map;
-public class TableTests extends ElasticsearchTestCase {
+public class TableTests extends ESTestCase {
@Test(expected = IllegalStateException.class)
public void testFailOnStartRowWithoutHeader() {
diff --git a/core/src/test/java/org/elasticsearch/common/UUIDTests.java b/core/src/test/java/org/elasticsearch/common/UUIDTests.java
index 23af5fb1417..af5f382ec31 100644
--- a/core/src/test/java/org/elasticsearch/common/UUIDTests.java
+++ b/core/src/test/java/org/elasticsearch/common/UUIDTests.java
@@ -18,13 +18,12 @@
*/
package org.elasticsearch.common;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
-import java.io.IOException;
import java.util.HashSet;
-public class UUIDTests extends ElasticsearchTestCase {
+public class UUIDTests extends ESTestCase {
static UUIDGenerator timeUUIDGen = new TimeBasedUUIDGenerator();
static UUIDGenerator randomUUIDGen = new RandomBasedUUIDGenerator();
diff --git a/core/src/test/java/org/elasticsearch/common/blobstore/BlobStoreTest.java b/core/src/test/java/org/elasticsearch/common/blobstore/BlobStoreTest.java
index 54def2b8660..62daeb7e2b5 100644
--- a/core/src/test/java/org/elasticsearch/common/blobstore/BlobStoreTest.java
+++ b/core/src/test/java/org/elasticsearch/common/blobstore/BlobStoreTest.java
@@ -18,7 +18,6 @@
*/
package org.elasticsearch.common.blobstore;
-import com.google.common.collect.ImmutableMap;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.LuceneTestCase;
@@ -26,7 +25,7 @@ import org.elasticsearch.common.blobstore.fs.FsBlobStore;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -41,7 +40,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
@LuceneTestCase.SuppressFileSystems("ExtrasFS")
-public class BlobStoreTest extends ElasticsearchTestCase {
+public class BlobStoreTest extends ESTestCase {
@Test
public void testWriteRead() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java b/core/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java
index 27946bacf4b..2a9f87a8663 100644
--- a/core/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java
+++ b/core/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.indices.breaker.BreakerSettings;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
/**
* Tests for the Memory Aggregating Circuit Breaker
*/
-public class MemoryCircuitBreakerTests extends ElasticsearchTestCase {
+public class MemoryCircuitBreakerTests extends ESTestCase {
@Test
public void testThreadedUpdatesToBreaker() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/bytes/BytesReferenceTests.java b/core/src/test/java/org/elasticsearch/common/bytes/BytesReferenceTests.java
index aaf2ef557fb..b18e6f62d25 100644
--- a/core/src/test/java/org/elasticsearch/common/bytes/BytesReferenceTests.java
+++ b/core/src/test/java/org/elasticsearch/common/bytes/BytesReferenceTests.java
@@ -20,11 +20,11 @@
package org.elasticsearch.common.bytes;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Arrays;
-public class BytesReferenceTests extends ElasticsearchTestCase {
+public class BytesReferenceTests extends ESTestCase {
public void testEquals() {
final int len = randomIntBetween(0, randomBoolean() ? 10: 100000);
diff --git a/core/src/test/java/org/elasticsearch/common/bytes/PagedBytesReferenceTest.java b/core/src/test/java/org/elasticsearch/common/bytes/PagedBytesReferenceTest.java
index aa0f4110392..59a3d01255e 100644
--- a/core/src/test/java/org/elasticsearch/common/bytes/PagedBytesReferenceTest.java
+++ b/core/src/test/java/org/elasticsearch/common/bytes/PagedBytesReferenceTest.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.ByteArray;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.jboss.netty.buffer.ChannelBuffer;
import org.junit.After;
@@ -42,7 +42,7 @@ import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Arrays;
-public class PagedBytesReferenceTest extends ElasticsearchTestCase {
+public class PagedBytesReferenceTest extends ESTestCase {
private static final int PAGE_SIZE = BigArrays.BYTE_PAGE_SIZE;
diff --git a/core/src/test/java/org/elasticsearch/common/cli/CheckFileCommandTests.java b/core/src/test/java/org/elasticsearch/common/cli/CheckFileCommandTests.java
index 4914f589c5a..bb9cad1ce27 100644
--- a/core/src/test/java/org/elasticsearch/common/cli/CheckFileCommandTests.java
+++ b/core/src/test/java/org/elasticsearch/common/cli/CheckFileCommandTests.java
@@ -25,7 +25,7 @@ import com.google.common.jimfs.Configuration;
import com.google.common.jimfs.Jimfs;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class CheckFileCommandTests extends ElasticsearchTestCase {
+public class CheckFileCommandTests extends ESTestCase {
private CliToolTestCase.CaptureOutputTerminal captureOutputTerminal = new CliToolTestCase.CaptureOutputTerminal();
diff --git a/core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java b/core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java
index e4bf49c8137..fdfee87dfcc 100644
--- a/core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java
+++ b/core/src/test/java/org/elasticsearch/common/cli/CliToolTestCase.java
@@ -22,7 +22,7 @@ package org.elasticsearch.common.cli;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.io.Streams;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
@@ -38,11 +38,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasSize;
-/**
- *
- */
-@Ignore
-public abstract class CliToolTestCase extends ElasticsearchTestCase {
+public abstract class CliToolTestCase extends ESTestCase {
@Before
public void setPathHome() {
diff --git a/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashMapTests.java b/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashMapTests.java
index 6cdde469418..f6372e53ea1 100644
--- a/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashMapTests.java
+++ b/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashMapTests.java
@@ -20,12 +20,12 @@
package org.elasticsearch.common.collect;
import com.google.common.collect.ImmutableMap;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.HashMap;
import java.util.Map;
-public class CopyOnWriteHashMapTests extends ElasticsearchTestCase {
+public class CopyOnWriteHashMapTests extends ESTestCase {
private static class O {
diff --git a/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashSetTests.java b/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashSetTests.java
index f489c47bc4a..7ca4a7bca51 100644
--- a/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashSetTests.java
+++ b/core/src/test/java/org/elasticsearch/common/collect/CopyOnWriteHashSetTests.java
@@ -20,12 +20,12 @@
package org.elasticsearch.common.collect;
import com.google.common.collect.ImmutableSet;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.HashSet;
import java.util.Set;
-public class CopyOnWriteHashSetTests extends ElasticsearchTestCase {
+public class CopyOnWriteHashSetTests extends ESTestCase {
private static class O {
diff --git a/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java b/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java
index e9404f4f20d..b5800f34411 100644
--- a/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java
+++ b/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java
@@ -25,8 +25,7 @@ import org.elasticsearch.common.io.stream.ByteBufferStreamInput;
import org.elasticsearch.common.io.stream.OutputStreamStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -38,7 +37,7 @@ import java.util.concurrent.CountDownLatch;
/**
* Test streaming compression (e.g. used for recovery)
*/
-public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCase {
+public abstract class AbstractCompressedStreamTests extends ESTestCase {
private final Compressor compressor;
@@ -49,7 +48,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testRandom() throws IOException {
Random r = getRandom();
for (int i = 0; i < 10; i++) {
- byte bytes[] = new byte[TestUtil.nextInt(r, 1, 400000)];
+ byte bytes[] = new byte[TestUtil.nextInt(r, 1, 100000)];
r.nextBytes(bytes);
doTest(bytes);
}
@@ -57,7 +56,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testRandomThreads() throws Exception {
final Random r = getRandom();
- int threadCount = TestUtil.nextInt(r, 2, 10);
+ int threadCount = TestUtil.nextInt(r, 2, 6);
Thread[] threads = new Thread[threadCount];
final CountDownLatch startingGun = new CountDownLatch(1);
for (int tid=0; tid < threadCount; tid++) {
@@ -103,7 +102,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testLineDocsThreads() throws Exception {
final Random r = getRandom();
- int threadCount = TestUtil.nextInt(r, 2, 10);
+ int threadCount = TestUtil.nextInt(r, 2, 6);
Thread[] threads = new Thread[threadCount];
final CountDownLatch startingGun = new CountDownLatch(1);
for (int tid=0; tid < threadCount; tid++) {
@@ -163,7 +162,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testRepetitionsLThreads() throws Exception {
final Random r = getRandom();
- int threadCount = TestUtil.nextInt(r, 2, 10);
+ int threadCount = TestUtil.nextInt(r, 2, 6);
Thread[] threads = new Thread[threadCount];
final CountDownLatch startingGun = new CountDownLatch(1);
for (int tid=0; tid < threadCount; tid++) {
@@ -227,7 +226,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testRepetitionsIThreads() throws Exception {
final Random r = getRandom();
- int threadCount = TestUtil.nextInt(r, 2, 10);
+ int threadCount = TestUtil.nextInt(r, 2, 6);
Thread[] threads = new Thread[threadCount];
final CountDownLatch startingGun = new CountDownLatch(1);
for (int tid=0; tid < threadCount; tid++) {
@@ -351,7 +350,7 @@ public abstract class AbstractCompressedStreamTests extends ElasticsearchTestCas
public void testRepetitionsSThreads() throws Exception {
final Random r = getRandom();
- int threadCount = TestUtil.nextInt(r, 2, 10);
+ int threadCount = TestUtil.nextInt(r, 2, 6);
Thread[] threads = new Thread[threadCount];
final CountDownLatch startingGun = new CountDownLatch(1);
for (int tid=0; tid < threadCount; tid++) {
diff --git a/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedXContentTests.java b/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedXContentTests.java
index ad424b7e337..5b8bcf1e443 100644
--- a/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedXContentTests.java
+++ b/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedXContentTests.java
@@ -23,7 +23,7 @@ import org.apache.lucene.util.TestUtil;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Assert;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.not;
/**
*
*/
-public abstract class AbstractCompressedXContentTests extends ElasticsearchTestCase {
+public abstract class AbstractCompressedXContentTests extends ESTestCase {
private final Compressor compressor;
diff --git a/core/src/test/java/org/elasticsearch/common/compress/lzf/CorruptedCompressorTests.java b/core/src/test/java/org/elasticsearch/common/compress/lzf/CorruptedCompressorTests.java
index 720a0331eef..a18a9e3fb65 100644
--- a/core/src/test/java/org/elasticsearch/common/compress/lzf/CorruptedCompressorTests.java
+++ b/core/src/test/java/org/elasticsearch/common/compress/lzf/CorruptedCompressorTests.java
@@ -24,7 +24,7 @@ import com.ning.compress.lzf.ChunkEncoder;
import com.ning.compress.lzf.LZFChunk;
import com.ning.compress.lzf.util.ChunkDecoderFactory;
import com.ning.compress.lzf.util.ChunkEncoderFactory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -35,7 +35,7 @@ import java.util.Arrays;
/**
* Test an extremely rare corruption produced by the pure java impl of ChunkEncoder.
*/
-public class CorruptedCompressorTests extends ElasticsearchTestCase {
+public class CorruptedCompressorTests extends ESTestCase {
public void testCorruption() throws IOException {
// this test generates a hash collision: [0,1,153,64] hashes the same as [1,153,64,64]
diff --git a/core/src/test/java/org/elasticsearch/common/geo/GeoHashTests.java b/core/src/test/java/org/elasticsearch/common/geo/GeoHashTests.java
index 55ff0bdb217..c38deb1da0c 100644
--- a/core/src/test/java/org/elasticsearch/common/geo/GeoHashTests.java
+++ b/core/src/test/java/org/elasticsearch/common/geo/GeoHashTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.geo;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
@@ -26,7 +26,7 @@ import org.junit.Test;
/**
* Tests for {@link GeoHashUtils}
*/
-public class GeoHashTests extends ElasticsearchTestCase {
+public class GeoHashTests extends ESTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java b/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java
index 9a06b10d817..53463e56056 100644
--- a/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java
+++ b/core/src/test/java/org/elasticsearch/common/geo/GeoJSONShapeParserTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions;
import java.io.IOException;
@@ -46,7 +46,7 @@ import static org.elasticsearch.common.geo.builders.ShapeBuilder.SPATIAL_CONTEXT
/**
* Tests for {@link GeoJSONShapeParser}
*/
-public class GeoJSONShapeParserTests extends ElasticsearchTestCase {
+public class GeoJSONShapeParserTests extends ESTestCase {
private final static GeometryFactory GEOMETRY_FACTORY = SPATIAL_CONTEXT.getGeometryFactory();
diff --git a/core/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java b/core/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java
index d82b1bdd14f..703ab2ffaaf 100644
--- a/core/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/geo/ShapeBuilderTests.java
@@ -28,17 +28,16 @@ import com.spatial4j.core.shape.impl.PointImpl;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.Polygon;
-import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.geo.builders.PolygonBuilder;
import org.elasticsearch.common.geo.builders.ShapeBuilder;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions.*;
/**
* Tests for {@link ShapeBuilder}
*/
-public class ShapeBuilderTests extends ElasticsearchTestCase {
+public class ShapeBuilderTests extends ESTestCase {
public void testNewPoint() {
Point point = ShapeBuilder.newPoint(-100, 45).build();
diff --git a/core/src/test/java/org/elasticsearch/common/hashing/MurmurHash3Tests.java b/core/src/test/java/org/elasticsearch/common/hashing/MurmurHash3Tests.java
index 6d3f5c8d05b..d9d4057f961 100644
--- a/core/src/test/java/org/elasticsearch/common/hashing/MurmurHash3Tests.java
+++ b/core/src/test/java/org/elasticsearch/common/hashing/MurmurHash3Tests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.common.hashing;
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
import org.elasticsearch.common.hash.MurmurHash3;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.LongBuffer;
-public class MurmurHash3Tests extends ElasticsearchTestCase {
+public class MurmurHash3Tests extends ESTestCase {
public void testHash128() {
final int iters = scaledRandomIntBetween(100, 5000);
diff --git a/core/src/test/java/org/elasticsearch/common/hppc/HppcMapsTests.java b/core/src/test/java/org/elasticsearch/common/hppc/HppcMapsTests.java
index f3534da9f38..8998d1bccf5 100644
--- a/core/src/test/java/org/elasticsearch/common/hppc/HppcMapsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/hppc/HppcMapsTests.java
@@ -20,7 +20,7 @@ package org.elasticsearch.common.hppc;
import com.carrotsearch.hppc.ObjectHashSet;
import org.elasticsearch.common.collect.HppcMaps;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -28,7 +28,7 @@ import java.util.List;
import static org.hamcrest.Matchers.equalTo;
-public class HppcMapsTests extends ElasticsearchTestCase {
+public class HppcMapsTests extends ESTestCase {
@Test
public void testIntersection() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java b/core/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java
index 53d7c82de30..751cb935225 100644
--- a/core/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.io;
import com.google.common.base.Charsets;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.apache.lucene.util.LuceneTestCase.SuppressFileSystems;
import org.junit.Assert;
import org.junit.Before;
@@ -43,7 +43,7 @@ import static org.hamcrest.CoreMatchers.is;
* Unit tests for {@link org.elasticsearch.common.io.FileSystemUtils}.
*/
@SuppressFileSystems("WindowsFS") // tries to move away open file handles
-public class FileSystemUtilsTests extends ElasticsearchTestCase {
+public class FileSystemUtilsTests extends ESTestCase {
private Path src;
private Path dst;
diff --git a/core/src/test/java/org/elasticsearch/common/io/StreamsTests.java b/core/src/test/java/org/elasticsearch/common/io/StreamsTests.java
index 2528b25a92e..edfe0ba03a7 100644
--- a/core/src/test/java/org/elasticsearch/common/io/StreamsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/io/StreamsTests.java
@@ -23,7 +23,7 @@ import com.google.common.base.Charsets;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.*;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Unit tests for {@link org.elasticsearch.common.io.Streams}.
*/
-public class StreamsTests extends ElasticsearchTestCase {
+public class StreamsTests extends ESTestCase {
@Test
public void testCopyFromInputStream() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/io/streams/BytesStreamsTests.java b/core/src/test/java/org/elasticsearch/common/io/streams/BytesStreamsTests.java
index 6840074e309..544cfb36d68 100644
--- a/core/src/test/java/org/elasticsearch/common/io/streams/BytesStreamsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/io/streams/BytesStreamsTests.java
@@ -29,8 +29,7 @@ import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.index.query.MatchAllQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.TermQueryBuilder;
-import org.elasticsearch.test.ElasticsearchTestCase;
-import org.junit.Ignore;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -41,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests for {@link BytesStreamOutput} paging behaviour.
*/
-public class BytesStreamsTests extends ElasticsearchTestCase {
+public class BytesStreamsTests extends ESTestCase {
@Test
public void testEmpty() throws Exception {
@@ -357,7 +356,7 @@ public class BytesStreamsTests extends ElasticsearchTestCase {
// we ignore this test for now since all existing callers of BytesStreamOutput happily
// call bytes() after close().
- @Ignore
+ @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/12620")
@Test
public void testAccessAfterClose() throws Exception {
BytesStreamOutput out = new BytesStreamOutput();
diff --git a/core/src/test/java/org/elasticsearch/common/joda/DateMathParserTests.java b/core/src/test/java/org/elasticsearch/common/joda/DateMathParserTests.java
index 359e418bb6a..6a1f146046d 100644
--- a/core/src/test/java/org/elasticsearch/common/joda/DateMathParserTests.java
+++ b/core/src/test/java/org/elasticsearch/common/joda/DateMathParserTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.joda;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.ExceptionsHelper;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.DateTimeZone;
import org.junit.Test;
@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static org.hamcrest.Matchers.equalTo;
-public class DateMathParserTests extends ElasticsearchTestCase {
+public class DateMathParserTests extends ESTestCase {
FormatDateTimeFormatter formatter = Joda.forPattern("dateOptionalTime||epoch_millis");
DateMathParser parser = new DateMathParser(formatter);
diff --git a/core/src/test/java/org/elasticsearch/common/logging/jdk/JDKESLoggerTests.java b/core/src/test/java/org/elasticsearch/common/logging/jdk/JDKESLoggerTests.java
index d236ad5ecf8..748994da9f4 100644
--- a/core/src/test/java/org/elasticsearch/common/logging/jdk/JDKESLoggerTests.java
+++ b/core/src/test/java/org/elasticsearch/common/logging/jdk/JDKESLoggerTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.logging.jdk;
import org.elasticsearch.common.logging.ESLogger;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -33,7 +33,7 @@ import java.util.logging.Logger;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class JDKESLoggerTests extends ElasticsearchTestCase {
+public class JDKESLoggerTests extends ESTestCase {
private ESLogger esTestLogger;
private TestHandler testHandler;
diff --git a/core/src/test/java/org/elasticsearch/common/logging/log4j/Log4jESLoggerTests.java b/core/src/test/java/org/elasticsearch/common/logging/log4j/Log4jESLoggerTests.java
index f0d0c076eba..c1bdf00bd3c 100644
--- a/core/src/test/java/org/elasticsearch/common/logging/log4j/Log4jESLoggerTests.java
+++ b/core/src/test/java/org/elasticsearch/common/logging/log4j/Log4jESLoggerTests.java
@@ -27,7 +27,7 @@ import org.apache.log4j.spi.LoggingEvent;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Test;
@@ -38,7 +38,7 @@ import java.util.List;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class Log4jESLoggerTests extends ElasticsearchTestCase {
+public class Log4jESLoggerTests extends ESTestCase {
private ESLogger esTestLogger;
private TestAppender testAppender;
diff --git a/core/src/test/java/org/elasticsearch/common/logging/log4j/LoggingConfigurationTests.java b/core/src/test/java/org/elasticsearch/common/logging/log4j/LoggingConfigurationTests.java
index 4997ea6974c..6515432c1a7 100644
--- a/core/src/test/java/org/elasticsearch/common/logging/log4j/LoggingConfigurationTests.java
+++ b/core/src/test/java/org/elasticsearch/common/logging/log4j/LoggingConfigurationTests.java
@@ -24,7 +24,7 @@ import org.apache.log4j.Logger;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class LoggingConfigurationTests extends ElasticsearchTestCase {
+public class LoggingConfigurationTests extends ESTestCase {
@Before
public void before() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/IndexCacheableQueryTests.java b/core/src/test/java/org/elasticsearch/common/lucene/IndexCacheableQueryTests.java
index 330689d1c46..70a2a2c6018 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/IndexCacheableQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/IndexCacheableQueryTests.java
@@ -36,12 +36,12 @@ import org.apache.lucene.search.Weight;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.Version;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.Set;
-public class IndexCacheableQueryTests extends ElasticsearchTestCase {
+public class IndexCacheableQueryTests extends ESTestCase {
static class DummyIndexCacheableQuery extends IndexCacheableQuery {
@Override
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/LuceneTest.java b/core/src/test/java/org/elasticsearch/common/lucene/LuceneTest.java
index 85852cf9f91..8418befe54a 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/LuceneTest.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/LuceneTest.java
@@ -26,7 +26,7 @@ import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.util.Version;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
/**
*
*/
-public class LuceneTest extends ElasticsearchTestCase {
+public class LuceneTest extends ESTestCase {
/*
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/ShardCoreKeyMapTests.java b/core/src/test/java/org/elasticsearch/common/lucene/ShardCoreKeyMapTests.java
index f6873d0c075..61660f96742 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/ShardCoreKeyMapTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/ShardCoreKeyMapTests.java
@@ -27,7 +27,7 @@ import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.store.Directory;
import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.Arrays;
@@ -35,7 +35,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-public class ShardCoreKeyMapTests extends ElasticsearchTestCase {
+public class ShardCoreKeyMapTests extends ESTestCase {
public void testMissingShard() throws IOException {
try (Directory dir = newDirectory();
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/all/SimpleAllTests.java b/core/src/test/java/org/elasticsearch/common/lucene/all/SimpleAllTests.java
index 10661a5ec00..ccf657cf762 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/all/SimpleAllTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/all/SimpleAllTests.java
@@ -34,7 +34,7 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.BytesRef;
import org.elasticsearch.common.lucene.Lucene;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class SimpleAllTests extends ElasticsearchTestCase {
+public class SimpleAllTests extends ESTestCase {
@Test
public void testBoostOnEagerTokenizer() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/index/ElasticsearchDirectoryReaderTests.java b/core/src/test/java/org/elasticsearch/common/lucene/index/ESDirectoryReaderTests.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/common/lucene/index/ElasticsearchDirectoryReaderTests.java
rename to core/src/test/java/org/elasticsearch/common/lucene/index/ESDirectoryReaderTests.java
index 934dd8d6c44..0307a3806c9 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/index/ElasticsearchDirectoryReaderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/index/ESDirectoryReaderTests.java
@@ -31,10 +31,10 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
/** Simple tests for this filterreader */
-public class ElasticsearchDirectoryReaderTests extends ElasticsearchTestCase {
+public class ESDirectoryReaderTests extends ESTestCase {
/** Test that core cache key (needed for NRT) is working */
public void testCoreCacheKey() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java b/core/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java
index 840ebd8e9b8..49ca12e0f84 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/index/FreqTermsEnumTests.java
@@ -44,7 +44,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.common.lucene.search.Queries;
import org.elasticsearch.common.util.BigArrays;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -55,18 +55,13 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import static com.carrotsearch.randomizedtesting.RandomizedTest.frequently;
-import static com.carrotsearch.randomizedtesting.RandomizedTest.getRandom;
-import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiOfLength;
-import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean;
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt;
-import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
/**
*/
-public class FreqTermsEnumTests extends ElasticsearchTestCase {
+public class FreqTermsEnumTests extends ESTestCase {
private String[] terms;
private IndexWriter iw;
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQueryTests.java b/core/src/test/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQueryTests.java
index 14e688d5741..d4fff53f27b 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/search/MultiPhrasePrefixQueryTests.java
@@ -26,13 +26,13 @@ import org.apache.lucene.index.*;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.lucene.Lucene;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
-public class MultiPhrasePrefixQueryTests extends ElasticsearchTestCase {
+public class MultiPhrasePrefixQueryTests extends ESTestCase {
@Test
public void simpleTests() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java b/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
index 2ae7df16bc6..4b0c939edf0 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunctionTests.java
@@ -25,14 +25,14 @@ import org.elasticsearch.script.LeafSearchScript;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptException;
import org.elasticsearch.script.SearchScript;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
-public class ScriptScoreFunctionTests extends ElasticsearchTestCase {
+public class ScriptScoreFunctionTests extends ESTestCase {
/**
* Tests https://github.com/elasticsearch/elasticsearch/issues/2426
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/MoreLikeThisQueryTests.java b/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/MoreLikeThisQueryTests.java
index d18d7ff3498..5db7e7e9b36 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/MoreLikeThisQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/MoreLikeThisQueryTests.java
@@ -31,7 +31,7 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.lucene.search.MoreLikeThisQuery;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class MoreLikeThisQueryTests extends ElasticsearchTestCase {
+public class MoreLikeThisQueryTests extends ESTestCase {
@Test
public void testSimple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/XMoreLikeThisTests.java b/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/XMoreLikeThisTests.java
index cafa2ef9eee..29d794ad599 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/XMoreLikeThisTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/search/morelikethis/XMoreLikeThisTests.java
@@ -31,7 +31,7 @@ import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.Directory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -39,7 +39,7 @@ import java.io.StringReader;
import java.util.Arrays;
import java.util.List;
-public class XMoreLikeThisTests extends ElasticsearchTestCase {
+public class XMoreLikeThisTests extends ESTestCase {
private void addDoc(RandomIndexWriter writer, String[] texts) throws IOException {
Document doc = new Document();
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/store/ByteArrayIndexInputTests.java b/core/src/test/java/org/elasticsearch/common/lucene/store/ByteArrayIndexInputTests.java
index 0a8492fb7b3..3966974d682 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/store/ByteArrayIndexInputTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/store/ByteArrayIndexInputTests.java
@@ -21,14 +21,14 @@ package org.elasticsearch.common.lucene.store;
import com.google.common.base.Charsets;
import org.apache.lucene.store.IndexInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
import static org.hamcrest.Matchers.containsString;
-public class ByteArrayIndexInputTests extends ElasticsearchTestCase {
+public class ByteArrayIndexInputTests extends ESTestCase {
@Test
public void testRandomReads() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/store/InputStreamIndexInputTests.java b/core/src/test/java/org/elasticsearch/common/lucene/store/InputStreamIndexInputTests.java
index 315b93edd27..e8540d3cbaa 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/store/InputStreamIndexInputTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/store/InputStreamIndexInputTests.java
@@ -23,7 +23,7 @@ import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.RAMDirectory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.lessThan;
/**
*
*/
-public class InputStreamIndexInputTests extends ElasticsearchTestCase {
+public class InputStreamIndexInputTests extends ESTestCase {
@Test
public void testSingleReadSingleByteLimit() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java b/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java
index b29c078d78e..290af55df4b 100644
--- a/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/lucene/uid/VersionsTests.java
@@ -35,7 +35,7 @@ import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.index.mapper.internal.UidFieldMapper;
import org.elasticsearch.index.mapper.internal.VersionFieldMapper;
import org.elasticsearch.index.shard.ElasticsearchMergePolicy;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -46,7 +46,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class VersionsTests extends ElasticsearchTestCase {
+public class VersionsTests extends ESTestCase {
public static DirectoryReader reopen(DirectoryReader reader) throws IOException {
return reopen(reader, true);
diff --git a/core/src/test/java/org/elasticsearch/common/math/MathUtilsTests.java b/core/src/test/java/org/elasticsearch/common/math/MathUtilsTests.java
index f0daca4b17f..85fd28da68e 100644
--- a/core/src/test/java/org/elasticsearch/common/math/MathUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/math/MathUtilsTests.java
@@ -19,10 +19,10 @@
package org.elasticsearch.common.math;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
-public class MathUtilsTests extends ElasticsearchTestCase {
+public class MathUtilsTests extends ESTestCase {
@Test
public void mod() {
diff --git a/core/src/test/java/org/elasticsearch/common/path/PathTrieTests.java b/core/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
index 3151352c1ee..1fbf76df367 100644
--- a/core/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
+++ b/core/src/test/java/org/elasticsearch/common/path/PathTrieTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.path;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class PathTrieTests extends ElasticsearchTestCase {
+public class PathTrieTests extends ESTestCase {
@Test
public void testPath() {
diff --git a/core/src/test/java/org/elasticsearch/common/property/PropertyPlaceholderTest.java b/core/src/test/java/org/elasticsearch/common/property/PropertyPlaceholderTest.java
index 3e4d3fffece..0c4ea861448 100644
--- a/core/src/test/java/org/elasticsearch/common/property/PropertyPlaceholderTest.java
+++ b/core/src/test/java/org/elasticsearch/common/property/PropertyPlaceholderTest.java
@@ -19,13 +19,13 @@
package org.elasticsearch.common.property;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.LinkedHashMap;
import java.util.Map;
-public class PropertyPlaceholderTest extends ElasticsearchTestCase {
+public class PropertyPlaceholderTest extends ESTestCase {
@Test
public void testSimple() {
diff --git a/core/src/test/java/org/elasticsearch/common/recycler/AbstractRecyclerTests.java b/core/src/test/java/org/elasticsearch/common/recycler/AbstractRecyclerTests.java
index 60d161b4121..39376441d2b 100644
--- a/core/src/test/java/org/elasticsearch/common/recycler/AbstractRecyclerTests.java
+++ b/core/src/test/java/org/elasticsearch/common/recycler/AbstractRecyclerTests.java
@@ -20,13 +20,13 @@
package org.elasticsearch.common.recycler;
import org.elasticsearch.common.recycler.Recycler.V;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-public abstract class AbstractRecyclerTests extends ElasticsearchTestCase {
+public abstract class AbstractRecyclerTests extends ESTestCase {
// marker states for data
protected static final byte FRESH = 1;
diff --git a/core/src/test/java/org/elasticsearch/common/regex/RegexTests.java b/core/src/test/java/org/elasticsearch/common/regex/RegexTests.java
index 380bf90ad5f..18ff2c1d002 100644
--- a/core/src/test/java/org/elasticsearch/common/regex/RegexTests.java
+++ b/core/src/test/java/org/elasticsearch/common/regex/RegexTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.regex;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Random;
@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
import static org.hamcrest.Matchers.equalTo;
-public class RegexTests extends ElasticsearchTestCase {
+public class RegexTests extends ESTestCase {
@Test
public void testFlags() {
diff --git a/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java b/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java
index 6846c408cbd..b3a2cea2121 100644
--- a/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java
+++ b/core/src/test/java/org/elasticsearch/common/rounding/RoundingTests.java
@@ -19,14 +19,14 @@
package org.elasticsearch.common.rounding;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
-public class RoundingTests extends ElasticsearchTestCase {
+public class RoundingTests extends ESTestCase {
/**
* simple test case to illustrate how Rounding.Interval works on readable input
diff --git a/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java b/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java
index 0a6d8f980d3..4e42c68aade 100644
--- a/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java
+++ b/core/src/test/java/org/elasticsearch/common/rounding/TimeZoneRoundingTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.rounding;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.ISODateTimeFormat;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
*/
-public class TimeZoneRoundingTests extends ElasticsearchTestCase {
+public class TimeZoneRoundingTests extends ESTestCase {
final static DateTimeZone JERUSALEM_TIMEZONE = DateTimeZone.forID("Asia/Jerusalem");
diff --git a/core/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java b/core/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
index 7c138102979..a00c9af037d 100644
--- a/core/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
+++ b/core/src/test/java/org/elasticsearch/common/settings/SettingsFilterTests.java
@@ -20,16 +20,16 @@ package org.elasticsearch.common.settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.json.JsonXContent;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.FakeRestRequest;
import org.elasticsearch.rest.RestRequest;
-import org.elasticsearch.test.ElasticsearchTestCase;
import org.junit.Test;
import java.io.IOException;
import static org.hamcrest.CoreMatchers.equalTo;
-public class SettingsFilterTests extends ElasticsearchTestCase {
+public class SettingsFilterTests extends ESTestCase {
@Test
public void testAddingAndRemovingFilters() {
diff --git a/core/src/test/java/org/elasticsearch/common/settings/SettingsTests.java b/core/src/test/java/org/elasticsearch/common/settings/SettingsTests.java
index cf76a01ee0b..5e2a44a327e 100644
--- a/core/src/test/java/org/elasticsearch/common/settings/SettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/settings/SettingsTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.common.settings;
import org.elasticsearch.common.settings.bar.BarTestClass;
import org.elasticsearch.common.settings.foo.FooTestClass;
import org.elasticsearch.common.settings.loader.YamlSettingsLoader;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class SettingsTests extends ElasticsearchTestCase {
+public class SettingsTests extends ESTestCase {
@Test
public void testCamelCaseSupport() {
diff --git a/core/src/test/java/org/elasticsearch/common/settings/loader/JsonSettingsLoaderTests.java b/core/src/test/java/org/elasticsearch/common/settings/loader/JsonSettingsLoaderTests.java
index 5d492a6d6ac..f4604d28d1a 100644
--- a/core/src/test/java/org/elasticsearch/common/settings/loader/JsonSettingsLoaderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/settings/loader/JsonSettingsLoaderTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.settings.loader;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class JsonSettingsLoaderTests extends ElasticsearchTestCase {
+public class JsonSettingsLoaderTests extends ESTestCase {
@Test
public void testSimpleJsonSettings() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/settings/loader/YamlSettingsLoaderTests.java b/core/src/test/java/org/elasticsearch/common/settings/loader/YamlSettingsLoaderTests.java
index 0ad737cb701..e43f5e7f2aa 100644
--- a/core/src/test/java/org/elasticsearch/common/settings/loader/YamlSettingsLoaderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/settings/loader/YamlSettingsLoaderTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.settings.loader;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class YamlSettingsLoaderTests extends ElasticsearchTestCase {
+public class YamlSettingsLoaderTests extends ESTestCase {
@Test
public void testSimpleYamlSettings() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/ByteSizeUnitTests.java b/core/src/test/java/org/elasticsearch/common/unit/ByteSizeUnitTests.java
index 8b39e4eecb0..5e8a55a3471 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/ByteSizeUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/ByteSizeUnitTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.unit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.unit.ByteSizeUnit.*;
@@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class ByteSizeUnitTests extends ElasticsearchTestCase {
+public class ByteSizeUnitTests extends ESTestCase {
@Test
public void testBytes() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/ByteSizeValueTests.java b/core/src/test/java/org/elasticsearch/common/unit/ByteSizeValueTests.java
index ebbd71132e7..362fd0dfc72 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/ByteSizeValueTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/ByteSizeValueTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.unit;
import org.elasticsearch.ElasticsearchParseException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class ByteSizeValueTests extends ElasticsearchTestCase {
+public class ByteSizeValueTests extends ESTestCase {
@Test
public void testActualPeta() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/DistanceUnitTests.java b/core/src/test/java/org/elasticsearch/common/unit/DistanceUnitTests.java
index f6748da3bc5..e29cd1e6862 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/DistanceUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/DistanceUnitTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.unit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.closeTo;
@@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class DistanceUnitTests extends ElasticsearchTestCase {
+public class DistanceUnitTests extends ESTestCase {
@Test
public void testSimpleDistanceUnit() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/FuzzinessTests.java b/core/src/test/java/org/elasticsearch/common/unit/FuzzinessTests.java
index dc3c66b4e83..234e341f4c9 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/FuzzinessTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/FuzzinessTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.unit;
import org.elasticsearch.common.xcontent.XContent;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -30,7 +30,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.number.IsCloseTo.closeTo;
-public class FuzzinessTests extends ElasticsearchTestCase {
+public class FuzzinessTests extends ESTestCase {
@Test
public void testNumerics() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/RatioValueTests.java b/core/src/test/java/org/elasticsearch/common/unit/RatioValueTests.java
index d9a04726e4a..b9ac8e52875 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/RatioValueTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/RatioValueTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.unit;
import org.elasticsearch.ElasticsearchParseException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
@@ -28,7 +28,7 @@ import static org.hamcrest.Matchers.is;
/**
* Tests for the {@link RatioValue} class
*/
-public class RatioValueTests extends ElasticsearchTestCase {
+public class RatioValueTests extends ESTestCase {
@Test
public void testParsing() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/SizeValueTests.java b/core/src/test/java/org/elasticsearch/common/unit/SizeValueTests.java
index 5e0ab4f3b08..c1595acf581 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/SizeValueTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/SizeValueTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.common.unit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
@@ -26,7 +26,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class SizeValueTests extends ElasticsearchTestCase {
+public class SizeValueTests extends ESTestCase {
@Test
public void testThatConversionWorks() {
diff --git a/core/src/test/java/org/elasticsearch/common/unit/TimeValueTests.java b/core/src/test/java/org/elasticsearch/common/unit/TimeValueTests.java
index b901f1f3931..19738bc28dd 100644
--- a/core/src/test/java/org/elasticsearch/common/unit/TimeValueTests.java
+++ b/core/src/test/java/org/elasticsearch/common/unit/TimeValueTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.common.unit;
import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.PeriodType;
import org.junit.Test;
@@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.lessThan;
-public class TimeValueTests extends ElasticsearchTestCase {
+public class TimeValueTests extends ESTestCase {
public void testSimple() {
assertThat(TimeUnit.MILLISECONDS.toMillis(10), equalTo(new TimeValue(10, TimeUnit.MILLISECONDS).millis()));
diff --git a/core/src/test/java/org/elasticsearch/common/util/ArrayUtilsTests.java b/core/src/test/java/org/elasticsearch/common/util/ArrayUtilsTests.java
index f85ab890214..0c7038e8cd1 100644
--- a/core/src/test/java/org/elasticsearch/common/util/ArrayUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/ArrayUtilsTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.util;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class ArrayUtilsTests extends ElasticsearchTestCase {
+public class ArrayUtilsTests extends ESTestCase {
@Test
public void binarySearch() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/util/BigArraysTests.java b/core/src/test/java/org/elasticsearch/common/util/BigArraysTests.java
index 3dd8e65cd0c..01fae517c3d 100644
--- a/core/src/test/java/org/elasticsearch/common/util/BigArraysTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/BigArraysTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.cache.recycler.MockBigArrays;
import org.junit.Before;
@@ -36,10 +36,10 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
-public class BigArraysTests extends ElasticsearchSingleNodeTest {
+public class BigArraysTests extends ESSingleNodeTestCase {
public static BigArrays randombigArrays() {
- final PageCacheRecycler recycler = randomBoolean() ? null : ElasticsearchSingleNodeTest.getInstanceFromNode(PageCacheRecycler.class);
+ final PageCacheRecycler recycler = randomBoolean() ? null : ESSingleNodeTestCase.getInstanceFromNode(PageCacheRecycler.class);
return new MockBigArrays(recycler, new NoneCircuitBreakerService());
}
diff --git a/core/src/test/java/org/elasticsearch/common/util/ByteUtilsTests.java b/core/src/test/java/org/elasticsearch/common/util/ByteUtilsTests.java
index 729033bdd6f..0df125e5724 100644
--- a/core/src/test/java/org/elasticsearch/common/util/ByteUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/ByteUtilsTests.java
@@ -21,11 +21,11 @@ package org.elasticsearch.common.util;
import org.apache.lucene.store.ByteArrayDataInput;
import org.apache.lucene.store.ByteArrayDataOutput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
-public class ByteUtilsTests extends ElasticsearchTestCase {
+public class ByteUtilsTests extends ESTestCase {
public void testZigZag(long l) {
assertEquals(l, ByteUtils.zigZagDecode(ByteUtils.zigZagEncode(l)));
diff --git a/core/src/test/java/org/elasticsearch/common/util/BytesRefHashTests.java b/core/src/test/java/org/elasticsearch/common/util/BytesRefHashTests.java
index e7d98db5c59..91c74762dff 100644
--- a/core/src/test/java/org/elasticsearch/common/util/BytesRefHashTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/BytesRefHashTests.java
@@ -25,13 +25,13 @@ import com.carrotsearch.hppc.cursors.ObjectLongCursor;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.TestUtil;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.*;
import java.util.Map.Entry;
-public class BytesRefHashTests extends ElasticsearchSingleNodeTest {
+public class BytesRefHashTests extends ESSingleNodeTestCase {
BytesRefHash hash;
diff --git a/core/src/test/java/org/elasticsearch/common/util/CancellableThreadsTest.java b/core/src/test/java/org/elasticsearch/common/util/CancellableThreadsTest.java
index d2cacb9c49e..85dd1c14b36 100644
--- a/core/src/test/java/org/elasticsearch/common/util/CancellableThreadsTest.java
+++ b/core/src/test/java/org/elasticsearch/common/util/CancellableThreadsTest.java
@@ -19,13 +19,13 @@
package org.elasticsearch.common.util;
import org.elasticsearch.common.util.CancellableThreads.Interruptable;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
-public class CancellableThreadsTest extends ElasticsearchTestCase {
+public class CancellableThreadsTest extends ESTestCase {
public static class CustomException extends RuntimeException {
diff --git a/core/src/test/java/org/elasticsearch/common/util/CollectionUtilsTests.java b/core/src/test/java/org/elasticsearch/common/util/CollectionUtilsTests.java
index 14b77df40a2..09c4b800568 100644
--- a/core/src/test/java/org/elasticsearch/common/util/CollectionUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/CollectionUtilsTests.java
@@ -25,7 +25,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefArray;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.Counter;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.*;
@@ -33,7 +33,7 @@ import java.util.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-public class CollectionUtilsTests extends ElasticsearchTestCase {
+public class CollectionUtilsTests extends ESTestCase {
@Test
public void rotateEmpty() {
diff --git a/core/src/test/java/org/elasticsearch/common/util/LongHashTests.java b/core/src/test/java/org/elasticsearch/common/util/LongHashTests.java
index d35a6f14163..09221b5151f 100644
--- a/core/src/test/java/org/elasticsearch/common/util/LongHashTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/LongHashTests.java
@@ -22,12 +22,12 @@ package org.elasticsearch.common.util;
import com.carrotsearch.hppc.LongLongHashMap;
import com.carrotsearch.hppc.LongLongMap;
import com.carrotsearch.hppc.cursors.LongLongCursor;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.*;
-public class LongHashTests extends ElasticsearchSingleNodeTest {
+public class LongHashTests extends ESSingleNodeTestCase {
LongHash hash;
diff --git a/core/src/test/java/org/elasticsearch/common/util/LongObjectHashMapTests.java b/core/src/test/java/org/elasticsearch/common/util/LongObjectHashMapTests.java
index fae90cd395b..2036535a610 100644
--- a/core/src/test/java/org/elasticsearch/common/util/LongObjectHashMapTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/LongObjectHashMapTests.java
@@ -20,10 +20,10 @@
package org.elasticsearch.common.util;
import com.carrotsearch.hppc.LongObjectHashMap;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
-public class LongObjectHashMapTests extends ElasticsearchSingleNodeTest {
+public class LongObjectHashMapTests extends ESSingleNodeTestCase {
@Test
public void duel() {
diff --git a/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java b/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java
index 343d7e30418..fc05a79423d 100644
--- a/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java
@@ -18,13 +18,12 @@
*/
package org.elasticsearch.common.util;
-import com.carrotsearch.randomizedtesting.annotations.Repeat;
import com.google.common.base.Charsets;
import com.google.common.collect.Sets;
import org.apache.lucene.util.CollectionUtil;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
-import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityTests;
+import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityIT;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.collect.Tuple;
@@ -34,7 +33,7 @@ import org.elasticsearch.gateway.MetaDataStateFormat;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.shard.ShardPath;
import org.elasticsearch.index.shard.ShardStateMetaData;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.BufferedWriter;
import java.io.IOException;
@@ -46,7 +45,7 @@ import java.util.*;
/**
*/
@LuceneTestCase.SuppressFileSystems("ExtrasFS")
-public class MultiDataPathUpgraderTests extends ElasticsearchTestCase {
+public class MultiDataPathUpgraderTests extends ESTestCase {
public void testUpgradeRandomPaths() throws IOException {
try (NodeEnvironment nodeEnvironment = newNodeEnvironment()) {
@@ -134,7 +133,7 @@ public class MultiDataPathUpgraderTests extends ElasticsearchTestCase {
*/
public void testUpgradeRealIndex() throws IOException, URISyntaxException {
List indexes = new ArrayList<>();
- Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityTests.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
+ Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityIT.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
try (DirectoryStream stream = Files.newDirectoryStream(dir, "index-*.zip")) {
for (Path path : stream) {
indexes.add(path);
@@ -177,7 +176,7 @@ public class MultiDataPathUpgraderTests extends ElasticsearchTestCase {
multiDataPath[i++] = nodePath.indicesPath;
}
logger.info("--> injecting index [{}] into multiple data paths", indexName);
- OldIndexBackwardsCompatibilityTests.copyIndex(logger, src, indexName, multiDataPath);
+ OldIndexBackwardsCompatibilityIT.copyIndex(logger, src, indexName, multiDataPath);
final ShardPath shardPath = new ShardPath(nodeEnvironment.availableShardPaths(new ShardId(indexName, 0))[0], nodeEnvironment.availableShardPaths(new ShardId(indexName, 0))[0], IndexMetaData.INDEX_UUID_NA_VALUE, new ShardId(indexName, 0));
logger.info("{}", FileSystemUtils.files(shardPath.resolveIndex()));
diff --git a/core/src/test/java/org/elasticsearch/common/util/SingleObjectCacheTests.java b/core/src/test/java/org/elasticsearch/common/util/SingleObjectCacheTests.java
index de06302d28c..9f951440a0f 100644
--- a/core/src/test/java/org/elasticsearch/common/util/SingleObjectCacheTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/SingleObjectCacheTests.java
@@ -20,13 +20,13 @@
package org.elasticsearch.common.util;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-public class SingleObjectCacheTests extends ElasticsearchTestCase {
+public class SingleObjectCacheTests extends ESTestCase {
public void testRefresh() {
final AtomicInteger count = new AtomicInteger(0);
diff --git a/core/src/test/java/org/elasticsearch/common/util/URIPatternTests.java b/core/src/test/java/org/elasticsearch/common/util/URIPatternTests.java
index 5c4b2a7c701..4923a3ea979 100644
--- a/core/src/test/java/org/elasticsearch/common/util/URIPatternTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/URIPatternTests.java
@@ -18,12 +18,12 @@
*/
package org.elasticsearch.common.util;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.net.URI;
-public class URIPatternTests extends ElasticsearchTestCase {
+public class URIPatternTests extends ESTestCase {
@Test
public void testURIPattern() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/util/concurrent/CountDownTest.java b/core/src/test/java/org/elasticsearch/common/util/concurrent/CountDownTest.java
index 24d89824c32..52fe7247257 100644
--- a/core/src/test/java/org/elasticsearch/common/util/concurrent/CountDownTest.java
+++ b/core/src/test/java/org/elasticsearch/common/util/concurrent/CountDownTest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.util.concurrent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-public class CountDownTest extends ElasticsearchTestCase {
+public class CountDownTest extends ESTestCase {
@Test
public void testConcurrent() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/common/util/concurrent/EsExecutorsTests.java b/core/src/test/java/org/elasticsearch/common/util/concurrent/EsExecutorsTests.java
index 9e056838363..eabac31974c 100644
--- a/core/src/test/java/org/elasticsearch/common/util/concurrent/EsExecutorsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/concurrent/EsExecutorsTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.util.concurrent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
@@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.lessThan;
/**
*/
-public class EsExecutorsTests extends ElasticsearchTestCase {
+public class EsExecutorsTests extends ESTestCase {
private TimeUnit randomTimeUnit() {
return TimeUnit.values()[between(0, TimeUnit.values().length - 1)];
diff --git a/core/src/test/java/org/elasticsearch/common/util/concurrent/PrioritizedExecutorsTests.java b/core/src/test/java/org/elasticsearch/common/util/concurrent/PrioritizedExecutorsTests.java
index 1a2b577ab5d..0620f2f91be 100644
--- a/core/src/test/java/org/elasticsearch/common/util/concurrent/PrioritizedExecutorsTests.java
+++ b/core/src/test/java/org/elasticsearch/common/util/concurrent/PrioritizedExecutorsTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.util.concurrent;
import com.google.common.collect.Lists;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class PrioritizedExecutorsTests extends ElasticsearchTestCase {
+public class PrioritizedExecutorsTests extends ESTestCase {
@Test
public void testPriorityQueue() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/util/concurrent/RefCountedTest.java b/core/src/test/java/org/elasticsearch/common/util/concurrent/RefCountedTest.java
index 3ff0767fa44..1301c9efcb4 100644
--- a/core/src/test/java/org/elasticsearch/common/util/concurrent/RefCountedTest.java
+++ b/core/src/test/java/org/elasticsearch/common/util/concurrent/RefCountedTest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.common.util.concurrent;
import org.apache.lucene.store.AlreadyClosedException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
-public class RefCountedTest extends ElasticsearchTestCase {
+public class RefCountedTest extends ESTestCase {
@Test
public void testRefCount() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
index f3d89e86ca9..0f803509bc5 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/XContentFactoryTests.java
@@ -23,7 +23,7 @@ import com.fasterxml.jackson.dataformat.cbor.CBORConstants;
import com.fasterxml.jackson.dataformat.smile.SmileConstants;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.ByteArrayInputStream;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class XContentFactoryTests extends ElasticsearchTestCase {
+public class XContentFactoryTests extends ESTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/builder/BuilderRawFieldTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/builder/BuilderRawFieldTests.java
index d1f90ced81f..9cfedcc1cf5 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/builder/BuilderRawFieldTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/builder/BuilderRawFieldTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class BuilderRawFieldTests extends ElasticsearchTestCase {
+public class BuilderRawFieldTests extends ESTestCase {
@Test
public void testJsonRawField() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/builder/XContentBuilderTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/builder/XContentBuilderTests.java
index ec76100c9b4..d273f7c22b6 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/builder/XContentBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/builder/XContentBuilderTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.io.FastCharArrayWriter;
import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.xcontent.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class XContentBuilderTests extends ElasticsearchTestCase {
+public class XContentBuilderTests extends ESTestCase {
@Test
public void testPrettyWithLfAtEnd() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/cbor/CborXContentParserTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/cbor/CborXContentParserTests.java
index 4bc093ff95a..20e4d4163bf 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/cbor/CborXContentParserTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/cbor/CborXContentParserTests.java
@@ -23,12 +23,12 @@ import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
-public class CborXContentParserTests extends ElasticsearchTestCase {
+public class CborXContentParserTests extends ESTestCase {
@Test
public void testEmptyValue() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/cbor/JsonVsCborTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/cbor/JsonVsCborTests.java
index bda1c31a3f3..903914bc5fe 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/cbor/JsonVsCborTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/cbor/JsonVsCborTests.java
@@ -19,19 +19,14 @@
package org.elasticsearch.common.xcontent.cbor;
-import com.fasterxml.jackson.core.JsonFactory;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.dataformat.cbor.CBORFactory;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentGenerator;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
@@ -40,7 +35,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class JsonVsCborTests extends ElasticsearchTestCase {
+public class JsonVsCborTests extends ESTestCase {
@Test
public void compareParsingTokens() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/smile/JsonVsSmileTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/smile/JsonVsSmileTests.java
index 0a57adf8d3b..e1a89ff242f 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/smile/JsonVsSmileTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/smile/JsonVsSmileTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentGenerator;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class JsonVsSmileTests extends ElasticsearchTestCase {
+public class JsonVsSmileTests extends ESTestCase {
// @Test public void testBinarySmileField() throws Exception {
// JsonGenerator gen = new SmileFactory().createJsonGenerator(new ByteArrayOutputStream());
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentHelperTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentHelperTests.java
index a66cb2086f4..067c5538281 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentHelperTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentHelperTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.common.xcontent.support;
import org.elasticsearch.common.xcontent.XContentHelper;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -29,7 +29,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class XContentHelperTests extends ElasticsearchTestCase {
+public class XContentHelperTests extends ESTestCase {
Map getMap(Object... keyValues) {
Map map = new HashMap<>();
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java
index 2e3e7b6569e..ba34812a647 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -44,7 +44,7 @@ import static org.hamcrest.core.IsEqual.equalTo;
/**
*/
-public class XContentMapValuesTests extends ElasticsearchTestCase {
+public class XContentMapValuesTests extends ESTestCase {
@Test
public void testFilter() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/common/xcontent/support/filtering/AbstractFilteringJsonGeneratorTests.java b/core/src/test/java/org/elasticsearch/common/xcontent/support/filtering/AbstractFilteringJsonGeneratorTests.java
index d07bf442887..5ef19bdaf39 100644
--- a/core/src/test/java/org/elasticsearch/common/xcontent/support/filtering/AbstractFilteringJsonGeneratorTests.java
+++ b/core/src/test/java/org/elasticsearch/common/xcontent/support/filtering/AbstractFilteringJsonGeneratorTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.common.xcontent.support.filtering;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.ByteArrayInputStream;
@@ -31,7 +31,7 @@ import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public abstract class AbstractFilteringJsonGeneratorTests extends ElasticsearchTestCase {
+public abstract class AbstractFilteringJsonGeneratorTests extends ESTestCase {
protected abstract XContentType getXContentType();
diff --git a/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelTests.java b/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelTests.java
rename to core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java
index 5019f6eaee7..50637cb801a 100644
--- a/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelTests.java
+++ b/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class WriteConsistencyLevelTests extends ElasticsearchIntegrationTest {
+public class WriteConsistencyLevelIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/count/simple/SimpleCountTests.java b/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/count/simple/SimpleCountTests.java
rename to core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java
index 59b38b1cf3b..344abee3da7 100644
--- a/core/src/test/java/org/elasticsearch/count/simple/SimpleCountTests.java
+++ b/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.is;
-public class SimpleCountTests extends ElasticsearchIntegrationTest {
+public class SimpleCountIT extends ESIntegTestCase {
@Test
public void testCountRandomPreference() throws InterruptedException, ExecutionException {
diff --git a/core/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java b/core/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java
index 2ba71a4012c..92e68cec436 100644
--- a/core/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java
+++ b/core/src/test/java/org/elasticsearch/deps/jackson/JacksonLocationTests.java
@@ -24,7 +24,7 @@ import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class JacksonLocationTests extends ElasticsearchTestCase {
+public class JacksonLocationTests extends ESTestCase {
@Test
public void testLocationExtraction() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java b/core/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java
index 21c16d81b4a..b1bddc1c549 100644
--- a/core/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java
+++ b/core/src/test/java/org/elasticsearch/deps/joda/SimpleJodaTests.java
@@ -22,11 +22,9 @@ package org.elasticsearch.deps.joda;
import org.elasticsearch.common.joda.FormatDateTimeFormatter;
import org.elasticsearch.common.joda.Joda;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.index.mapper.core.DateFieldMapper;
import org.elasticsearch.index.mapper.object.RootObjectMapper;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.joda.time.DateTime;
-import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;
import org.joda.time.MutableDateTime;
@@ -41,7 +39,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class SimpleJodaTests extends ElasticsearchTestCase {
+public class SimpleJodaTests extends ESTestCase {
@Test
public void testMultiParsers() {
diff --git a/core/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java b/core/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java
index 5929c7b5512..d410c86890a 100644
--- a/core/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java
+++ b/core/src/test/java/org/elasticsearch/deps/lucene/SimpleLuceneTests.java
@@ -28,7 +28,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.NumericUtils;
import org.elasticsearch.common.lucene.Lucene;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class SimpleLuceneTests extends ElasticsearchTestCase {
+public class SimpleLuceneTests extends ESTestCase {
@Test
public void testSortValues() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java b/core/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java
index f3b2944a497..0e0ff0f84e5 100644
--- a/core/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java
+++ b/core/src/test/java/org/elasticsearch/deps/lucene/VectorHighlighterTests.java
@@ -29,7 +29,7 @@ import org.apache.lucene.search.vectorhighlight.FastVectorHighlighter;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.lucene.Lucene;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class VectorHighlighterTests extends ElasticsearchTestCase {
+public class VectorHighlighterTests extends ESTestCase {
@Test
public void testVectorHighlighter() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandlerTests.java b/core/src/test/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandlerTests.java
index a4de39bc979..1332a4fb13a 100644
--- a/core/src/test/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandlerTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/BlockingClusterStatePublishResponseHandlerTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Arrays;
import java.util.HashSet;
@@ -33,7 +33,7 @@ import java.util.concurrent.CyclicBarrier;
import static org.hamcrest.Matchers.*;
-public class BlockingClusterStatePublishResponseHandlerTests extends ElasticsearchTestCase {
+public class BlockingClusterStatePublishResponseHandlerTests extends ESTestCase {
static private class PublishResponder extends AbstractRunnable {
diff --git a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsTests.java b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsTests.java
rename to core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java
index 8a758fe83d6..2db457c4084 100644
--- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java
@@ -48,7 +48,7 @@ import org.elasticsearch.discovery.zen.ping.ZenPing;
import org.elasticsearch.discovery.zen.ping.ZenPingService;
import org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing;
import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
import org.elasticsearch.test.disruption.*;
@@ -56,7 +56,6 @@ import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.*;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import java.io.IOException;
@@ -67,16 +66,13 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-/**
- */
-@LuceneTestCase.Slow
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
-public class DiscoveryWithServiceDisruptionsTests extends ElasticsearchIntegrationTest {
+public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
private static final TimeValue DISRUPTION_HEALING_OVERHEAD = TimeValue.timeValueSeconds(40); // we use 30s as timeout in many places.
@@ -975,7 +971,7 @@ public class DiscoveryWithServiceDisruptionsTests extends ElasticsearchIntegrati
}
// tests if indices are really deleted even if a master transition inbetween
- @Ignore("https://github.com/elastic/elasticsearch/issues/11665")
+ @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/11665")
@Test
public void testIndicesDeleted() throws Exception {
configureCluster(3, 2);
diff --git a/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java b/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java
index 5754ebb511d..a39b15468d9 100644
--- a/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.zen.fd.FaultDetection;
import org.elasticsearch.discovery.zen.fd.MasterFaultDetection;
import org.elasticsearch.discovery.zen.fd.NodesFaultDetection;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cluster.NoopClusterService;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.threadpool.ThreadPool;
@@ -47,7 +47,7 @@ import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.equalTo;
-public class ZenFaultDetectionTests extends ElasticsearchTestCase {
+public class ZenFaultDetectionTests extends ESTestCase {
protected ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java
rename to core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java
index dc925078567..891d538a679 100644
--- a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java
@@ -19,13 +19,12 @@
package org.elasticsearch.discovery;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.discovery.ClusterDiscoveryConfiguration;
import org.junit.Before;
import org.junit.Test;
@@ -36,8 +35,7 @@ import java.util.concurrent.ExecutionException;
import static org.hamcrest.Matchers.equalTo;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-@Slow
-public class ZenUnicastDiscoveryTests extends ElasticsearchIntegrationTest {
+public class ZenUnicastDiscoveryIT extends ESIntegTestCase {
private ClusterDiscoveryConfiguration discoveryConfig;
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ElectMasterServiceTest.java b/core/src/test/java/org/elasticsearch/discovery/zen/ElectMasterServiceTest.java
index 4552109bd4a..884d238827d 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ElectMasterServiceTest.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ElectMasterServiceTest.java
@@ -24,12 +24,12 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.*;
-public class ElectMasterServiceTest extends ElasticsearchTestCase {
+public class ElectMasterServiceTest extends ESTestCase {
ElectMasterService electMasterService() {
return new ElectMasterService(Settings.EMPTY, Version.CURRENT);
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/NodeJoinControllerTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/NodeJoinControllerTests.java
index 856ca6398a3..70c9430b531 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/NodeJoinControllerTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/NodeJoinControllerTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.common.util.concurrent.BaseFuture;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.discovery.zen.membership.MembershipAction;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cluster.TestClusterService;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Before;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
@TestLogging("discovery.zen:TRACE")
-public class NodeJoinControllerTests extends ElasticsearchTestCase {
+public class NodeJoinControllerTests extends ESTestCase {
private TestClusterService clusterService;
private NodeJoinController nodeJoinController;
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryTests.java
rename to core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java
index 851580f733a..943b0549a27 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.discovery.zen;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
@@ -39,10 +38,14 @@ import org.elasticsearch.discovery.zen.elect.ElectMasterService;
import org.elasticsearch.discovery.zen.fd.FaultDetection;
import org.elasticsearch.discovery.zen.membership.MembershipAction;
import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.threadpool.ThreadPool;
-import org.elasticsearch.transport.*;
+import org.elasticsearch.transport.BytesTransportRequest;
+import org.elasticsearch.transport.EmptyTransportResponseHandler;
+import org.elasticsearch.transport.TransportException;
+import org.elasticsearch.transport.TransportResponse;
+import org.elasticsearch.transport.TransportService;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -54,13 +57,16 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicReference;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.Matchers.sameInstance;
-/**
- */
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
-@Slow
-public class ZenDiscoveryTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
+public class ZenDiscoveryIT extends ESIntegTestCase {
@Test
public void testChangeRejoinOnMasterOptionIsDynamic() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryUnitTest.java b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryUnitTest.java
index bbd970c8b4a..cc6bc2b235c 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryUnitTest.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryUnitTest.java
@@ -22,7 +22,7 @@ package org.elasticsearch.discovery.zen;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.node.DiscoveryNodes;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Collections;
import java.util.LinkedList;
@@ -35,7 +35,7 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*/
-public class ZenDiscoveryUnitTest extends ElasticsearchTestCase {
+public class ZenDiscoveryUnitTest extends ESTestCase {
public void testShouldIgnoreNewClusterState() {
ClusterName clusterName = new ClusterName("abc");
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ZenPingTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/ZenPingTests.java
index 6ded8a9f950..e35f8d55c8f 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenPingTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ZenPingTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.discovery.zen.ping.ZenPing;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -32,7 +32,7 @@ import java.util.Collections;
import static org.hamcrest.Matchers.equalTo;
-public class ZenPingTests extends ElasticsearchTestCase {
+public class ZenPingTests extends ESTestCase {
@Test
public void testPingCollection() {
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java
rename to core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java
index 1663e811b11..00da8b1d54b 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.discovery.zen.ping.PingContextProvider;
import org.elasticsearch.discovery.zen.ping.ZenPing;
import org.elasticsearch.node.service.NodeService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.transport.local.LocalTransport;
@@ -44,10 +44,7 @@ import java.net.MulticastSocket;
import static org.hamcrest.Matchers.equalTo;
-/**
- *
- */
-public class MulticastZenPingTests extends ElasticsearchTestCase {
+public class MulticastZenPingIT extends ESTestCase {
private Settings buildRandomMulticast(Settings settings) {
Settings.Builder builder = Settings.builder().put(settings);
diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingTests.java b/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingTests.java
rename to core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java
index 8cdb76c682e..83d31450088 100644
--- a/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingTests.java
+++ b/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java
@@ -33,20 +33,15 @@ import org.elasticsearch.discovery.zen.elect.ElectMasterService;
import org.elasticsearch.discovery.zen.ping.PingContextProvider;
import org.elasticsearch.discovery.zen.ping.ZenPing;
import org.elasticsearch.node.service.NodeService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.transport.netty.NettyTransport;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-/**
- *
- */
-@Slow
-public class UnicastZenPingTests extends ElasticsearchTestCase {
+public class UnicastZenPingIT extends ESTestCase {
@Test
public void testSimplePings() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java b/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java
rename to core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java
index 8d757cd7d54..8d7a9bdca02 100644
--- a/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java
+++ b/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsIT.java
@@ -26,7 +26,7 @@ import static org.elasticsearch.client.Requests.createIndexRequest;
/**
*
*/
-public class AliasedIndexDocumentActionsTests extends DocumentActionsTests {
+public class AliasedIndexDocumentActionsIT extends DocumentActionsIT {
@Override
protected void createIndex() {
diff --git a/core/src/test/java/org/elasticsearch/document/BulkTests.java b/core/src/test/java/org/elasticsearch/document/BulkIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/document/BulkTests.java
rename to core/src/test/java/org/elasticsearch/document/BulkIT.java
index e4d3af7cdcc..3c13b3fe31e 100644
--- a/core/src/test/java/org/elasticsearch/document/BulkTests.java
+++ b/core/src/test/java/org/elasticsearch/document/BulkIT.java
@@ -44,7 +44,7 @@ import org.elasticsearch.index.VersionType;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class BulkTests extends ElasticsearchIntegrationTest {
+public class BulkIT extends ESIntegTestCase {
@Test
public void testBulkUpdate_simple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/document/DocumentActionsTests.java b/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/document/DocumentActionsTests.java
rename to core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java
index 47370c29314..dc64ffd2dea 100644
--- a/core/src/test/java/org/elasticsearch/document/DocumentActionsTests.java
+++ b/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class DocumentActionsTests extends ElasticsearchIntegrationTest {
+public class DocumentActionsIT extends ESIntegTestCase {
protected void createIndex() {
createIndex(getConcreteIndexName());
diff --git a/core/src/test/java/org/elasticsearch/document/ShardInfoTests.java b/core/src/test/java/org/elasticsearch/document/ShardInfoIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/document/ShardInfoTests.java
rename to core/src/test/java/org/elasticsearch/document/ShardInfoIT.java
index 3c587b9be08..f1c6d476eb5 100644
--- a/core/src/test/java/org/elasticsearch/document/ShardInfoTests.java
+++ b/core/src/test/java/org/elasticsearch/document/ShardInfoIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class ShardInfoTests extends ElasticsearchIntegrationTest {
+public class ShardInfoIT extends ESIntegTestCase {
private int numCopies;
private int numNodes;
diff --git a/core/src/test/java/org/elasticsearch/env/EnvironmentTests.java b/core/src/test/java/org/elasticsearch/env/EnvironmentTests.java
index a2ba2d39886..8535f0fd8f2 100644
--- a/core/src/test/java/org/elasticsearch/env/EnvironmentTests.java
+++ b/core/src/test/java/org/elasticsearch/env/EnvironmentTests.java
@@ -22,7 +22,7 @@ import com.google.common.base.Charsets;
import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.BufferedReader;
@@ -37,7 +37,7 @@ import static org.hamcrest.CoreMatchers.nullValue;
/**
* Simple unit-tests for Environment.java
*/
-public class EnvironmentTests extends ElasticsearchTestCase {
+public class EnvironmentTests extends ESTestCase {
public Environment newEnvironment() throws IOException {
return newEnvironment(Settings.EMPTY);
diff --git a/core/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java b/core/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java
index 1651966ea28..ea9d5232dd5 100644
--- a/core/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java
+++ b/core/src/test/java/org/elasticsearch/env/NodeEnvironmentTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -44,7 +44,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.CoreMatchers.equalTo;
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // TODO: fix test to allow extras
-public class NodeEnvironmentTests extends ElasticsearchTestCase {
+public class NodeEnvironmentTests extends ESTestCase {
private final Settings idxSettings = Settings.builder().put(SETTING_NUMBER_OF_SHARDS, 1).build();
diff --git a/core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java b/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java
rename to core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java
index 85280f06d69..3046a85be0e 100644
--- a/core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java
+++ b/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java
@@ -22,14 +22,14 @@ package org.elasticsearch.exists;
import org.elasticsearch.action.exists.ExistsResponse;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertExists;
-public class SimpleExistsTests extends ElasticsearchIntegrationTest {
+public class SimpleExistsIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/explain/ExplainActionTests.java b/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/explain/ExplainActionTests.java
rename to core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java
index 1f33c5a75bc..be998b18a2b 100644
--- a/core/src/test/java/org/elasticsearch/explain/ExplainActionTests.java
+++ b/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.mapper.internal.TimestampFieldMapper;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.ISODateTimeFormat;
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
-public class ExplainActionTests extends ElasticsearchIntegrationTest {
+public class ExplainActionIT extends ESIntegTestCase {
@Test
public void testSimple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationTests.java b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java
index d17c202f960..d3d1d8b46c1 100644
--- a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.fieldstats.FieldStats;
import org.elasticsearch.action.fieldstats.FieldStatsResponse;
import org.elasticsearch.action.fieldstats.IndexConstraint;
import org.elasticsearch.action.index.IndexRequestBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.List;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class FieldStatsIntegrationTests extends ElasticsearchIntegrationTest {
+public class FieldStatsIntegrationIT extends ESIntegTestCase {
public void testRandom() throws Exception {
assertAcked(prepareCreate("test").addMapping(
diff --git a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsTests.java b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsTests.java
index 68d136d1cb1..5db3130913c 100644
--- a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.fieldstats.FieldStats;
import org.elasticsearch.action.fieldstats.FieldStatsResponse;
import org.elasticsearch.action.fieldstats.IndexConstraint;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.ArrayList;
import java.util.List;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class FieldStatsTests extends ElasticsearchSingleNodeTest {
+public class FieldStatsTests extends ESSingleNodeTestCase {
public void testByte() {
testNumberRange("field1", "byte", 12, 18);
diff --git a/core/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java b/core/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java
index ece5757355b..fcada2d5f29 100644
--- a/core/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/AsyncShardFetchTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.After;
import org.junit.Before;
@@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*/
-public class AsyncShardFetchTests extends ElasticsearchTestCase {
+public class AsyncShardFetchTests extends ESTestCase {
private final DiscoveryNode node1 = new DiscoveryNode("node1", DummyTransportAddress.INSTANCE, Version.CURRENT);
private final Response response1 = new Response(node1);
diff --git a/core/src/test/java/org/elasticsearch/gateway/DanglingIndicesStateTests.java b/core/src/test/java/org/elasticsearch/gateway/DanglingIndicesStateTests.java
index 1983094dcc0..e9b0e4a89f1 100644
--- a/core/src/test/java/org/elasticsearch/gateway/DanglingIndicesStateTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/DanglingIndicesStateTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.index.Index;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.hasSize;
/**
*/
-public class DanglingIndicesStateTests extends ElasticsearchTestCase {
+public class DanglingIndicesStateTests extends ESTestCase {
private static Settings indexSettings = Settings.builder()
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
diff --git a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java
rename to core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java
index 186e05da604..8c6e7a1dbf4 100644
--- a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.gateway;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.action.get.GetResponse;
@@ -33,27 +32,23 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.indices.IndexClosedException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-/**
- *
- */
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-@Slow
-public class GatewayIndexStateTests extends ElasticsearchIntegrationTest {
+public class GatewayIndexStateIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(GatewayIndexStateTests.class);
+ private final ESLogger logger = Loggers.getLogger(GatewayIndexStateIT.class);
@Test
public void testMappingMetaDataParsed() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/gateway/GatewayMetaStateTests.java b/core/src/test/java/org/elasticsearch/gateway/GatewayMetaStateTests.java
index 594dee7c57f..22850e13cbe 100644
--- a/core/src/test/java/org/elasticsearch/gateway/GatewayMetaStateTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/GatewayMetaStateTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Test;
import java.util.*;
@@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.equalTo;
* - node is master eligible
* for data only nodes: shard initializing on shard
*/
-public class GatewayMetaStateTests extends ElasticsearchAllocationTestCase {
+public class GatewayMetaStateTests extends ESAllocationTestCase {
ClusterChangedEvent generateEvent(boolean initializing, boolean versionChanged, boolean masterEligible) {
//ridiculous settings to make sure we don't run into uninitialized because fo default
diff --git a/core/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java b/core/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java
index 80348706801..ccb07461015 100644
--- a/core/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/GatewayServiceTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.gateway;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cluster.NoopClusterService;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -29,7 +29,7 @@ import org.junit.Test;
import java.io.IOException;
-public class GatewayServiceTests extends ElasticsearchTestCase {
+public class GatewayServiceTests extends ESTestCase {
private GatewayService createService(Settings.Builder settings) {
diff --git a/core/src/test/java/org/elasticsearch/gateway/MetaDataStateFormatTest.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataStateFormatTest.java
index 036a89c7300..8650fd5cd1a 100644
--- a/core/src/test/java/org/elasticsearch/gateway/MetaDataStateFormatTest.java
+++ b/core/src/test/java/org/elasticsearch/gateway/MetaDataStateFormatTest.java
@@ -40,7 +40,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.InputStream;
@@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.startsWith;
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // TODO: fix test to work with ExtrasFS
-public class MetaDataStateFormatTest extends ElasticsearchTestCase {
+public class MetaDataStateFormatTest extends ESTestCase {
/**
diff --git a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesTests.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesTests.java
rename to core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java
index afa3c5b44c1..abe4ac3ff4a 100644
--- a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java
@@ -21,7 +21,6 @@ package org.elasticsearch.gateway;
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
import com.google.common.base.Predicate;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.cluster.metadata.IndexMetaData;
@@ -29,8 +28,8 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster;
import org.junit.Test;
@@ -38,17 +37,13 @@ import java.util.LinkedHashMap;
import java.util.concurrent.Future;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.InternalTestCluster.RestartCallback;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-/**
- *
- */
-@LuceneTestCase.Slow
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class MetaDataWriteDataNodesTests extends ElasticsearchIntegrationTest {
+public class MetaDataWriteDataNodesIT extends ESIntegTestCase {
@Test
public void testMetaWrittenAlsoOnDataNode() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/gateway/MetaStateServiceTests.java b/core/src/test/java/org/elasticsearch/gateway/MetaStateServiceTests.java
index 7386d6e50be..de66f9519c7 100644
--- a/core/src/test/java/org/elasticsearch/gateway/MetaStateServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/MetaStateServiceTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.env.NodeEnvironment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-public class MetaStateServiceTests extends ElasticsearchTestCase {
+public class MetaStateServiceTests extends ESTestCase {
private static Settings indexSettings = Settings.builder()
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
diff --git a/core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java b/core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java
index b77784e8f4a..be48fc7a581 100644
--- a/core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java
@@ -33,7 +33,7 @@ import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class PrimaryShardAllocatorTests extends ElasticsearchAllocationTestCase {
+public class PrimaryShardAllocatorTests extends ESAllocationTestCase {
private final ShardId shardId = new ShardId("test", 0);
private final DiscoveryNode node1 = newNode("node1");
diff --git a/core/src/test/java/org/elasticsearch/gateway/PriorityComparatorTests.java b/core/src/test/java/org/elasticsearch/gateway/PriorityComparatorTests.java
index aaf1bc0e25e..a846bc2cc9b 100644
--- a/core/src/test/java/org/elasticsearch/gateway/PriorityComparatorTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/PriorityComparatorTests.java
@@ -21,13 +21,13 @@ package org.elasticsearch.gateway;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.routing.*;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-public class PriorityComparatorTests extends ElasticsearchTestCase {
+public class PriorityComparatorTests extends ESTestCase {
public void testPriorityComparatorSort() {
RoutingNodes.UnassignedShards shards = new RoutingNodes.UnassignedShards((RoutingNodes) null);
diff --git a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java
rename to core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java
index 0f5a5816c7e..fb7a255f876 100644
--- a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java
@@ -25,8 +25,8 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.elasticsearch.client.Requests.clusterHealthRequest;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*;
@@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@ClusterScope(numDataNodes =0, scope= Scope.TEST)
-public class QuorumGatewayTests extends ElasticsearchIntegrationTest {
+public class QuorumGatewayIT extends ESIntegTestCase {
@Override
protected int numberOfReplicas() {
@@ -53,7 +53,6 @@ public class QuorumGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testChangeInitialShardsRecovery() throws Exception {
logger.info("--> starting 3 nodes");
final String[] nodes = internalCluster().startNodesAsync(3).get().toArray(new String[0]);
@@ -118,7 +117,6 @@ public class QuorumGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testQuorumRecovery() throws Exception {
logger.info("--> starting 3 nodes");
diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java
rename to core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java
index 35bc9fb3e03..458bb69c2bd 100644
--- a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java
@@ -20,28 +20,22 @@
package org.elasticsearch.gateway;
import com.google.common.collect.ImmutableSet;
-
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.block.ClusterBlock;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItem;
-/**
- *
- */
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-@Slow
-public class RecoverAfterNodesTests extends ElasticsearchIntegrationTest {
+public class RecoverAfterNodesIT extends ESIntegTestCase {
private final static TimeValue BLOCK_WAIT_TIMEOUT = TimeValue.timeValueSeconds(10);
diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java
index 7eeff09a944..745c98f664e 100644
--- a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java
@@ -18,7 +18,6 @@
*/
package org.elasticsearch.gateway;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.indices.recovery.RecoveryResponse;
import org.elasticsearch.action.admin.indices.recovery.ShardRecoveryResponse;
import org.elasticsearch.action.count.CountResponse;
@@ -29,8 +28,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.indices.recovery.RecoveryState;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -40,8 +39,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.TEST, numClientNodes = 0, transportClientRatio = 0.0)
-public class RecoveryBackwardsCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
+@ESIntegTestCase.ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.TEST, numClientNodes = 0, transportClientRatio = 0.0)
+public class RecoveryBackwardsCompatibilityIT extends ESBackcompatTestCase {
@Override
@@ -62,9 +61,7 @@ public class RecoveryBackwardsCompatibilityTests extends ElasticsearchBackwardsC
return 3;
}
-
@Test
- @LuceneTestCase.Slow
public void testReusePeerRecovery() throws Exception {
assertAcked(prepareCreate("test").setSettings(Settings.builder().put(indexSettings())
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java
rename to core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java
index be048f1b9a3..aa229305a2f 100644
--- a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.gateway;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.admin.indices.recovery.RecoveryResponse;
import org.elasticsearch.action.admin.indices.recovery.ShardRecoveryResponse;
import org.elasticsearch.action.admin.indices.stats.IndexStats;
@@ -34,8 +33,8 @@ import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.indices.flush.SyncedFlushUtil;
import org.elasticsearch.indices.recovery.RecoveryState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.store.MockFSDirectoryService;
@@ -47,20 +46,18 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.notNullValue;
-/**
- *
- */
@ClusterScope(numDataNodes = 0, scope = Scope.TEST)
-@Slow
-public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
+public class RecoveryFromGatewayIT extends ESIntegTestCase {
@Test
- @Slow
public void testOneNodeRecoverFromGateway() throws Exception {
internalCluster().startNode();
@@ -103,7 +100,6 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testSingleNodeNoFlush() throws Exception {
internalCluster().startNode();
@@ -188,10 +184,8 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
assertHitCount(client().prepareCount().setQuery(termQuery("num", 179)).get(), value1Docs);
}
}
-
-
+
@Test
- @Slow
public void testSingleNodeWithFlush() throws Exception {
internalCluster().startNode();
@@ -225,7 +219,6 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testTwoNodeFirstNodeCleared() throws Exception {
final String firstNode = internalCluster().startNode();
@@ -265,7 +258,6 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testLatestVersionLoaded() throws Exception {
// clean two nodes
internalCluster().startNodesAsync(2, settingsBuilder().put("gateway.recover_after_nodes", 2).build()).get();
@@ -339,7 +331,6 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
@TestLogging("gateway:TRACE,indices.recovery:TRACE,index.engine:TRACE")
public void testReusePeerRecovery() throws Exception {
final Settings settings = settingsBuilder()
@@ -450,7 +441,6 @@ public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testRecoveryDifferentNodeOrderStartup() throws Exception {
// we need different data paths so we make sure we start the second node fresh
diff --git a/core/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorTests.java b/core/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorTests.java
index 61dc147c9d3..be6be39ee33 100644
--- a/core/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorTests.java
+++ b/core/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.store.Store;
import org.elasticsearch.index.store.StoreFileMetaData;
import org.elasticsearch.indices.store.TransportNodesListShardStoreMetaData;
-import org.elasticsearch.test.ElasticsearchAllocationTestCase;
+import org.elasticsearch.test.ESAllocationTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class ReplicaShardAllocatorTests extends ElasticsearchAllocationTestCase {
+public class ReplicaShardAllocatorTests extends ESAllocationTestCase {
private final ShardId shardId = new ShardId("test", 0);
private final DiscoveryNode node1 = newNode("node1");
diff --git a/core/src/test/java/org/elasticsearch/get/GetActionTests.java b/core/src/test/java/org/elasticsearch/get/GetActionIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/get/GetActionTests.java
rename to core/src/test/java/org/elasticsearch/get/GetActionIT.java
index f04839b55f4..15242ab6fb9 100644
--- a/core/src/test/java/org/elasticsearch/get/GetActionTests.java
+++ b/core/src/test/java/org/elasticsearch/get/GetActionIT.java
@@ -42,7 +42,7 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.engine.VersionConflictEngineException;
import org.elasticsearch.index.mapper.internal.TimestampFieldMapper;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Test;
@@ -56,7 +56,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class GetActionTests extends ElasticsearchIntegrationTest {
+public class GetActionIT extends ESIntegTestCase {
@Test
public void simpleGetTests() {
diff --git a/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortTests.java b/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java
similarity index 88%
rename from core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortTests.java
rename to core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java
index d2466ac6499..687c01520d0 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortTests.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java
@@ -24,16 +24,16 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.BoundTransportAddress;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class HttpPublishPortTests extends ElasticsearchIntegrationTest {
+public class HttpPublishPortIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpChannelTests.java b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpChannelTests.java
index c40f31f9acb..a2eb9565f7f 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpChannelTests.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpChannelTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.rest.RestResponse;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cache.recycler.MockBigArrays;
import org.elasticsearch.test.cache.recycler.MockPageCacheRecycler;
import org.elasticsearch.threadpool.ThreadPool;
@@ -44,7 +44,7 @@ import java.util.List;
import static org.hamcrest.Matchers.*;
-public class NettyHttpChannelTests extends ElasticsearchTestCase {
+public class NettyHttpChannelTests extends ESTestCase {
private NetworkService networkService;
private ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpServerPipeliningTest.java b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpServerPipeliningTest.java
index 53666c0d2cf..07678d95982 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpServerPipeliningTest.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpServerPipeliningTest.java
@@ -28,7 +28,7 @@ import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.http.netty.pipelining.OrderedDownstreamChannelEvent;
import org.elasticsearch.http.netty.pipelining.OrderedUpstreamMessageEvent;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cache.recycler.MockBigArrays;
import org.elasticsearch.test.cache.recycler.MockPageCacheRecycler;
import org.elasticsearch.threadpool.ThreadPool;
@@ -57,7 +57,7 @@ import static org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1;
/**
* This test just tests, if he pipelining works in general with out any connection the elasticsearch handler
*/
-public class NettyHttpServerPipeliningTest extends ElasticsearchTestCase {
+public class NettyHttpServerPipeliningTest extends ESTestCase {
private NetworkService networkService;
private ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.java
index 0d8ba526665..55879671993 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.junit.Test;
@@ -34,15 +34,15 @@ import java.util.Locale;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.http.netty.NettyHttpClient.returnOpaqueIds;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
/**
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
-public class NettyPipeliningDisabledIntegrationTest extends ElasticsearchIntegrationTest {
+public class NettyPipeliningDisabledIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIntegrationTest.java b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java
index b3f84799366..84a0f9b3642 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java
@@ -22,7 +22,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.junit.Test;
@@ -33,14 +33,14 @@ import java.util.Locale;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.http.netty.NettyHttpClient.returnOpaqueIds;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
-public class NettyPipeliningEnabledIntegrationTest extends ElasticsearchIntegrationTest {
+public class NettyPipeliningEnabledIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/http/netty/pipelining/HttpPipeliningHandlerTest.java b/core/src/test/java/org/elasticsearch/http/netty/pipelining/HttpPipeliningHandlerTest.java
index 110a2d73160..b6a8df5b696 100644
--- a/core/src/test/java/org/elasticsearch/http/netty/pipelining/HttpPipeliningHandlerTest.java
+++ b/core/src/test/java/org/elasticsearch/http/netty/pipelining/HttpPipeliningHandlerTest.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.http.netty.pipelining;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.*;
@@ -36,7 +36,6 @@ import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
@@ -52,7 +51,7 @@ import static org.jboss.netty.util.CharsetUtil.UTF_8;
/**
*
*/
-public class HttpPipeliningHandlerTest extends ElasticsearchTestCase {
+public class HttpPipeliningHandlerTest extends ESTestCase {
private static final long RESPONSE_TIMEOUT = 10000L;
private static final long CONNECTION_TIMEOUT = 10000L;
diff --git a/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java b/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java
rename to core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java
index e77242cfea8..5db3e546697 100644
--- a/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.Test;
@@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
-public class IndexRequestBuilderTests extends ElasticsearchIntegrationTest {
+public class IndexRequestBuilderIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasTests.java b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasTests.java
rename to core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java
index a68a1654fe3..5c6f7b376c7 100644
--- a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasTests.java
+++ b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java
@@ -41,7 +41,7 @@ import org.elasticsearch.indices.recovery.RecoveryTarget;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.*;
@@ -65,8 +65,8 @@ import static org.hamcrest.Matchers.*;
/**
* Tests for indices that use shadow replicas and a shared filesystem
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class IndexWithShadowReplicasTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class IndexWithShadowReplicasIT extends ESIntegTestCase {
private Settings nodeSettings() {
return Settings.builder()
diff --git a/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresTest.java b/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/TransportIndexFailuresTest.java
rename to core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java
index b6ef53db87a..9426f39c100 100644
--- a/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresTest.java
+++ b/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.Discovery;
import org.elasticsearch.discovery.DiscoverySettings;
import org.elasticsearch.discovery.zen.fd.FaultDetection;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.TransportModule;
import org.elasticsearch.transport.TransportService;
@@ -47,8 +47,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Test failure when index replication actions fail mid-flight
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
-public class TransportIndexFailuresTest extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0)
+public class TransportIndexFailuresIT extends ESIntegTestCase {
private static final Settings nodeSettings = Settings.settingsBuilder()
.put("discovery.type", "zen") // <-- To override the local setting if set externally
diff --git a/core/src/test/java/org/elasticsearch/index/VersionTypeTests.java b/core/src/test/java/org/elasticsearch/index/VersionTypeTests.java
index 4d38cdf3205..e4a97d2a4be 100644
--- a/core/src/test/java/org/elasticsearch/index/VersionTypeTests.java
+++ b/core/src/test/java/org/elasticsearch/index/VersionTypeTests.java
@@ -20,12 +20,12 @@
package org.elasticsearch.index;
import org.elasticsearch.common.lucene.uid.Versions;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class VersionTypeTests extends ElasticsearchTestCase {
+public class VersionTypeTests extends ESTestCase {
@Test
public void testInternalVersionConflict() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/aliases/IndexAliasesServiceTests.java b/core/src/test/java/org/elasticsearch/index/aliases/IndexAliasesServiceTests.java
index 806c39eff85..cb6a2425061 100644
--- a/core/src/test/java/org/elasticsearch/index/aliases/IndexAliasesServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/index/aliases/IndexAliasesServiceTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.indices.InvalidAliasNameException;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class IndexAliasesServiceTests extends ElasticsearchSingleNodeTest {
+public class IndexAliasesServiceTests extends ESSingleNodeTestCase {
public IndexAliasesService newIndexAliasesService() {
Settings settings = Settings.builder().put("name", "IndexAliasesServiceTests").build();
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/ASCIIFoldingTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/ASCIIFoldingTokenFilterFactoryTests.java
index 1e16122af58..d31cc0a5c65 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/ASCIIFoldingTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/ASCIIFoldingTokenFilterFactoryTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -29,7 +29,7 @@ import java.io.StringReader;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class ASCIIFoldingTokenFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class ASCIIFoldingTokenFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testDefault() throws IOException {
AnalysisService analysisService = AnalysisTestsHelper.createAnalysisServiceFromSettings(settingsBuilder()
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisFactoryTests.java
index eac199db7ed..a79da27a524 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisFactoryTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.analysis;
import org.elasticsearch.index.analysis.compound.DictionaryCompoundWordTokenFilterFactory;
import org.elasticsearch.index.analysis.compound.HyphenationCompoundWordTokenFilterFactory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.HashMap;
import java.util.Map;
@@ -33,7 +33,7 @@ import java.util.TreeSet;
*
* If we don't want to expose one for a specific reason, just map it to Void
*/
-public class AnalysisFactoryTests extends ElasticsearchTestCase {
+public class AnalysisFactoryTests extends ESTestCase {
static final Map> KNOWN_TOKENIZERS = new HashMap>() {{
// deprecated ones, we dont care about these
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java
index c1d260392ff..5757cc7a832 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisModuleTests.java
@@ -42,7 +42,7 @@ import org.elasticsearch.index.analysis.filter1.MyFilterTokenFilterFactory;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class AnalysisModuleTests extends ElasticsearchTestCase {
+public class AnalysisModuleTests extends ESTestCase {
private Injector injector;
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisTests.java b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisTests.java
index 30050ba6c06..abfe52097ed 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/AnalysisTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/AnalysisTests.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.util.CharArraySet;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.is;
-public class AnalysisTests extends ElasticsearchTestCase {
+public class AnalysisTests extends ESTestCase {
@Test
public void testParseStemExclusion() {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/AnalyzerBackwardsCompatTests.java b/core/src/test/java/org/elasticsearch/index/analysis/AnalyzerBackwardsCompatTests.java
index e633895e9e6..43ec10173b5 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/AnalyzerBackwardsCompatTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/AnalyzerBackwardsCompatTests.java
@@ -19,20 +19,16 @@
package org.elasticsearch.index.analysis;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
-import org.junit.Ignore;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import java.io.IOException;
import static com.carrotsearch.randomizedtesting.RandomizedTest.scaledRandomIntBetween;
import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_VERSION_CREATED;
-/**
- */
-public class AnalyzerBackwardsCompatTests extends ElasticsearchTokenStreamTestCase {
+public class AnalyzerBackwardsCompatTests extends ESTokenStreamTestCase {
- @Ignore
- private void testNoStopwordsAfter(org.elasticsearch.Version noStopwordVersion, String type) throws IOException {
+ private void assertNoStopwordsAfter(org.elasticsearch.Version noStopwordVersion, String type) throws IOException {
final int iters = scaledRandomIntBetween(10, 100);
org.elasticsearch.Version version = org.elasticsearch.Version.CURRENT;
for (int i = 0; i < iters; i++) {
@@ -58,14 +54,14 @@ public class AnalyzerBackwardsCompatTests extends ElasticsearchTokenStreamTestCa
}
public void testPatternAnalyzer() throws IOException {
- testNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_RC1, "pattern");
+ assertNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_RC1, "pattern");
}
public void testStandardHTMLStripAnalyzer() throws IOException {
- testNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_RC1, "standard_html_strip");
+ assertNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_RC1, "standard_html_strip");
}
public void testStandardAnalyzer() throws IOException {
- testNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_Beta1, "standard");
+ assertNoStopwordsAfter(org.elasticsearch.Version.V_1_0_0_Beta1, "standard");
}
}
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/CJKFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/CJKFilterFactoryTests.java
index bfa4c5ed596..418cd2b30a2 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/CJKFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/CJKFilterFactoryTests.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.standard.StandardTokenizer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
import java.io.StringReader;
-public class CJKFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class CJKFilterFactoryTests extends ESTokenStreamTestCase {
private static final String RESOURCE = "org/elasticsearch/index/analysis/cjk_analysis.json";
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/CharFilterTests.java b/core/src/test/java/org/elasticsearch/index/analysis/CharFilterTests.java
index e2ce99d8335..ef2c6d4e7fb 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/CharFilterTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/CharFilterTests.java
@@ -31,14 +31,14 @@ import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**
*/
-public class CharFilterTests extends ElasticsearchTokenStreamTestCase {
+public class CharFilterTests extends ESTokenStreamTestCase {
@Test
public void testMappingCharFilter() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/CompoundAnalysisTests.java b/core/src/test/java/org/elasticsearch/index/analysis/CompoundAnalysisTests.java
index 3f1edbbdd46..e5c79439352 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/CompoundAnalysisTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/CompoundAnalysisTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.analysis.compound.DictionaryCompoundWordTokenFilt
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class CompoundAnalysisTests extends ElasticsearchTestCase {
+public class CompoundAnalysisTests extends ESTestCase {
@Test
public void testDefaultsCompoundAnalysis() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactoryTests.java
index cb8a8975e78..f81fef1f816 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/HunspellTokenFilterFactoryTests.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.analysis;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -28,7 +28,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
-public class HunspellTokenFilterFactoryTests extends ElasticsearchTestCase {
+public class HunspellTokenFilterFactoryTests extends ESTestCase {
@Test
public void testDedup() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/KeepFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/KeepFilterFactoryTests.java
index a9a07af9d9e..14f3b6fe0d3 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/KeepFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/KeepFilterFactoryTests.java
@@ -23,7 +23,7 @@ import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.FailedToResolveConfigException;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Assert;
import org.junit.Test;
@@ -32,7 +32,7 @@ import java.io.StringReader;
import static org.hamcrest.Matchers.instanceOf;
-public class KeepFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class KeepFilterFactoryTests extends ESTokenStreamTestCase {
private static final String RESOURCE = "org/elasticsearch/index/analysis/keep_analysis.json";
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/KeepTypesFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/KeepTypesFilterFactoryTests.java
index 966d550a55d..fd8f70f6f74 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/KeepTypesFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/KeepTypesFilterFactoryTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.standard.StandardTokenizer;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -30,7 +30,7 @@ import java.io.StringReader;
import static org.hamcrest.Matchers.instanceOf;
-public class KeepTypesFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class KeepTypesFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testKeepTypes() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/LimitTokenCountFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/LimitTokenCountFilterFactoryTests.java
index e75120d9eeb..6f283f95550 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/LimitTokenCountFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/LimitTokenCountFilterFactoryTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
import java.io.StringReader;
-public class LimitTokenCountFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class LimitTokenCountFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testDefault() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/NGramTokenizerFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/NGramTokenizerFactoryTests.java
index 39a2372e3b3..11fcf066fe6 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/NGramTokenizerFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/NGramTokenizerFactoryTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings.Builder;
import org.elasticsearch.index.Index;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -44,7 +44,7 @@ import java.util.Random;
import static com.carrotsearch.randomizedtesting.RandomizedTest.scaledRandomIntBetween;
import static org.hamcrest.Matchers.instanceOf;
-public class NGramTokenizerFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class NGramTokenizerFactoryTests extends ESTokenStreamTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/NumericAnalyzerTests.java b/core/src/test/java/org/elasticsearch/index/analysis/NumericAnalyzerTests.java
index 7f7b363cf9e..a9ca96cc5f4 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/NumericAnalyzerTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/NumericAnalyzerTests.java
@@ -23,7 +23,7 @@ import org.apache.lucene.analysis.NumericTokenStream;
import org.apache.lucene.analysis.NumericTokenStream.NumericTermAttribute;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -31,7 +31,7 @@ import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-public class NumericAnalyzerTests extends ElasticsearchTestCase {
+public class NumericAnalyzerTests extends ESTestCase {
@Test
public void testAttributeEqual() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PatternAnalyzerTest.java b/core/src/test/java/org/elasticsearch/index/analysis/PatternAnalyzerTest.java
index 98197a15c04..2f420e56461 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PatternAnalyzerTest.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PatternAnalyzerTest.java
@@ -26,12 +26,12 @@ import java.util.regex.Pattern;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.core.StopAnalyzer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
/**
* Verifies the behavior of PatternAnalyzer.
*/
-public class PatternAnalyzerTest extends ElasticsearchTokenStreamTestCase {
+public class PatternAnalyzerTest extends ESTokenStreamTestCase {
/**
* Test PatternAnalyzer when it is configured with a non-word pattern.
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PatternCaptureTokenFilterTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PatternCaptureTokenFilterTests.java
index 11a4f8745c7..0a1d7e5e196 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PatternCaptureTokenFilterTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PatternCaptureTokenFilterTests.java
@@ -32,12 +32,12 @@ import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class PatternCaptureTokenFilterTests extends ElasticsearchTokenStreamTestCase {
+public class PatternCaptureTokenFilterTests extends ESTokenStreamTestCase {
@Test
public void testPatternCaptureTokenFilter() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerProviderFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerProviderFactoryTests.java
index 78b1bb9d671..c18e4fd7607 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerProviderFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerProviderFactoryTests.java
@@ -22,7 +22,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.analysis.PreBuiltAnalyzers;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.not;
/**
*
*/
-public class PreBuiltAnalyzerProviderFactoryTests extends ElasticsearchTestCase {
+public class PreBuiltAnalyzerProviderFactoryTests extends ESTestCase {
@Test
public void testVersioningInFactoryProvider() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerTests.java
index cf9f09204d9..77eb0cda1d6 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltAnalyzerTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.indices.analysis.PreBuiltAnalyzers;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class PreBuiltAnalyzerTests extends ElasticsearchSingleNodeTest {
+public class PreBuiltAnalyzerTests extends ESSingleNodeTestCase {
@Test
public void testThatDefaultAndStandardAnalyzerAreTheSameInstance() {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltCharFilterFactoryFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltCharFilterFactoryFactoryTests.java
index 5690315f7a7..863ed961980 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltCharFilterFactoryFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltCharFilterFactoryFactoryTests.java
@@ -22,7 +22,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.analysis.PreBuiltCharFilters;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
@@ -31,7 +31,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
/**
*
*/
-public class PreBuiltCharFilterFactoryFactoryTests extends ElasticsearchTestCase {
+public class PreBuiltCharFilterFactoryFactoryTests extends ESTestCase {
@Test
public void testThatDifferentVersionsCanBeLoaded() {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenFilterFactoryFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenFilterFactoryFactoryTests.java
index 8531dc81c34..c1cbc1267cf 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenFilterFactoryFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenFilterFactoryFactoryTests.java
@@ -22,7 +22,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.analysis.PreBuiltTokenFilters;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
@@ -30,7 +30,7 @@ import static org.hamcrest.CoreMatchers.*;
/**
*
*/
-public class PreBuiltTokenFilterFactoryFactoryTests extends ElasticsearchTestCase {
+public class PreBuiltTokenFilterFactoryFactoryTests extends ESTestCase {
@Test
public void testThatCachingWorksForCachingStrategyOne() {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenizerFactoryFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenizerFactoryFactoryTests.java
index d60155e0e00..a9e8f7b29f2 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenizerFactoryFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/PreBuiltTokenizerFactoryFactoryTests.java
@@ -22,7 +22,7 @@ import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.analysis.PreBuiltTokenizers;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
@@ -30,7 +30,7 @@ import static org.hamcrest.CoreMatchers.*;
/**
*
*/
-public class PreBuiltTokenizerFactoryFactoryTests extends ElasticsearchTestCase {
+public class PreBuiltTokenizerFactoryFactoryTests extends ESTestCase {
@Test
public void testThatDifferentVersionsCanBeLoaded() {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactoryTests.java
index 866aad321f8..d8b6905d777 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/ShingleTokenFilterFactoryTests.java
@@ -25,7 +25,7 @@ import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.StopFilter;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import java.io.StringReader;
import static org.hamcrest.Matchers.instanceOf;
@ThreadLeakScope(Scope.NONE)
-public class ShingleTokenFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class ShingleTokenFilterFactoryTests extends ESTokenStreamTestCase {
private static final String RESOURCE = "org/elasticsearch/index/analysis/shingle_analysis.json";
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/SnowballAnalyzerTests.java b/core/src/test/java/org/elasticsearch/index/analysis/SnowballAnalyzerTests.java
index a34a5c674ac..632233e6f2a 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/SnowballAnalyzerTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/SnowballAnalyzerTests.java
@@ -21,9 +21,9 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
-public class SnowballAnalyzerTests extends ElasticsearchTokenStreamTestCase {
+public class SnowballAnalyzerTests extends ESTokenStreamTestCase {
public void testEnglish() throws Exception {
Analyzer a = new SnowballAnalyzer("English");
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactoryTests.java
index 6b5fb9fa34f..22a7effdaac 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/StemmerTokenFilterFactoryTests.java
@@ -25,7 +25,7 @@ import org.apache.lucene.analysis.en.PorterStemFilter;
import org.apache.lucene.analysis.snowball.SnowballFilter;
import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*
*/
-public class StemmerTokenFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class StemmerTokenFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testEnglishBackwardsCompatibility() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/StopAnalyzerTests.java b/core/src/test/java/org/elasticsearch/index/analysis/StopAnalyzerTests.java
index 0b4dc23b792..e520fd1c557 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/StopAnalyzerTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/StopAnalyzerTests.java
@@ -32,12 +32,12 @@ import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class StopAnalyzerTests extends ElasticsearchTokenStreamTestCase {
+public class StopAnalyzerTests extends ESTokenStreamTestCase {
@Test
public void testDefaultsCompoundAnalysis() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/StopTokenFilterTests.java b/core/src/test/java/org/elasticsearch/index/analysis/StopTokenFilterTests.java
index f61a50ea2d0..2d52599c6c0 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/StopTokenFilterTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/StopTokenFilterTests.java
@@ -29,7 +29,7 @@ import org.apache.lucene.util.Version;
import org.elasticsearch.common.inject.ProvisionException;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings.Builder;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -38,7 +38,7 @@ import java.io.StringReader;
import static org.hamcrest.Matchers.instanceOf;
-public class StopTokenFilterTests extends ElasticsearchTokenStreamTestCase {
+public class StopTokenFilterTests extends ESTokenStreamTestCase {
@Test(expected = ProvisionException.class)
public void testPositionIncrementSetting() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/WordDelimiterTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/WordDelimiterTokenFilterFactoryTests.java
index cb67e657dd9..d29b2ebae9e 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/WordDelimiterTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/WordDelimiterTokenFilterFactoryTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.analysis;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -29,7 +29,7 @@ import java.io.StringReader;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-public class WordDelimiterTokenFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class WordDelimiterTokenFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testDefault() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/commongrams/CommonGramsTokenFilterFactoryTests.java b/core/src/test/java/org/elasticsearch/index/analysis/commongrams/CommonGramsTokenFilterFactoryTests.java
index d4bf9058bc6..6aadf4d1377 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/commongrams/CommonGramsTokenFilterFactoryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/commongrams/CommonGramsTokenFilterFactoryTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.analysis.AnalysisService;
import org.elasticsearch.index.analysis.AnalysisTestsHelper;
import org.elasticsearch.index.analysis.TokenFilterFactory;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Assert;
import org.junit.Test;
@@ -34,7 +34,7 @@ import java.io.IOException;
import java.io.StringReader;
import static org.hamcrest.Matchers.instanceOf;
-public class CommonGramsTokenFilterFactoryTests extends ElasticsearchTokenStreamTestCase {
+public class CommonGramsTokenFilterFactoryTests extends ESTokenStreamTestCase {
@Test
public void testDefault() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/analysis/synonyms/SynonymsAnalysisTest.java b/core/src/test/java/org/elasticsearch/index/analysis/synonyms/SynonymsAnalysisTest.java
index 289c1a20b74..beb5ae3b51a 100644
--- a/core/src/test/java/org/elasticsearch/index/analysis/synonyms/SynonymsAnalysisTest.java
+++ b/core/src/test/java/org/elasticsearch/index/analysis/synonyms/SynonymsAnalysisTest.java
@@ -41,7 +41,7 @@ import org.elasticsearch.index.analysis.AnalysisService;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class SynonymsAnalysisTest extends ElasticsearchTestCase {
+public class SynonymsAnalysisTest extends ESTestCase {
protected final ESLogger logger = Loggers.getLogger(getClass());
private AnalysisService analysisService;
diff --git a/core/src/test/java/org/elasticsearch/index/cache/bitset/BitSetFilterCacheTest.java b/core/src/test/java/org/elasticsearch/index/cache/bitset/BitSetFilterCacheTest.java
index 4125c347904..389b2095bae 100644
--- a/core/src/test/java/org/elasticsearch/index/cache/bitset/BitSetFilterCacheTest.java
+++ b/core/src/test/java/org/elasticsearch/index/cache/bitset/BitSetFilterCacheTest.java
@@ -38,14 +38,14 @@ import org.apache.lucene.search.join.BitDocIdSetFilter;
import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.Index;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class BitSetFilterCacheTest extends ElasticsearchTestCase {
+public class BitSetFilterCacheTest extends ESTestCase {
@Test
public void testInvalidateEntries() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/codec/CodecTests.java b/core/src/test/java/org/elasticsearch/index/codec/CodecTests.java
index f5fc8c99344..fc967189482 100644
--- a/core/src/test/java/org/elasticsearch/index/codec/CodecTests.java
+++ b/core/src/test/java/org/elasticsearch/index/codec/CodecTests.java
@@ -39,13 +39,13 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.instanceOf;
@SuppressCodecs("*") // we test against default codec so never get a random one here!
-public class CodecTests extends ElasticsearchSingleNodeTest {
+public class CodecTests extends ESSingleNodeTestCase {
@Test
public void testResolveDefaultCodecs() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/codec/postingformat/ElasticsearchPostingsFormatTest.java b/core/src/test/java/org/elasticsearch/index/codec/postingformat/PostingsFormatTest.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/index/codec/postingformat/ElasticsearchPostingsFormatTest.java
rename to core/src/test/java/org/elasticsearch/index/codec/postingformat/PostingsFormatTest.java
index 58bbe5825fd..efaa557cc89 100644
--- a/core/src/test/java/org/elasticsearch/index/codec/postingformat/ElasticsearchPostingsFormatTest.java
+++ b/core/src/test/java/org/elasticsearch/index/codec/postingformat/PostingsFormatTest.java
@@ -34,7 +34,7 @@ import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter;
})
@TimeoutSuite(millis = TimeUnits.HOUR)
@LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose")
-public class ElasticsearchPostingsFormatTest extends BasePostingsFormatTestCase {
+public class PostingsFormatTest extends BasePostingsFormatTestCase {
@Override
protected Codec getCodec() {
diff --git a/core/src/test/java/org/elasticsearch/index/deletionpolicy/SnapshotDeletionPolicyTests.java b/core/src/test/java/org/elasticsearch/index/deletionpolicy/SnapshotDeletionPolicyTests.java
index cf21ea84b94..a7d80e74a52 100644
--- a/core/src/test/java/org/elasticsearch/index/deletionpolicy/SnapshotDeletionPolicyTests.java
+++ b/core/src/test/java/org/elasticsearch/index/deletionpolicy/SnapshotDeletionPolicyTests.java
@@ -28,7 +28,7 @@ import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* A set of tests for {@link org.elasticsearch.index.deletionpolicy.SnapshotDeletionPolicy}.
*/
-public class SnapshotDeletionPolicyTests extends ElasticsearchTestCase {
+public class SnapshotDeletionPolicyTests extends ESTestCase {
protected final ShardId shardId = new ShardId(new Index("index"), 1);
diff --git a/core/src/test/java/org/elasticsearch/index/engine/CommitStatsTests.java b/core/src/test/java/org/elasticsearch/index/engine/CommitStatsTests.java
index 75aa4ed9b4c..8d9c313a9a2 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/CommitStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/CommitStatsTests.java
@@ -23,7 +23,7 @@ package org.elasticsearch.index.engine;
import org.apache.lucene.index.SegmentInfos;
import org.elasticsearch.common.io.stream.InputStreamStreamInput;
import org.elasticsearch.common.io.stream.OutputStreamStreamOutput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -32,7 +32,7 @@ import java.io.IOException;
import static org.elasticsearch.test.VersionUtils.randomVersion;
-public class CommitStatsTests extends ElasticsearchTestCase {
+public class CommitStatsTests extends ESTestCase {
public void testStreamingWithNullId() throws IOException {
SegmentInfos segmentInfos = new SegmentInfos();
CommitStats commitStats = new CommitStats(segmentInfos);
diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIntegrationTest.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/engine/InternalEngineIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java
index 9f46af76260..bae6be5ad4f 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.admin.indices.segments.IndexShardSegments;
import org.elasticsearch.action.admin.indices.segments.IndicesSegmentResponse;
import org.elasticsearch.action.admin.indices.segments.ShardSegments;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -32,7 +32,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-public class InternalEngineIntegrationTest extends ElasticsearchIntegrationTest {
+public class InternalEngineIT extends ESIntegTestCase {
@Test
public void testSetIndexCompoundOnFlush() {
diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeTests.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeTests.java
rename to core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java
index 226005ca013..8f8ce8c8482 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java
@@ -19,15 +19,13 @@
package org.elasticsearch.index.engine;
import com.google.common.base.Predicate;
-import org.apache.lucene.index.LogByteSizeMergePolicy;
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.action.bulk.BulkRequestBuilder;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.client.Requests;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.index.shard.MergePolicyConfig;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -35,18 +33,15 @@ import java.io.IOException;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-/**
- */
@ClusterScope(numDataNodes = 1, scope = Scope.SUITE)
-public class InternalEngineMergeTests extends ElasticsearchIntegrationTest {
+public class InternalEngineMergeIT extends ESIntegTestCase {
@Test
- @Slow
public void testMergesHappening() throws InterruptedException, IOException, ExecutionException {
final int numOfShards = randomIntBetween(1,5);
// some settings to keep num segments low
diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineSettingsTest.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineSettingsTest.java
index 856a275a5bf..21211fe3534 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineSettingsTest.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineSettingsTest.java
@@ -21,14 +21,14 @@ package org.elasticsearch.index.engine;
import org.apache.lucene.index.LiveIndexWriterConfig;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.concurrent.TimeUnit;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-public class InternalEngineSettingsTest extends ElasticsearchSingleNodeTest {
+public class InternalEngineSettingsTest extends ESSingleNodeTestCase {
public void testSettingsUpdate() {
final IndexService service = createIndex("foo");
diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
index a64fddb503b..52de4859ffb 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
@@ -40,7 +40,7 @@ import org.apache.lucene.store.MockDirectoryWrapper;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.TestUtil;
import org.elasticsearch.Version;
-import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityTests;
+import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityIT;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.Base64;
import org.elasticsearch.common.Nullable;
@@ -79,7 +79,7 @@ import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.TranslogConfig;
import org.elasticsearch.index.translog.TranslogTests;
import org.elasticsearch.test.DummyShardLock;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.hamcrest.MatcherAssert;
import org.junit.After;
@@ -102,7 +102,7 @@ import static org.elasticsearch.index.engine.Engine.Operation.Origin.PRIMARY;
import static org.elasticsearch.index.engine.Engine.Operation.Origin.REPLICA;
import static org.hamcrest.Matchers.*;
-public class InternalEngineTests extends ElasticsearchTestCase {
+public class InternalEngineTests extends ESTestCase {
private static final Pattern PARSE_LEGACY_ID_PATTERN = Pattern.compile("^" + Translog.TRANSLOG_FILE_PREFIX + "(\\d+)((\\.recovering))?$");
@@ -1378,7 +1378,6 @@ public class InternalEngineTests extends ElasticsearchTestCase {
}
}
- @Slow
@Test
public void testEnableGcDeletes() throws Exception {
try (Store store = createStore();
@@ -1750,7 +1749,7 @@ public class InternalEngineTests extends ElasticsearchTestCase {
public void testUpgradeOldIndex() throws IOException {
List indexes = new ArrayList<>();
- Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityTests.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
+ Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityIT.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
try (DirectoryStream stream = Files.newDirectoryStream(dir, "index-*.zip")) {
for (Path path : stream) {
indexes.add(path);
diff --git a/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java b/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
index bf89a5a7baf..1634d21ee34 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
@@ -56,7 +56,7 @@ import org.elasticsearch.index.store.Store;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.TranslogConfig;
import org.elasticsearch.test.DummyShardLock;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.hamcrest.MatcherAssert;
import org.junit.After;
@@ -76,7 +76,7 @@ import static org.hamcrest.Matchers.*;
/**
* TODO: document me!
*/
-public class ShadowEngineTests extends ElasticsearchTestCase {
+public class ShadowEngineTests extends ESTestCase {
protected final ShardId shardId = new ShardId(new Index("index"), 1);
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/AbstractFieldDataTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/AbstractFieldDataTests.java
index eff42dd0400..6908a6738d5 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/AbstractFieldDataTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/AbstractFieldDataTests.java
@@ -36,7 +36,7 @@ import org.elasticsearch.index.mapper.MapperBuilders;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.internal.ParentFieldMapper;
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.After;
import org.junit.Before;
@@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.sameInstance;
-public abstract class AbstractFieldDataTests extends ElasticsearchSingleNodeTest {
+public abstract class AbstractFieldDataTests extends ESSingleNodeTestCase {
protected IndexService indexService;
protected IndexFieldDataService ifdService;
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/AbstractStringFieldDataTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/AbstractStringFieldDataTests.java
index 4d19f92097d..8fcc949936b 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/AbstractStringFieldDataTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/AbstractStringFieldDataTests.java
@@ -250,7 +250,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
for (int i = 1; i < values.length; ++i) {
values[i] = TestUtil.randomUnicodeString(getRandom());
}
- final int numDocs = scaledRandomIntBetween(10, 10000);
+ final int numDocs = scaledRandomIntBetween(10, 3072);
for (int i = 0; i < numDocs; ++i) {
final String value = RandomPicks.randomFrom(getRandom(), values);
if (value == null) {
@@ -306,7 +306,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
for (int i = 1; i < values.length; ++i) {
values[i] = TestUtil.randomUnicodeString(getRandom());
}
- final int numDocs = scaledRandomIntBetween(10, 10000);
+ final int numDocs = scaledRandomIntBetween(10, 3072);
for (int i = 0; i < numDocs; ++i) {
final String value = RandomPicks.randomFrom(getRandom(), values);
if (value == null) {
@@ -359,7 +359,7 @@ public abstract class AbstractStringFieldDataTests extends AbstractFieldDataImpl
for (int i = 0; i < values.length; ++i) {
values[i] = TestUtil.randomSimpleString(getRandom());
}
- final int numParents = scaledRandomIntBetween(10, 10000);
+ final int numParents = scaledRandomIntBetween(10, 3072);
List docs = new ArrayList<>();
FixedBitSet parents = new FixedBitSet(64);
for (int i = 0; i < numParents; ++i) {
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/DisabledFieldDataFormatTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/DisabledFieldDataFormatTests.java
index 9124f6c4508..0601a302428 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/DisabledFieldDataFormatTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/DisabledFieldDataFormatTests.java
@@ -25,13 +25,13 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-public class DisabledFieldDataFormatTests extends ElasticsearchSingleNodeTest {
+public class DisabledFieldDataFormatTests extends ESSingleNodeTestCase {
public void test() throws Exception {
createIndex("test", Settings.EMPTY, "type", "s", "type=string");
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/DuelFieldDataTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/DuelFieldDataTests.java
index 44147a2c362..3dee75021dc 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/DuelFieldDataTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/DuelFieldDataTests.java
@@ -66,7 +66,7 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
.endObject().endObject().endObject().string();
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
Random random = getRandom();
- int atLeast = scaledRandomIntBetween(1000, 1500);
+ int atLeast = scaledRandomIntBetween(200, 1500);
for (int i = 0; i < atLeast; i++) {
String s = Integer.toString(randomByte());
@@ -142,8 +142,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
Random random = getRandom();
- int atLeast = scaledRandomIntBetween(1000, 1500);
- final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 40);
+ int atLeast = scaledRandomIntBetween(200, 1500);
+ final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 10);
byte[] values = new byte[maxNumValues];
for (int i = 0; i < atLeast; i++) {
int numValues = randomInt(maxNumValues);
@@ -224,8 +224,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
Random random = getRandom();
- int atLeast = scaledRandomIntBetween(1000, 1500);
- final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 40);
+ int atLeast = scaledRandomIntBetween(200, 1500);
+ final int maxNumValues = randomBoolean() ? 1 : randomIntBetween(2, 10);
float[] values = new float[maxNumValues];
for (int i = 0; i < atLeast; i++) {
int numValues = randomInt(maxNumValues);
@@ -301,7 +301,7 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
@Test
public void testDuelStrings() throws Exception {
Random random = getRandom();
- int atLeast = scaledRandomIntBetween(1000, 1500);
+ int atLeast = scaledRandomIntBetween(200, 1500);
for (int i = 0; i < atLeast; i++) {
Document d = new Document();
d.add(new StringField("_id", "" + i, Field.Store.NO));
@@ -407,8 +407,8 @@ public class DuelFieldDataTests extends AbstractFieldDataTests {
final DocumentMapper mapper = mapperService.documentMapperParser().parse(mapping);
Random random = getRandom();
- int atLeast = scaledRandomIntBetween(1000, 1500);
- int maxValuesPerDoc = randomBoolean() ? 1 : randomIntBetween(2, 40);
+ int atLeast = scaledRandomIntBetween(200, 1500);
+ int maxValuesPerDoc = randomBoolean() ? 1 : randomIntBetween(2, 10);
// to test deduplication
double defaultLat = randomDouble() * 180 - 90;
double defaultLon = randomDouble() * 360 - 180;
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java
index eeab72920e2..393f481e170 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java
@@ -21,12 +21,11 @@ package org.elasticsearch.index.fielddata;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -36,7 +35,7 @@ import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
-public class FieldDataFilterIntegrationTests extends ElasticsearchIntegrationTest {
+public class FieldDataFilterIntegrationIT extends ESIntegTestCase {
@Override
protected int numberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingTests.java
rename to core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java
index b3b820be0fb..12aeb70df21 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java
@@ -20,7 +20,7 @@
package org.elasticsearch.index.fielddata;
import org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.greaterThan;
/**
*/
-public class FieldDataLoadingTests extends ElasticsearchIntegrationTest {
+public class FieldDataLoadingIT extends ESIntegTestCase {
@Test
public void testEagerFieldDataLoading() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataTests.java
index 46d3ce955e7..33ddc80868a 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataTests.java
@@ -23,9 +23,9 @@ import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.NumericDocValues;
import org.apache.lucene.index.SortedNumericDocValues;
import org.apache.lucene.util.NumericUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
-public class FieldDataTests extends ElasticsearchTestCase {
+public class FieldDataTests extends ESTestCase {
public void testSortableLongBitsToDoubles() {
final double value = randomDouble();
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/IndexFieldDataServiceTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/IndexFieldDataServiceTests.java
index 2823566fddd..002a82ef355 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/IndexFieldDataServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/IndexFieldDataServiceTests.java
@@ -33,7 +33,7 @@ import org.elasticsearch.index.mapper.Mapper.BuilderContext;
import org.elasticsearch.index.mapper.MapperBuilders;
import org.elasticsearch.index.mapper.core.*;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.Arrays;
import java.util.Collections;
@@ -42,7 +42,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.instanceOf;
-public class IndexFieldDataServiceTests extends ElasticsearchSingleNodeTest {
+public class IndexFieldDataServiceTests extends ESSingleNodeTestCase {
private static Settings DOC_VALUES_SETTINGS = Settings.builder().put(FieldDataType.FORMAT_KEY, FieldDataType.DOC_VALUES_FORMAT_VALUE).build();
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/ScriptDocValuesTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/ScriptDocValuesTests.java
index a51af09f76e..00823199f7a 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/ScriptDocValuesTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/ScriptDocValuesTests.java
@@ -22,11 +22,11 @@ package org.elasticsearch.index.fielddata;
import org.elasticsearch.common.geo.GeoDistance;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.unit.DistanceUnit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Arrays;
-public class ScriptDocValuesTests extends ElasticsearchTestCase {
+public class ScriptDocValuesTests extends ESTestCase {
private static MultiGeoPointValues wrap(final GeoPoint... points) {
return new MultiGeoPointValues() {
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/fieldcomparator/ReplaceMissingTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/fieldcomparator/ReplaceMissingTests.java
index 08a960e7699..e25b5c73c69 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/fieldcomparator/ReplaceMissingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/fieldcomparator/ReplaceMissingTests.java
@@ -24,9 +24,9 @@ import org.apache.lucene.document.SortedDocValuesField;
import org.apache.lucene.index.*;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.BytesRef;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
-public class ReplaceMissingTests extends ElasticsearchTestCase {
+public class ReplaceMissingTests extends ESTestCase {
public void test() throws Exception {
Directory dir = newDirectory();
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/MultiOrdinalsTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/MultiOrdinalsTests.java
index dd84f1515fa..f855d3f9d7e 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/MultiOrdinalsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/MultiOrdinalsTests.java
@@ -24,7 +24,7 @@ import org.apache.lucene.util.packed.PackedInts;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.fielddata.FieldData;
import org.elasticsearch.search.MultiValueMode;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class MultiOrdinalsTests extends ElasticsearchTestCase {
+public class MultiOrdinalsTests extends ESTestCase {
protected final Ordinals creationMultiOrdinals(OrdinalsBuilder builder) {
return this.creationMultiOrdinals(builder, Settings.builder());
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/SingleOrdinalsTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/SingleOrdinalsTests.java
index ebb8eb361fe..59be0f9a4fe 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/SingleOrdinalsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/ordinals/SingleOrdinalsTests.java
@@ -22,7 +22,7 @@ import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.RandomAccessOrds;
import org.apache.lucene.index.SortedDocValues;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class SingleOrdinalsTests extends ElasticsearchTestCase {
+public class SingleOrdinalsTests extends ESTestCase {
@Test
public void testSvValues() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/plain/ParentChildFilteredTermsEnumTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/plain/ParentChildFilteredTermsEnumTests.java
index 48c95aa3f65..7a1aad21824 100644
--- a/core/src/test/java/org/elasticsearch/index/fielddata/plain/ParentChildFilteredTermsEnumTests.java
+++ b/core/src/test/java/org/elasticsearch/index/fielddata/plain/ParentChildFilteredTermsEnumTests.java
@@ -26,7 +26,7 @@ import org.apache.lucene.index.*;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.BytesRef;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Locale;
@@ -37,7 +37,7 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*/
-public class ParentChildFilteredTermsEnumTests extends ElasticsearchTestCase {
+public class ParentChildFilteredTermsEnumTests extends ESTestCase {
@Test
public void testSimple_twoFieldEachUniqueValue() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.java
index 32da43da403..8afdea27451 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.java
@@ -22,7 +22,7 @@ import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import java.util.Map;
@@ -30,7 +30,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
-public class DynamicMappingIntegrationTests extends ElasticsearchIntegrationTest {
+public class DynamicMappingIntegrationIT extends ESIntegTestCase {
public void testConflictingDynamicMappings() {
// we don't use indexRandom because the order of requests is important here
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java
index 2c7e2b3734b..02841f7f570 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.core.IntegerFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class DynamicMappingTests extends ElasticsearchSingleNodeTest {
+public class DynamicMappingTests extends ESSingleNodeTestCase {
public void testDynamicTrue() throws IOException {
String mapping = jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java b/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java
index a3b3ea12af2..ca31a789f28 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java
@@ -24,14 +24,14 @@ import com.google.common.collect.Lists;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-public class FieldTypeLookupTests extends ElasticsearchTestCase {
+public class FieldTypeLookupTests extends ESTestCase {
public void testEmpty() {
FieldTypeLookup lookup = new FieldTypeLookup();
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeTestCase.java b/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeTestCase.java
index 4d7e9c7137e..a27a4344c56 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeTestCase.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/FieldTypeTestCase.java
@@ -22,13 +22,13 @@ import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.fielddata.FieldDataType;
import org.elasticsearch.index.similarity.BM25SimilarityProvider;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.ArrayList;
import java.util.List;
/** Base test case for subclasses of MappedFieldType */
-public abstract class FieldTypeTestCase extends ElasticsearchTestCase {
+public abstract class FieldTypeTestCase extends ESTestCase {
/** Create a default constructed fieldtype */
protected abstract MappedFieldType createDefaultFieldType();
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIntegrationTest.java b/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java
index 443ce1b39fb..8e88cbb3d3c 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.search.suggest.SuggestBuilders;
import org.elasticsearch.search.suggest.completion.CompletionSuggestion;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.not;
* Tests for transforming the source document before indexing.
*/
@SuppressCodecs("*") // requires custom completion format
-public class TransformOnIndexMapperIntegrationTest extends ElasticsearchIntegrationTest {
+public class TransformOnIndexMapperIT extends ESIntegTestCase {
@Test
public void searchOnTransformed() throws Exception {
setup(true);
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/UidTests.java b/core/src/test/java/org/elasticsearch/index/mapper/UidTests.java
index 1d2be4592f8..d6a5c9f5537 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/UidTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/UidTests.java
@@ -19,12 +19,12 @@
package org.elasticsearch.index.mapper;
import org.apache.lucene.util.BytesRef;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class UidTests extends ElasticsearchTestCase {
+public class UidTests extends ESTestCase {
@Test
public void testCreateAndSplitId() {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java
index b0dcad36309..e80dcec3e97 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/all/SimpleAllMapperTests.java
@@ -44,9 +44,8 @@ import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.internal.AllFieldMapper;
-import org.elasticsearch.index.mapper.internal.IndexFieldMapper;
import org.elasticsearch.index.mapper.internal.SizeFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -68,7 +67,7 @@ import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class SimpleAllMapperTests extends ElasticsearchSingleNodeTest {
+public class SimpleAllMapperTests extends ESSingleNodeTestCase {
public void testSimpleAllMappers() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/all/mapping.json");
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/binary/BinaryMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/binary/BinaryMappingTests.java
index ac71875b721..b5a002d331e 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/binary/BinaryMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/binary/BinaryMappingTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.core.BinaryFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
import java.util.Arrays;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class BinaryMappingTests extends ElasticsearchSingleNodeTest {
+public class BinaryMappingTests extends ESSingleNodeTestCase {
public void testDefaultMapping() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/boost/CustomBoostMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/boost/CustomBoostMappingTests.java
index c4f55cb4192..d18acfe56aa 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/boost/CustomBoostMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/boost/CustomBoostMappingTests.java
@@ -22,12 +22,12 @@ package org.elasticsearch.index.mapper.boost;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class CustomBoostMappingTests extends ElasticsearchSingleNodeTest {
+public class CustomBoostMappingTests extends ESSingleNodeTestCase {
@Test
public void testCustomBoostValues() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/boost/FieldLevelBoostTests.java b/core/src/test/java/org/elasticsearch/index/mapper/boost/FieldLevelBoostTests.java
index a160883ac66..5c5ce7bdaed 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/boost/FieldLevelBoostTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/boost/FieldLevelBoostTests.java
@@ -25,14 +25,14 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.ParseContext.Document;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.closeTo;
/**
*/
-public class FieldLevelBoostTests extends ElasticsearchSingleNodeTest {
+public class FieldLevelBoostTests extends ESSingleNodeTestCase {
@Test
public void testFieldLevelBoost() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/camelcase/CamelCaseFieldNameTests.java b/core/src/test/java/org/elasticsearch/index/mapper/camelcase/CamelCaseFieldNameTests.java
index 76cebd6b75f..89e186445d1 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/camelcase/CamelCaseFieldNameTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/camelcase/CamelCaseFieldNameTests.java
@@ -23,13 +23,13 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
/**
*
*/
-public class CamelCaseFieldNameTests extends ElasticsearchSingleNodeTest {
+public class CamelCaseFieldNameTests extends ESSingleNodeTestCase {
@Test
public void testCamelCaseFieldNameStaysAsIs() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/completion/CompletionFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/completion/CompletionFieldMapperTests.java
index e0031cf1d04..717823d9ffc 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/completion/CompletionFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/completion/CompletionFieldMapperTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.core.CompletionFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
-public class CompletionFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class CompletionFieldMapperTests extends ESSingleNodeTestCase {
@Test
public void testDefaultConfiguration() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/compound/CompoundTypesTests.java b/core/src/test/java/org/elasticsearch/index/mapper/compound/CompoundTypesTests.java
index 0c78bae6d76..fa2e1a12375 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/compound/CompoundTypesTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/compound/CompoundTypesTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.index.mapper.compound;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.closeTo;
import static org.hamcrest.Matchers.equalTo;
-public class CompoundTypesTests extends ElasticsearchSingleNodeTest {
+public class CompoundTypesTests extends ESSingleNodeTestCase {
@Test
public void testStringType() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationIT.java
index d30fa25a993..5919c52bc31 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class CopyToMapperIntegrationTests extends ElasticsearchIntegrationTest {
+public class CopyToMapperIntegrationIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperTests.java
index 870ab31321e..419dde456de 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperTests.java
@@ -19,8 +19,6 @@
package org.elasticsearch.index.mapper.copyto;
-import com.google.common.collect.ImmutableList;
-
import org.apache.lucene.index.IndexableField;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.ToXContent;
@@ -39,7 +37,7 @@ import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.core.LongFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -55,7 +53,7 @@ import static org.hamcrest.Matchers.startsWith;
/**
*
*/
-public class CopyToMapperTests extends ElasticsearchSingleNodeTest {
+public class CopyToMapperTests extends ESSingleNodeTestCase {
@SuppressWarnings("unchecked")
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/BooleanFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/BooleanFieldMapperTests.java
index b9790e8069d..53b930b87f8 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/core/BooleanFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/core/BooleanFieldMapperTests.java
@@ -36,12 +36,12 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Before;
import java.io.IOException;
-public class BooleanFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class BooleanFieldMapperTests extends ESSingleNodeTestCase {
IndexService indexService;
DocumentMapperParser parser;
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/Murmur3FieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/Murmur3FieldMapperTests.java
index d28609e5bee..d4cfcb8ccde 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/core/Murmur3FieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/core/Murmur3FieldMapperTests.java
@@ -28,10 +28,10 @@ import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.MapperParsingException;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Before;
-public class Murmur3FieldMapperTests extends ElasticsearchSingleNodeTest {
+public class Murmur3FieldMapperTests extends ESSingleNodeTestCase {
IndexService indexService;
DocumentMapperParser parser;
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.java
index ffbe671580f..837a7a060c1 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.java
@@ -22,7 +22,6 @@ package org.elasticsearch.index.mapper.core;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import com.google.common.collect.ImmutableList;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.index.IndexRequestBuilder;
@@ -32,7 +31,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +41,7 @@ import java.util.List;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.*;
-public class TokenCountFieldMapperIntegrationTests extends ElasticsearchIntegrationTest {
+public class TokenCountFieldMapperIntegrationIT extends ESIntegTestCase {
@ParametersFactory
public static Iterable buildParameters() {
List parameters = new ArrayList<>();
@@ -57,7 +56,7 @@ public class TokenCountFieldMapperIntegrationTests extends ElasticsearchIntegrat
private final boolean storeCountedFields;
private final boolean loadCountedFields;
- public TokenCountFieldMapperIntegrationTests(@Name("storeCountedFields") boolean storeCountedFields,
+ public TokenCountFieldMapperIntegrationIT(@Name("storeCountedFields") boolean storeCountedFields,
@Name("loadCountedFields") boolean loadCountedFields) {
this.storeCountedFields = storeCountedFields;
this.loadCountedFields = loadCountedFields;
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperTests.java
index 4c5c7cfd234..818366647d1 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.MergeResult;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Test for {@link TokenCountFieldMapper}.
*/
-public class TokenCountFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class TokenCountFieldMapperTests extends ESSingleNodeTestCase {
@Test
public void testMerge() throws IOException {
String stage1Mapping = XContentFactory.jsonBuilder().startObject()
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/date/DateBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/index/mapper/date/DateBackwardsCompatibilityTests.java
index 05dd79de1ea..b6ecb24d42a 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/date/DateBackwardsCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/date/DateBackwardsCompatibilityTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Before;
import java.util.List;
@@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.is;
* Test class to check for all the conditions defined in
* https://github.com/elastic/elasticsearch/issues/10971
*/
-public class DateBackwardsCompatibilityTests extends ElasticsearchSingleNodeTest {
+public class DateBackwardsCompatibilityTests extends ESSingleNodeTestCase {
private String index = "testindex";
private String type = "testtype";
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java
index ebc638b33f1..aacf34b7ba8 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/date/SimpleDateMappingTests.java
@@ -45,7 +45,7 @@ import org.elasticsearch.index.mapper.core.DateFieldMapper;
import org.elasticsearch.index.mapper.core.LongFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.elasticsearch.test.VersionUtils;
import org.joda.time.DateTime;
@@ -60,7 +60,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.mapper.string.SimpleStringMappingTests.docValuesType;
import static org.hamcrest.Matchers.*;
-public class SimpleDateMappingTests extends ElasticsearchSingleNodeTest {
+public class SimpleDateMappingTests extends ESSingleNodeTestCase {
public void testAutomaticDateParser() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/genericstore/GenericStoreDynamicTemplateTests.java b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/genericstore/GenericStoreDynamicTemplateTests.java
index 44fad3b612d..83a14687b32 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/genericstore/GenericStoreDynamicTemplateTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/genericstore/GenericStoreDynamicTemplateTests.java
@@ -24,10 +24,9 @@ import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
-import org.elasticsearch.index.mapper.FieldMappers;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.elasticsearch.common.io.Streams.copyToBytesFromClasspath;
@@ -37,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class GenericStoreDynamicTemplateTests extends ElasticsearchSingleNodeTest {
+public class GenericStoreDynamicTemplateTests extends ESSingleNodeTestCase {
@Test
public void testSimple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/pathmatch/PathMatchDynamicTemplateTests.java b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/pathmatch/PathMatchDynamicTemplateTests.java
index 1c36e6959a3..b4c1ba668f4 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/pathmatch/PathMatchDynamicTemplateTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/pathmatch/PathMatchDynamicTemplateTests.java
@@ -24,11 +24,9 @@ import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
-import org.elasticsearch.index.mapper.FieldMappers;
-import org.elasticsearch.index.mapper.MapperUtils;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.ParseContext.Document;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.elasticsearch.common.io.Streams.copyToBytesFromClasspath;
@@ -38,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class PathMatchDynamicTemplateTests extends ElasticsearchSingleNodeTest {
+public class PathMatchDynamicTemplateTests extends ESSingleNodeTestCase {
@Test
public void testSimple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/simple/SimpleDynamicTemplatesTests.java b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/simple/SimpleDynamicTemplatesTests.java
index b106086157f..c136f4d989c 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/simple/SimpleDynamicTemplatesTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/dynamictemplate/simple/SimpleDynamicTemplatesTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.*;
import org.elasticsearch.index.mapper.ParseContext.Document;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class SimpleDynamicTemplatesTests extends ElasticsearchSingleNodeTest {
+public class SimpleDynamicTemplatesTests extends ESSingleNodeTestCase {
@Test
public void testMatchTypeOnly() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.java
index 44bc5541b72..101b3d6b16b 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.java
@@ -25,12 +25,12 @@ import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class ExternalValuesMapperIntegrationTests extends ElasticsearchIntegrationTest {
+public class ExternalValuesMapperIntegrationIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/SimpleExternalMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/SimpleExternalMappingTests.java
index 26e8da59d79..bc808ab5b03 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/SimpleExternalMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/SimpleExternalMappingTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
-public class SimpleExternalMappingTests extends ElasticsearchSingleNodeTest {
+public class SimpleExternalMappingTests extends ESSingleNodeTestCase {
@Test
public void testExternalValues() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoEncodingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoEncodingTests.java
index f52363e89ae..08b6e0d7169 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoEncodingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoEncodingTests.java
@@ -23,14 +23,14 @@ import org.elasticsearch.common.geo.GeoDistance;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.unit.DistanceUnit.Distance;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Arrays;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
-public class GeoEncodingTests extends ElasticsearchTestCase {
+public class GeoEncodingTests extends ESTestCase {
public void test() {
for (int i = 0; i < 10000; ++i) {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapperTests.java
index 4d721abf5ea..2584e861643 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapperTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.MergeResult;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
-public class GeoPointFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class GeoPointFieldMapperTests extends ESSingleNodeTestCase {
@Test
public void testLatLonValues() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java
index 24e9be49b67..b30589b8c93 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeoShapeFieldMapperTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MergeResult;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.isIn;
-public class GeoShapeFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class GeoShapeFieldMapperTests extends ESSingleNodeTestCase {
@Test
public void testDefaultConfiguration() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeohashMappingGeoPointTests.java b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeohashMappingGeoPointTests.java
index 6274d0fb463..537df6b9320 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/geo/GeohashMappingGeoPointTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/geo/GeohashMappingGeoPointTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class GeohashMappingGeoPointTests extends ElasticsearchSingleNodeTest {
+public class GeohashMappingGeoPointTests extends ESSingleNodeTestCase {
@Test
public void testLatLonValues() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/id/IdMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/id/IdMappingTests.java
index 1acae6fbaec..2688674f859 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/id/IdMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/id/IdMappingTests.java
@@ -32,13 +32,13 @@ import org.elasticsearch.index.mapper.SourceToParse;
import org.elasticsearch.index.mapper.Uid;
import org.elasticsearch.index.mapper.internal.IdFieldMapper;
import org.elasticsearch.index.mapper.internal.UidFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-public class IdMappingTests extends ElasticsearchSingleNodeTest {
+public class IdMappingTests extends ESSingleNodeTestCase {
public void testId() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/index/IndexTypeMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/index/IndexTypeMapperTests.java
index 8bafd2f15d0..bfb01476957 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/index/IndexTypeMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/index/IndexTypeMapperTests.java
@@ -27,11 +27,11 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.internal.IndexFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.hamcrest.Matchers.*;
-public class IndexTypeMapperTests extends ElasticsearchSingleNodeTest {
+public class IndexTypeMapperTests extends ESSingleNodeTestCase {
private Settings bwcSettings = Settings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.V_1_4_2.id).build();
public void testSimpleIndexMapperEnabledBackcompat() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldMapperTests.java
index ad8cff4c2a5..4753f903cbf 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/internal/FieldNamesFieldMapperTests.java
@@ -27,13 +27,13 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.Arrays;
import java.util.SortedSet;
import java.util.TreeSet;
-public class FieldNamesFieldMapperTests extends ElasticsearchSingleNodeTest {
+public class FieldNamesFieldMapperTests extends ESSingleNodeTestCase {
private static SortedSet extract(String path) {
SortedSet set = new TreeSet<>();
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/ip/SimpleIpMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/ip/SimpleIpMappingTests.java
index 31bf53da1cf..07d0940b3b3 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/ip/SimpleIpMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/ip/SimpleIpMappingTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class SimpleIpMappingTests extends ElasticsearchSingleNodeTest {
+public class SimpleIpMappingTests extends ESSingleNodeTestCase {
@Test
public void testSimpleMapping() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/lucene/DoubleIndexingDocTest.java b/core/src/test/java/org/elasticsearch/index/mapper/lucene/DoubleIndexingDocTest.java
index 5dfa9abeaa9..55845010185 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/lucene/DoubleIndexingDocTest.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/lucene/DoubleIndexingDocTest.java
@@ -24,14 +24,12 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory;
-import org.elasticsearch.common.logging.ESLoggerFactory;
import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
-import org.elasticsearch.index.mapper.MapperUtils;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -39,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class DoubleIndexingDocTest extends ElasticsearchSingleNodeTest {
+public class DoubleIndexingDocTest extends ESSingleNodeTestCase {
@Test
public void testDoubleIndexingSameDoc() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/lucene/StoredNumericValuesTest.java b/core/src/test/java/org/elasticsearch/index/mapper/lucene/StoredNumericValuesTest.java
index 21597f41821..558ba257399 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/lucene/StoredNumericValuesTest.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/lucene/StoredNumericValuesTest.java
@@ -34,7 +34,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.fieldvisitor.CustomFieldsVisitor;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class StoredNumericValuesTest extends ElasticsearchSingleNodeTest {
+public class StoredNumericValuesTest extends ESSingleNodeTestCase {
@Test
public void testBytesAndNumericRepresentation() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/merge/TestMergeMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/merge/TestMergeMapperTests.java
index 15a61a01b64..1a66879c448 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/merge/TestMergeMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/merge/TestMergeMapperTests.java
@@ -23,7 +23,6 @@ import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.index.analysis.FieldNameAnalyzer;
import org.elasticsearch.index.analysis.NamedAnalyzer;
import org.elasticsearch.index.mapper.DocumentFieldMappers;
import org.elasticsearch.index.mapper.DocumentMapper;
@@ -34,8 +33,7 @@ import org.elasticsearch.index.mapper.MergeResult;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.elasticsearch.index.mapper.object.ObjectMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
-import org.junit.Test;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -45,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-public class TestMergeMapperTests extends ElasticsearchSingleNodeTest {
+public class TestMergeMapperTests extends ESSingleNodeTestCase {
public void test1Merge() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldTests.java b/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldTests.java
index 0dc9ac6242f..8511bf96c08 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldTests.java
@@ -39,7 +39,7 @@ import org.elasticsearch.index.mapper.core.LongFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.elasticsearch.index.mapper.core.TokenCountFieldMapper;
import org.elasticsearch.index.mapper.geo.GeoPointFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class MultiFieldTests extends ElasticsearchSingleNodeTest {
+public class MultiFieldTests extends ESSingleNodeTestCase {
@Test
public void testMultiField_multiFieldType() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationIT.java
index 60609d82b1a..f3636bf4c47 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.unit.DistanceUnit;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class MultiFieldsIntegrationTests extends ElasticsearchIntegrationTest {
+public class MultiFieldsIntegrationIT extends ESIntegTestCase {
@Test
public void testMultiFields() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/multifield/merge/JavaMultiFieldMergeTests.java b/core/src/test/java/org/elasticsearch/index/mapper/multifield/merge/JavaMultiFieldMergeTests.java
index b8bb32266be..5405aee6ec8 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/multifield/merge/JavaMultiFieldMergeTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/multifield/merge/JavaMultiFieldMergeTests.java
@@ -21,26 +21,24 @@ package org.elasticsearch.index.mapper.multifield.merge;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;
-import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.MergeResult;
import org.elasticsearch.index.mapper.ParseContext.Document;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.Arrays;
-import static org.elasticsearch.common.io.Streams.copyToBytesFromClasspath;
import static org.elasticsearch.common.io.Streams.copyToStringFromClasspath;
import static org.hamcrest.Matchers.*;
/**
*
*/
-public class JavaMultiFieldMergeTests extends ElasticsearchSingleNodeTest {
+public class JavaMultiFieldMergeTests extends ESSingleNodeTestCase {
@Test
public void testMergeMultiField() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/nested/NestedMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/nested/NestedMappingTests.java
index 5f7e8f75b85..5ae90bd5a0c 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/nested/NestedMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/nested/NestedMappingTests.java
@@ -25,13 +25,13 @@ import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.internal.TypeFieldMapper;
import org.elasticsearch.index.mapper.object.ObjectMapper;
import org.elasticsearch.index.mapper.object.ObjectMapper.Dynamic;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class NestedMappingTests extends ElasticsearchSingleNodeTest {
+public class NestedMappingTests extends ESSingleNodeTestCase {
@Test
public void emptyNested() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/null_value/NullValueTests.java b/core/src/test/java/org/elasticsearch/index/mapper/null_value/NullValueTests.java
index ec8b3b077d5..d7aa84c2dfe 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/null_value/NullValueTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/null_value/NullValueTests.java
@@ -24,14 +24,14 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
/**
*/
-public class NullValueTests extends ElasticsearchSingleNodeTest {
+public class NullValueTests extends ESSingleNodeTestCase {
@Test
public void testNullNull_Value() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/numeric/SimpleNumericTests.java b/core/src/test/java/org/elasticsearch/index/mapper/numeric/SimpleNumericTests.java
index 2da6f3a607e..728152afdb3 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/numeric/SimpleNumericTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/numeric/SimpleNumericTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.mapper.core.LongFieldMapper;
import org.elasticsearch.index.mapper.core.NumberFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.elasticsearch.index.mapper.string.SimpleStringMappingTests;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-public class SimpleNumericTests extends ElasticsearchSingleNodeTest {
+public class SimpleNumericTests extends ESSingleNodeTestCase {
@Test
public void testNumericDetectionEnabled() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/object/NullValueObjectMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/object/NullValueObjectMappingTests.java
index 9a5ffe070a6..f2b0b19af57 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/object/NullValueObjectMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/object/NullValueObjectMappingTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.mapper.object;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class NullValueObjectMappingTests extends ElasticsearchSingleNodeTest {
+public class NullValueObjectMappingTests extends ESSingleNodeTestCase {
@Test
public void testNullValueObject() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/object/SimpleObjectMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/object/SimpleObjectMappingTests.java
index 6392eb4f2cb..ee604e006bf 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/object/SimpleObjectMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/object/SimpleObjectMappingTests.java
@@ -20,16 +20,15 @@
package org.elasticsearch.index.mapper.object;
import org.elasticsearch.common.bytes.BytesArray;
-import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperParsingException;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
/**
*/
-public class SimpleObjectMappingTests extends ElasticsearchSingleNodeTest {
+public class SimpleObjectMappingTests extends ESSingleNodeTestCase {
@Test
public void testDifferentInnerObjectTokenFailure() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/parent/ParentMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/parent/ParentMappingTests.java
index e748510ee36..bdfb0e475b4 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/parent/ParentMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/parent/ParentMappingTests.java
@@ -26,11 +26,11 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.SourceToParse;
import org.elasticsearch.index.mapper.Uid;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.hamcrest.Matchers.nullValue;
-public class ParentMappingTests extends ElasticsearchSingleNodeTest {
+public class ParentMappingTests extends ESSingleNodeTestCase {
public void testParentNotSet() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/path/PathMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/path/PathMapperTests.java
index 9a19a449c84..4bd12550d89 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/path/PathMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/path/PathMapperTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.index.mapper.path;
import org.elasticsearch.index.mapper.DocumentMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class PathMapperTests extends ElasticsearchSingleNodeTest {
+public class PathMapperTests extends ESSingleNodeTestCase {
@Test
public void testPathMapping() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/routing/RoutingTypeMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/routing/RoutingTypeMapperTests.java
index 9b053858a41..30fcb5f3d6d 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/routing/RoutingTypeMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/routing/RoutingTypeMapperTests.java
@@ -34,13 +34,13 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.SourceToParse;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class RoutingTypeMapperTests extends ElasticsearchSingleNodeTest {
+public class RoutingTypeMapperTests extends ESSingleNodeTestCase {
public void testRoutingMapper() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/simple/SimpleMapperTests.java b/core/src/test/java/org/elasticsearch/index/mapper/simple/SimpleMapperTests.java
index 7b479e909cf..5c4bd28a028 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/simple/SimpleMapperTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/simple/SimpleMapperTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.*;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.elasticsearch.common.io.Streams.copyToBytesFromClasspath;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class SimpleMapperTests extends ElasticsearchSingleNodeTest {
+public class SimpleMapperTests extends ESSingleNodeTestCase {
@Test
public void testSimpleMapper() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationIT.java
index 55e763065af..6e004c4d0e9 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.mapper.size;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -32,7 +32,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class SizeMappingIntegrationTests extends ElasticsearchIntegrationTest {
+public class SizeMappingIntegrationIT extends ESIntegTestCase {
@Test // issue 5053
public void testThatUpdatingMappingShouldNotRemoveSizeMappingConfiguration() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingTests.java
index 35208ba2a14..6f66c515b26 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingTests.java
@@ -28,11 +28,11 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.SourceToParse;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import static org.hamcrest.Matchers.*;
-public class SizeMappingTests extends ElasticsearchSingleNodeTest {
+public class SizeMappingTests extends ESSingleNodeTestCase {
public void testSizeEnabled() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/source/CompressSourceMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/source/CompressSourceMappingTests.java
index 82067a303c8..56c188b7aa3 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/source/CompressSourceMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/source/CompressSourceMappingTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class CompressSourceMappingTests extends ElasticsearchSingleNodeTest {
+public class CompressSourceMappingTests extends ESSingleNodeTestCase {
Settings settings = Settings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.V_1_4_2.id).build();
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/source/DefaultSourceMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/source/DefaultSourceMappingTests.java
index 0640f7ba2de..6e055f7403d 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/source/DefaultSourceMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/source/DefaultSourceMappingTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.mapper.*;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
import java.util.ArrayList;
@@ -40,7 +40,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class DefaultSourceMappingTests extends ElasticsearchSingleNodeTest {
+public class DefaultSourceMappingTests extends ESSingleNodeTestCase {
public void testNoFormat() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/string/SimpleStringMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/string/SimpleStringMappingTests.java
index 4204596901e..a540dd8e6a1 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/string/SimpleStringMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/string/SimpleStringMappingTests.java
@@ -26,10 +26,6 @@ import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.IndexableFieldType;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.queries.TermsQuery;
-import org.apache.lucene.search.TermQuery;
-import org.elasticsearch.common.lucene.search.Queries;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -47,12 +43,11 @@ import org.elasticsearch.index.mapper.MergeResult;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
-import java.util.Collections;
import java.util.Map;
import static org.elasticsearch.index.mapper.core.StringFieldMapper.Builder;
@@ -62,7 +57,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-public class SimpleStringMappingTests extends ElasticsearchSingleNodeTest {
+public class SimpleStringMappingTests extends ESSingleNodeTestCase {
private static Settings DOC_VALUES_SETTINGS = Settings.builder().put(FieldDataType.FORMAT_KEY, FieldDataType.DOC_VALUES_FORMAT_VALUE).build();
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/timestamp/TimestampMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/timestamp/TimestampMappingTests.java
index edf8f7cfd27..e33f898427d 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/timestamp/TimestampMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/timestamp/TimestampMappingTests.java
@@ -39,7 +39,7 @@ import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.mapper.*;
import org.elasticsearch.index.mapper.internal.TimestampFieldMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -59,7 +59,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class TimestampMappingTests extends ElasticsearchSingleNodeTest {
+public class TimestampMappingTests extends ESSingleNodeTestCase {
Settings BWC_SETTINGS = Settings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.V_1_4_2.id).build();
@Test
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/ttl/TTLMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/ttl/TTLMappingTests.java
index c148cfb510d..c9b6131900f 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/ttl/TTLMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/ttl/TTLMappingTests.java
@@ -29,13 +29,12 @@ import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.*;
import org.elasticsearch.index.mapper.internal.TTLFieldMapper;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -45,7 +44,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class TTLMappingTests extends ElasticsearchSingleNodeTest {
+public class TTLMappingTests extends ESSingleNodeTestCase {
@Test
public void testSimpleDisabled() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().string();
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseDocumentTypeLevelsTests.java b/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseDocumentTypeLevelsTests.java
index 061abaeea7b..21ee96522c1 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseDocumentTypeLevelsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseDocumentTypeLevelsTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.mapper.typelevels;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.ParsedDocument;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class ParseDocumentTypeLevelsTests extends ElasticsearchSingleNodeTest {
+public class ParseDocumentTypeLevelsTests extends ESSingleNodeTestCase {
@Test
public void testNoLevel() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseMappingTypeLevelTests.java b/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseMappingTypeLevelTests.java
index a874c872734..0dcbacedf40 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseMappingTypeLevelTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/typelevels/ParseMappingTypeLevelTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.index.mapper.typelevels;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.DocumentMapperParser;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
// TODO: move this test...it doesn't need to be by itself
-public class ParseMappingTypeLevelTests extends ElasticsearchSingleNodeTest {
+public class ParseMappingTypeLevelTests extends ESSingleNodeTestCase {
@Test
public void testTypeLevel() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterTests.java b/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterTests.java
rename to core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterIT.java
index e12efa6a58d..7478b79bf7b 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.client.Client;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.MergeMappingException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -36,7 +36,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
-public class UpdateMappingOnClusterTests extends ElasticsearchIntegrationTest {
+public class UpdateMappingOnClusterIT extends ESIntegTestCase {
private static final String INDEX = "index";
private static final String TYPE = "type";
diff --git a/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingTests.java b/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingTests.java
index e842543a6fd..a45d4a34a13 100644
--- a/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.MergeResult;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.elasticsearch.common.io.Streams.copyToStringFromClasspath;
import static org.hamcrest.CoreMatchers.equalTo;
-public class UpdateMappingTests extends ElasticsearchSingleNodeTest {
+public class UpdateMappingTests extends ESSingleNodeTestCase {
@Test
public void test_all_enabled_after_disabled() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/query/GeoShapeQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/GeoShapeQueryBuilderTests.java
index b7acdf8c179..7a4d1d9a53d 100644
--- a/core/src/test/java/org/elasticsearch/index/query/GeoShapeQueryBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/index/query/GeoShapeQueryBuilderTests.java
@@ -22,10 +22,10 @@ package org.elasticsearch.index.query;
import org.elasticsearch.common.geo.builders.EnvelopeBuilder;
import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
-public class GeoShapeQueryBuilderTests extends ElasticsearchTestCase {
+public class GeoShapeQueryBuilderTests extends ESTestCase {
@Test // see #3878
public void testThatXContentSerializationInsideOfArrayWorks() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeFormatTests.java b/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeFormatTests.java
index ca79a273a63..4a60a2da464 100644
--- a/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeFormatTests.java
+++ b/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeFormatTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.joda.time.DateTime;
import org.junit.Before;
@@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class IndexQueryParserFilterDateRangeFormatTests extends ElasticsearchSingleNodeTest {
+public class IndexQueryParserFilterDateRangeFormatTests extends ESSingleNodeTestCase {
private Injector injector;
private IndexQueryParserService queryParser;
diff --git a/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeTimezoneTests.java b/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeTimezoneTests.java
index fba5c021e26..5c7b122096a 100644
--- a/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeTimezoneTests.java
+++ b/core/src/test/java/org/elasticsearch/index/query/IndexQueryParserFilterDateRangeTimezoneTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
*
*/
-public class IndexQueryParserFilterDateRangeTimezoneTests extends ElasticsearchSingleNodeTest {
+public class IndexQueryParserFilterDateRangeTimezoneTests extends ESSingleNodeTestCase {
private Injector injector;
private IndexQueryParserService queryParser;
diff --git a/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java b/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
index a3294ceefdb..4be37c8c8aa 100644
--- a/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
+++ b/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
@@ -63,7 +63,7 @@ import org.elasticsearch.index.search.geo.GeoPolygonQuery;
import org.elasticsearch.index.search.geo.InMemoryGeoBoundingBoxQuery;
import org.elasticsearch.index.search.morelikethis.MoreLikeThisFetchService;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
@@ -80,7 +80,7 @@ import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBooleanSubQuery;
import static org.hamcrest.Matchers.*;
-public class SimpleIndexQueryParserTests extends ElasticsearchSingleNodeTest {
+public class SimpleIndexQueryParserTests extends ESSingleNodeTestCase {
private IndexQueryParserService queryParser;
diff --git a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryBuilderTest.java b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryBuilderTest.java
index 692f4147800..c7441199fce 100644
--- a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryBuilderTest.java
+++ b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryBuilderTest.java
@@ -22,7 +22,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.script.Template;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -32,7 +32,7 @@ import java.util.Map;
/**
* Test building and serialising a template search request.
* */
-public class TemplateQueryBuilderTest extends ElasticsearchTestCase {
+public class TemplateQueryBuilderTest extends ESTestCase {
@Test
public void testJSONGeneration() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryTest.java b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/index/query/TemplateQueryTest.java
rename to core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java
index 84cf99fe3fe..51fd769110c 100644
--- a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryTest.java
+++ b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java
@@ -36,7 +36,7 @@ import org.elasticsearch.script.ScriptService;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.script.Template;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -57,8 +57,8 @@ import static org.hamcrest.Matchers.is;
/**
* Full integration test of the template query plugin.
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class TemplateQueryTest extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class TemplateQueryIT extends ESIntegTestCase {
@Before
public void setup() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryParserTest.java b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryParserTest.java
index 65174b3acea..ccb9cd11139 100644
--- a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryParserTest.java
+++ b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryParserTest.java
@@ -44,7 +44,7 @@ import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.indices.query.IndicesQueriesModule;
import org.elasticsearch.script.ScriptModule;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.threadpool.ThreadPoolModule;
import org.junit.After;
@@ -56,8 +56,8 @@ import java.io.IOException;
/**
* Test parsing and executing a template request.
*/
-// NOTE: this can't be migrated to ElasticsearchSingleNodeTest because of the custom path.conf
-public class TemplateQueryParserTest extends ElasticsearchTestCase {
+// NOTE: this can't be migrated to ESSingleNodeTestCase because of the custom path.conf
+public class TemplateQueryParserTest extends ESTestCase {
private Injector injector;
private QueryParseContext context;
diff --git a/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserTests.java b/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserTests.java
rename to core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java
index 9e396b7e8d1..e4d345e80b0 100644
--- a/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserTests.java
+++ b/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.IndexQueryParserService;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.instanceOf;
-public class CustomQueryParserTests extends ElasticsearchIntegrationTest {
+public class CustomQueryParserIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTests.java b/core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTestCase.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTests.java
rename to core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTestCase.java
index 6488423fb64..c7dd274796c 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/AbstractChildTestCase.java
@@ -37,17 +37,15 @@ import org.elasticsearch.index.mapper.internal.UidFieldMapper;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryParseContext;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.hamcrest.Description;
import org.hamcrest.StringDescription;
-import org.junit.Ignore;
import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
-@Ignore
-public abstract class AbstractChildTests extends ElasticsearchSingleNodeTest {
+public abstract class AbstractChildTestCase extends ESSingleNodeTestCase {
/**
* The name of the field within the child type that stores a score to use in test queries.
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/ChildrenConstantScoreQueryTests.java b/core/src/test/java/org/elasticsearch/index/search/child/ChildrenConstantScoreQueryTests.java
index 0bae685e52d..2a74fb986e2 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/ChildrenConstantScoreQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/ChildrenConstantScoreQueryTests.java
@@ -72,7 +72,7 @@ import static org.elasticsearch.index.query.QueryBuilders.notQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.hamcrest.Matchers.equalTo;
-public class ChildrenConstantScoreQueryTests extends AbstractChildTests {
+public class ChildrenConstantScoreQueryTests extends AbstractChildTestCase {
@BeforeClass
public static void before() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/ChildrenQueryTests.java b/core/src/test/java/org/elasticsearch/index/search/child/ChildrenQueryTests.java
index 603ff559aea..9e70f667502 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/ChildrenQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/ChildrenQueryTests.java
@@ -89,7 +89,7 @@ import static org.elasticsearch.index.query.QueryBuilders.typeQuery;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
-public class ChildrenQueryTests extends AbstractChildTests {
+public class ChildrenQueryTests extends AbstractChildTestCase {
@BeforeClass
public static void before() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/ParentConstantScoreQueryTests.java b/core/src/test/java/org/elasticsearch/index/search/child/ParentConstantScoreQueryTests.java
index df5d8f6538c..ac5c3a46ece 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/ParentConstantScoreQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/ParentConstantScoreQueryTests.java
@@ -72,7 +72,7 @@ import static org.elasticsearch.index.query.QueryBuilders.termQuery;
/**
*/
-public class ParentConstantScoreQueryTests extends AbstractChildTests {
+public class ParentConstantScoreQueryTests extends AbstractChildTestCase {
@BeforeClass
public static void before() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/ParentQueryTests.java b/core/src/test/java/org/elasticsearch/index/search/child/ParentQueryTests.java
index 6c79ce5f157..836ddf3b6a8 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/ParentQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/ParentQueryTests.java
@@ -76,7 +76,7 @@ import static org.elasticsearch.index.query.QueryBuilders.hasParentQuery;
import static org.elasticsearch.index.query.QueryBuilders.notQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
-public class ParentQueryTests extends AbstractChildTests {
+public class ParentQueryTests extends AbstractChildTestCase {
@BeforeClass
public static void before() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/search/child/ScoreTypeTests.java b/core/src/test/java/org/elasticsearch/index/search/child/ScoreTypeTests.java
index 27d8641789a..de74b532c46 100644
--- a/core/src/test/java/org/elasticsearch/index/search/child/ScoreTypeTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/child/ScoreTypeTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.index.search.child;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests {@link ScoreType} to ensure backward compatibility of any changes.
*/
-public class ScoreTypeTests extends ElasticsearchTestCase {
+public class ScoreTypeTests extends ESTestCase {
@Test
public void minFromString() {
assertThat("fromString(min) != MIN", ScoreType.MIN, equalTo(ScoreType.fromString("min")));
diff --git a/core/src/test/java/org/elasticsearch/index/search/geo/GeoDistanceTests.java b/core/src/test/java/org/elasticsearch/index/search/geo/GeoDistanceTests.java
index a20ee881738..fdb11a0cfd3 100644
--- a/core/src/test/java/org/elasticsearch/index/search/geo/GeoDistanceTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/geo/GeoDistanceTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.search.geo;
import org.elasticsearch.common.geo.GeoDistance;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.unit.DistanceUnit;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class GeoDistanceTests extends ElasticsearchTestCase {
+public class GeoDistanceTests extends ESTestCase {
@Test
public void testDistanceCheck() {
diff --git a/core/src/test/java/org/elasticsearch/index/search/geo/GeoHashUtilsTests.java b/core/src/test/java/org/elasticsearch/index/search/geo/GeoHashUtilsTests.java
index 49e1b4d0dc6..44109816621 100644
--- a/core/src/test/java/org/elasticsearch/index/search/geo/GeoHashUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/geo/GeoHashUtilsTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.search.geo;
import org.elasticsearch.common.geo.GeoHashUtils;
import org.elasticsearch.common.geo.GeoPoint;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -31,7 +31,7 @@ import java.util.List;
/**
*
*/
-public class GeoHashUtilsTests extends ElasticsearchTestCase {
+public class GeoHashUtilsTests extends ESTestCase {
/**
* Pass condition: lat=42.6, lng=-5.6 should be encoded as "ezs42e44yx96",
diff --git a/core/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java b/core/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java
index 3614cf6e2e2..3089884cc79 100644
--- a/core/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/geo/GeoPointParsingTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.geo.GeoUtils;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import java.io.IOException;
import static org.hamcrest.Matchers.closeTo;
-public class GeoPointParsingTests extends ElasticsearchTestCase {
+public class GeoPointParsingTests extends ESTestCase {
// mind geohash precision and error
private static final double ERROR = 0.00001d;
diff --git a/core/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java b/core/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java
index 34c30be9223..cd9783448eb 100644
--- a/core/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/search/geo/GeoUtilsTests.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.geo.GeoUtils;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentParser.Token;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -39,7 +39,7 @@ import java.io.IOException;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.hamcrest.Matchers.*;
-public class GeoUtilsTests extends ElasticsearchTestCase {
+public class GeoUtilsTests extends ESTestCase {
private static final char[] BASE_32 = {'0', '1', '2', '3', '4', '5', '6',
'7', '8', '9', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n',
diff --git a/core/src/test/java/org/elasticsearch/index/shard/CommitPointsTests.java b/core/src/test/java/org/elasticsearch/index/shard/CommitPointsTests.java
index 64c53861a59..5a84bb0cec1 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/CommitPointsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/CommitPointsTests.java
@@ -23,7 +23,7 @@ import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class CommitPointsTests extends ElasticsearchTestCase {
+public class CommitPointsTests extends ESTestCase {
private final ESLogger logger = Loggers.getLogger(CommitPointsTests.class);
diff --git a/core/src/test/java/org/elasticsearch/index/shard/IndexShardModuleTests.java b/core/src/test/java/org/elasticsearch/index/shard/IndexShardModuleTests.java
index b5ac0cce405..e488905710a 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/IndexShardModuleTests.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/IndexShardModuleTests.java
@@ -21,11 +21,11 @@ package org.elasticsearch.index.shard;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
/** Unit test(s) for IndexShardModule */
-public class IndexShardModuleTests extends ElasticsearchTestCase {
+public class IndexShardModuleTests extends ESTestCase {
@Test
public void testDetermineShadowEngineShouldBeUsed() {
diff --git a/core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java b/core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java
index dbedad75077..48e4e1b0075 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/IndexShardTests.java
@@ -20,7 +20,6 @@ package org.elasticsearch.index.shard;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.store.LockObtainFailedException;
-import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.indices.stats.IndexStats;
import org.elasticsearch.action.search.SearchResponse;
@@ -29,7 +28,6 @@ import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.ShardRoutingState;
import org.elasticsearch.cluster.routing.TestShardRouting;
import org.elasticsearch.common.bytes.BytesArray;
-import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment;
@@ -43,14 +41,13 @@ import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.TranslogConfig;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.test.DummyShardLock;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ExecutionException;
@@ -65,7 +62,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Simple unit-test IndexShard related operations.
*/
-public class IndexShardTests extends ElasticsearchSingleNodeTest {
+public class IndexShardTests extends ESSingleNodeTestCase {
public void testFlushOnDeleteSetting() throws Exception {
boolean initValue = randomBoolean();
diff --git a/core/src/test/java/org/elasticsearch/index/shard/MergePolicySettingsTest.java b/core/src/test/java/org/elasticsearch/index/shard/MergePolicySettingsTest.java
index 7ccb91183d7..49ec5c29012 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/MergePolicySettingsTest.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/MergePolicySettingsTest.java
@@ -18,23 +18,14 @@
*/
package org.elasticsearch.index.shard;
-import org.apache.lucene.index.LogByteSizeMergePolicy;
-import org.apache.lucene.index.LogDocMergePolicy;
import org.apache.lucene.index.NoMergePolicy;
import org.apache.lucene.index.TieredMergePolicy;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.settings.IndexSettingsService;
-import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.index.shard.MergePolicyConfig;
-import org.elasticsearch.index.store.DirectoryService;
-import org.elasticsearch.index.store.Store;
-import org.elasticsearch.test.DummyShardLock;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +33,7 @@ import java.io.IOException;
import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
import static org.hamcrest.Matchers.equalTo;
-public class MergePolicySettingsTest extends ElasticsearchTestCase {
+public class MergePolicySettingsTest extends ESTestCase {
protected final ShardId shardId = new ShardId(new Index("index"), 1);
diff --git a/core/src/test/java/org/elasticsearch/index/shard/ShardPathTests.java b/core/src/test/java/org/elasticsearch/index/shard/ShardPathTests.java
index 075bad28324..e03698f62ee 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/ShardPathTests.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/ShardPathTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.shard;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -31,7 +31,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**
*/
-public class ShardPathTests extends ElasticsearchTestCase {
+public class ShardPathTests extends ESTestCase {
public void testLoadShardPath() throws IOException {
try (final NodeEnvironment env = newNodeEnvironment(settingsBuilder().build())) {
diff --git a/core/src/test/java/org/elasticsearch/index/shard/ShardUtilsTests.java b/core/src/test/java/org/elasticsearch/index/shard/ShardUtilsTests.java
index e2163fa89b6..3422c66a3e7 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/ShardUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/ShardUtilsTests.java
@@ -25,11 +25,11 @@ import org.apache.lucene.index.*;
import org.apache.lucene.store.BaseDirectoryWrapper;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
-public class ShardUtilsTests extends ElasticsearchTestCase {
+public class ShardUtilsTests extends ESTestCase {
public void testExtractShardId() throws IOException {
BaseDirectoryWrapper dir = newDirectory();
diff --git a/core/src/test/java/org/elasticsearch/index/shard/VersionFieldUpgraderTest.java b/core/src/test/java/org/elasticsearch/index/shard/VersionFieldUpgraderTest.java
index 6162267ba6b..cf25c1c8919 100644
--- a/core/src/test/java/org/elasticsearch/index/shard/VersionFieldUpgraderTest.java
+++ b/core/src/test/java/org/elasticsearch/index/shard/VersionFieldUpgraderTest.java
@@ -36,11 +36,10 @@ import org.apache.lucene.util.TestUtil;
import org.elasticsearch.common.Numbers;
import org.elasticsearch.index.mapper.internal.UidFieldMapper;
import org.elasticsearch.index.mapper.internal.VersionFieldMapper;
-import org.elasticsearch.index.shard.VersionFieldUpgrader;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
/** Tests upgrading old document versions from _uid payloads to _version docvalues */
-public class VersionFieldUpgraderTest extends ElasticsearchTestCase {
+public class VersionFieldUpgraderTest extends ESTestCase {
/** Simple test: one doc in the old format, check that it looks correct */
public void testUpgradeOneDocument() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java b/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java
index 3f4119b4739..6a42ba7e8ce 100644
--- a/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java
+++ b/core/src/test/java/org/elasticsearch/index/similarity/SimilarityTests.java
@@ -23,7 +23,7 @@ import org.apache.lucene.search.similarities.*;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.DocumentMapper;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -31,7 +31,7 @@ import java.io.IOException;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf;
-public class SimilarityTests extends ElasticsearchSingleNodeTest {
+public class SimilarityTests extends ESSingleNodeTestCase {
@Test
public void testResolveDefaultSimilarities() {
diff --git a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/FileInfoTest.java b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/FileInfoTest.java
index 3480ca84aea..297c228d8b0 100644
--- a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/FileInfoTest.java
+++ b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/FileInfoTest.java
@@ -24,7 +24,7 @@ import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.*;
import org.elasticsearch.index.store.StoreFileMetaData;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo.Fields;
import org.junit.Test;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
-public class FileInfoTest extends ElasticsearchTestCase {
+public class FileInfoTest extends ESTestCase {
@Test
public void testToFromXContent() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTest.java b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTest.java
index ea2b51ab971..8adc7f645f0 100644
--- a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTest.java
+++ b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.snapshots.blobstore;
import com.carrotsearch.randomizedtesting.generators.RandomInts;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.*;
@@ -27,7 +27,7 @@ import java.util.Random;
import static org.hamcrest.Matchers.equalTo;
-public class SlicedInputStreamTest extends ElasticsearchTestCase {
+public class SlicedInputStreamTest extends ESTestCase {
@Test
public void readRandom() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/store/CorruptedFileTest.java b/core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/index/store/CorruptedFileTest.java
rename to core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java
index ff19add418d..c80621c9861 100644
--- a/core/src/test/java/org/elasticsearch/index/store/CorruptedFileTest.java
+++ b/core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java
@@ -62,7 +62,7 @@ import org.elasticsearch.indices.recovery.RecoverySettings;
import org.elasticsearch.indices.recovery.RecoveryTarget;
import org.elasticsearch.monitor.fs.FsInfo;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.elasticsearch.test.transport.MockTransportService;
@@ -89,8 +89,8 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class CorruptedFileTest extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class CorruptedFileIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogTests.java b/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogTests.java
rename to core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java
index 9968e742cb9..5b3227c8a8e 100644
--- a/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogTests.java
+++ b/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.translog.TranslogConfig;
import org.elasticsearch.monitor.fs.FsInfo;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.engine.MockEngineSupport;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
@@ -57,8 +57,8 @@ import static org.hamcrest.Matchers.notNullValue;
/**
* Integration test for corrupted translog files
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope= ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 0)
-public class CorruptedTranslogTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE, numDataNodes = 0)
+public class CorruptedTranslogIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/index/store/DirectoryUtilsTest.java b/core/src/test/java/org/elasticsearch/index/store/DirectoryUtilsTest.java
index 950de0e27a3..3cfdaa26f17 100644
--- a/core/src/test/java/org/elasticsearch/index/store/DirectoryUtilsTest.java
+++ b/core/src/test/java/org/elasticsearch/index/store/DirectoryUtilsTest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.index.store;
import org.apache.lucene.store.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -29,7 +29,7 @@ import java.util.Set;
import static org.hamcrest.CoreMatchers.*;
-public class DirectoryUtilsTest extends ElasticsearchTestCase {
+public class DirectoryUtilsTest extends ESTestCase {
@Test
public void testGetLeave() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryTests.java b/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/index/store/ExceptionRetryTests.java
rename to core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java
index 916e7310b65..c42e320c6d8 100644
--- a/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryTests.java
+++ b/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.discovery.Discovery;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.*;
import org.junit.Test;
@@ -47,8 +47,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class ExceptionRetryTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class ExceptionRetryIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/index/store/IndexStoreTests.java b/core/src/test/java/org/elasticsearch/index/store/IndexStoreTests.java
index 1286a7322f1..9f22decd009 100644
--- a/core/src/test/java/org/elasticsearch/index/store/IndexStoreTests.java
+++ b/core/src/test/java/org/elasticsearch/index/store/IndexStoreTests.java
@@ -24,14 +24,14 @@ import org.apache.lucene.util.Constants;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.shard.ShardPath;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.nio.file.Path;
/**
*/
-public class IndexStoreTests extends ElasticsearchTestCase {
+public class IndexStoreTests extends ESTestCase {
public void testStoreDirectory() throws IOException {
final Path tempDir = createTempDir();
diff --git a/core/src/test/java/org/elasticsearch/index/store/LegacyVerificationTests.java b/core/src/test/java/org/elasticsearch/index/store/LegacyVerificationTests.java
index f870cfa1236..3d9c4f732bf 100644
--- a/core/src/test/java/org/elasticsearch/index/store/LegacyVerificationTests.java
+++ b/core/src/test/java/org/elasticsearch/index/store/LegacyVerificationTests.java
@@ -26,7 +26,7 @@ import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.Directory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
/**
* Simple tests for LegacyVerification (old segments)
@@ -34,7 +34,7 @@ import org.elasticsearch.test.ElasticsearchTestCase;
* segments is not longer needed.
*/
@Deprecated
-public class LegacyVerificationTests extends ElasticsearchTestCase {
+public class LegacyVerificationTests extends ESTestCase {
public void testAdler32() throws Exception {
Adler32 expected = new Adler32();
diff --git a/core/src/test/java/org/elasticsearch/index/store/StoreTest.java b/core/src/test/java/org/elasticsearch/index/store/StoreTest.java
index 95c043ae70d..524d069957a 100644
--- a/core/src/test/java/org/elasticsearch/index/store/StoreTest.java
+++ b/core/src/test/java/org/elasticsearch/index/store/StoreTest.java
@@ -46,7 +46,7 @@ import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.indices.store.TransportNodesListShardStoreMetaData;
import org.elasticsearch.test.DummyShardLock;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -65,7 +65,7 @@ import static org.elasticsearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.Matchers.*;
-public class StoreTest extends ElasticsearchTestCase {
+public class StoreTest extends ESTestCase {
@Test
public void testRefCount() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java b/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java
rename to core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java
index 7609de746fa..02d5279abb3 100644
--- a/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder;
import org.elasticsearch.search.suggest.term.TermSuggestionBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashSet;
@@ -45,8 +45,8 @@ import static org.hamcrest.Matchers.*;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class SuggestStatsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class SuggestStatsIT extends ESIntegTestCase {
@Override
protected int numberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java
index 416a2ea760b..06fa074b05b 100644
--- a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java
+++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java
@@ -29,7 +29,7 @@ import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.Version;
-import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityTests;
+import org.elasticsearch.bwcompat.OldIndexBackwardsCompatibilityIT;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
@@ -41,7 +41,7 @@ import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.VersionType;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.Before;
@@ -70,7 +70,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@LuceneTestCase.SuppressFileSystems("ExtrasFS")
-public class TranslogTests extends ElasticsearchTestCase {
+public class TranslogTests extends ESTestCase {
private static final Pattern PARSE_LEGACY_ID_PATTERN = Pattern.compile("^" + Translog.TRANSLOG_FILE_PREFIX + "(\\d+)((\\.recovering))?$");
@@ -1142,7 +1142,7 @@ public class TranslogTests extends ElasticsearchTestCase {
public void testUpgradeOldTranslogFiles() throws IOException {
List indexes = new ArrayList<>();
- Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityTests.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
+ Path dir = getDataPath("/" + OldIndexBackwardsCompatibilityIT.class.getPackage().getName().replace('.', '/')); // the files are in the same pkg as the OldIndexBackwardsCompatibilityTests test
try (DirectoryStream stream = Files.newDirectoryStream(dir, "index-*.zip")) {
for (Path path : stream) {
indexes.add(path);
diff --git a/core/src/test/java/org/elasticsearch/index/translog/TranslogVersionTests.java b/core/src/test/java/org/elasticsearch/index/translog/TranslogVersionTests.java
index b5603a2fa46..451fdf34025 100644
--- a/core/src/test/java/org/elasticsearch/index/translog/TranslogVersionTests.java
+++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogVersionTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.index.translog;
import org.apache.lucene.util.IOUtils;
import org.elasticsearch.index.VersionType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests for reading old and new translog files
*/
-public class TranslogVersionTests extends ElasticsearchTestCase {
+public class TranslogVersionTests extends ESTestCase {
@Test
public void testV0LegacyTranslogVersion() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indexing/IndexActionTests.java b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indexing/IndexActionTests.java
rename to core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java
index 9201e1c381d..970084146a5 100644
--- a/core/src/test/java/org/elasticsearch/indexing/IndexActionTests.java
+++ b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.cluster.metadata.MetaDataCreateIndexService;
import org.elasticsearch.index.VersionType;
import org.elasticsearch.indices.InvalidIndexNameException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -43,13 +43,13 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
*
*/
-public class IndexActionTests extends ElasticsearchIntegrationTest {
+public class IndexActionIT extends ESIntegTestCase {
/**
* This test tries to simulate load while creating an index and indexing documents
* while the index is being created.
*/
- @Test @Slow
+ @Test
public void testAutoGenerateIdNoDuplicates() throws Exception {
int numberOfIterations = scaledRandomIntBetween(10, 50);
for (int i = 0; i < numberOfIterations; i++) {
diff --git a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java
rename to core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java
index b49f7ab535c..e2991159a87 100644
--- a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java
+++ b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java
@@ -32,8 +32,8 @@ import org.elasticsearch.cluster.routing.RoutingNodes;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.Discovery;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster;
import org.junit.Test;
@@ -45,7 +45,7 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS;
import static org.elasticsearch.cluster.routing.ShardRoutingState.*;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
@@ -53,9 +53,8 @@ import static org.hamcrest.Matchers.*;
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class IndexLifecycleActionTests extends ElasticsearchIntegrationTest {
+public class IndexLifecycleActionIT extends ESIntegTestCase {
- @Slow
@Test
public void testIndexLifecycleActionsWith11Shards1Backup() throws Exception {
Settings settings = settingsBuilder()
diff --git a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java
index 42fd8fa2736..6868137dcda 100644
--- a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
-public class DateMathIndexExpressionsIntegrationTests extends ElasticsearchIntegrationTest {
+public class DateMathIndexExpressionsIntegrationIT extends ESIntegTestCase {
public void testIndexNameDateMathExpressions() {
DateTime now = new DateTime(DateTimeZone.UTC);
diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathTests.java b/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathTests.java
rename to core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java
index a6513b69689..22a0d897134 100644
--- a/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.After;
import org.junit.Before;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests for custom data path locations and templates
*/
-public class IndicesCustomDataPathTests extends ElasticsearchIntegrationTest {
+public class IndicesCustomDataPathIT extends ESIntegTestCase {
private String path;
diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerTests.java b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerTests.java
rename to core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java
index 05756388a65..115642aed00 100644
--- a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java
@@ -35,7 +35,7 @@ import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.shard.IndexShardState;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -51,15 +51,15 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.cluster.routing.allocation.decider.DisableAllocationDecider.CLUSTER_ROUTING_ALLOCATION_DISABLE_ALLOCATION;
import static org.elasticsearch.common.settings.Settings.builder;
import static org.elasticsearch.index.shard.IndexShardState.*;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.hasSize;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class IndicesLifecycleListenerTests extends ElasticsearchIntegrationTest {
+public class IndicesLifecycleListenerIT extends ESIntegTestCase {
@Test
public void testBeforeIndexAddedToCluster() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java
index 910902b7b4b..9f9ed46f695 100644
--- a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerSingleNodeTests.java
@@ -23,7 +23,7 @@ import org.elasticsearch.index.Index;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.settings.IndexSettings;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
@@ -32,7 +32,7 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
-public class IndicesLifecycleListenerSingleNodeTests extends ElasticsearchSingleNodeTest {
+public class IndicesLifecycleListenerSingleNodeTests extends ESSingleNodeTestCase {
@Override
protected boolean resetNodeAfterTest() {
diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java
index ff0110b39f4..9cf2034e05a 100644
--- a/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java
@@ -18,7 +18,6 @@
*/
package org.elasticsearch.indices;
-import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse;
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequestBuilder;
@@ -55,7 +54,7 @@ import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.suggest.SuggestBuilders;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.action.percolate.PercolateSourceBuilder.docBuilder;
@@ -64,7 +63,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.*;
-public class IndicesOptionsIntegrationTests extends ElasticsearchIntegrationTest {
+public class IndicesOptionsIntegrationIT extends ESIntegTestCase {
@Test
public void testSpecifiedIndexUnavailable_multipleIndices() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesServiceTest.java b/core/src/test/java/org/elasticsearch/indices/IndicesServiceTest.java
index 415d806278f..89f12904d27 100644
--- a/core/src/test/java/org/elasticsearch/indices/IndicesServiceTest.java
+++ b/core/src/test/java/org/elasticsearch/indices/IndicesServiceTest.java
@@ -29,7 +29,7 @@ import org.elasticsearch.gateway.GatewayMetaState;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.shard.ShardPath;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
@@ -37,7 +37,7 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
-public class IndicesServiceTest extends ElasticsearchSingleNodeTest {
+public class IndicesServiceTest extends ESSingleNodeTestCase {
public IndicesService getIndicesService() {
return getInstanceFromNode(IndicesService.class);
diff --git a/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java
index 1bffc1ed4ab..839fc598d01 100644
--- a/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java
@@ -25,8 +25,8 @@ import org.apache.lucene.analysis.Analyzer;
import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.lang.reflect.Field;
@@ -39,9 +39,9 @@ import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-@ElasticsearchBackwardsCompatIntegrationTest.CompatibilityVersion(version = Version.V_1_2_0_ID) // we throw an exception if we create an index with _field_names that is 1.3
-public class PreBuiltAnalyzerIntegrationTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+@ESBackcompatTestCase.CompatibilityVersion(version = Version.V_1_2_0_ID) // we throw an exception if we create an index with _field_names that is 1.3
+public class PreBuiltAnalyzerIntegrationIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionTests.java b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionTests.java
rename to core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java
index 2537b53b0f3..db46e8201d4 100644
--- a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.*;
import org.elasticsearch.rest.action.admin.indices.analyze.RestAnalyzeAction;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class AnalyzeActionTests extends ElasticsearchIntegrationTest {
+public class AnalyzeActionIT extends ESIntegTestCase {
@Test
public void simpleAnalyzerTests() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceTests.java b/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceTests.java
rename to core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java
index 46a6505a511..d21a840c42b 100644
--- a/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java
@@ -23,9 +23,9 @@ import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.analysis.HunspellService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.notNullValue;
*
*/
@ClusterScope(scope= Scope.TEST, numDataNodes=0)
-public class HunspellServiceTests extends ElasticsearchIntegrationTest {
+public class HunspellServiceIT extends ESIntegTestCase {
@Test
public void testLocaleDirectoryWithNodeLevelConfig() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheTests.java b/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheTests.java
rename to core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheIT.java
index 37ea2ef8d37..ffb86c77c72 100644
--- a/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.indices.cache.request.IndicesRequestCache;
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.List;
@@ -34,7 +34,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
import static org.hamcrest.Matchers.greaterThan;
-public class IndicesRequestCacheTests extends ElasticsearchIntegrationTest {
+public class IndicesRequestCacheIT extends ESIntegTestCase {
// One of the primary purposes of the query cache is to cache aggs results
public void testCacheAggs() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsTests.java b/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsTests.java
rename to core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java
index b0a549f3cc7..199f4b6f77c 100644
--- a/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java
@@ -22,7 +22,7 @@ package org.elasticsearch.indices.exists.indices;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -30,7 +30,7 @@ import java.util.Arrays;
import static org.elasticsearch.cluster.metadata.IndexMetaData.*;
import static org.hamcrest.Matchers.equalTo;
-public class IndicesExistsTests extends ElasticsearchIntegrationTest {
+public class IndicesExistsIT extends ESIntegTestCase {
@Test
// Indices exists never throws IndexMissingException, the indices options control its behaviour (return true or false)
diff --git a/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsTests.java b/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsTests.java
rename to core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java
index 0191c56831c..ffb2e2e186a 100644
--- a/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java
@@ -18,13 +18,12 @@
*/
package org.elasticsearch.indices.exists.types;
-import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.indices.exists.types.TypesExistsResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.index.IndexNotFoundException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -36,7 +35,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.equalTo;
-public class TypesExistsTests extends ElasticsearchIntegrationTest {
+public class TypesExistsIT extends ESIntegTestCase {
@Test
public void testSimple() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/flush/FlushTest.java b/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/flush/FlushTest.java
rename to core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java
index 5ce34ca4fa7..96b145a9bef 100644
--- a/core/src/test/java/org/elasticsearch/indices/flush/FlushTest.java
+++ b/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationComman
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Test;
@@ -46,7 +46,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.Matchers.emptyIterable;
import static org.hamcrest.Matchers.equalTo;
-public class FlushTest extends ElasticsearchIntegrationTest {
+public class FlushIT extends ESIntegTestCase {
@Test
public void testWaitIfOngoing() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushSingleNodeTest.java b/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushSingleNodeTest.java
index 8cd791b5c06..80cc14392ff 100644
--- a/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushSingleNodeTest.java
+++ b/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushSingleNodeTest.java
@@ -23,21 +23,20 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.common.Strings;
-import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.shard.ShardNotFoundException;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.List;
import java.util.Map;
/**
*/
-public class SyncedFlushSingleNodeTest extends ElasticsearchSingleNodeTest {
+public class SyncedFlushSingleNodeTest extends ESSingleNodeTestCase {
public void testModificationPreventsFlushing() throws InterruptedException {
createIndex("test");
diff --git a/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushUnitTests.java b/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushUnitTests.java
index 9e43cef81b1..19cce93c6e4 100644
--- a/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/flush/SyncedFlushUnitTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.flush.IndicesSyncedFlushResult.ShardCounts;
import org.elasticsearch.indices.flush.SyncedFlushService.SyncedFlushResponse;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.ArrayList;
@@ -40,7 +40,7 @@ import static org.elasticsearch.test.XContentTestUtils.convertToMap;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
-public class SyncedFlushUnitTests extends ElasticsearchTestCase {
+public class SyncedFlushUnitTests extends ESTestCase {
private static class TestPlan {
diff --git a/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksTests.java b/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksTests.java
rename to core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.java
index 3e73a52fb41..422fee6879f 100644
--- a/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.java
@@ -25,21 +25,21 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.nullValue;
/**
*/
@ClusterScope(scope= Scope.TEST, numDataNodes =1)
-public class IndicesLeaksTests extends ElasticsearchIntegrationTest {
+public class IndicesLeaksIT extends ESIntegTestCase {
@SuppressWarnings({"ConstantConditions", "unchecked"})
diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateTests.java b/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateTests.java
rename to core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java
index 673bd140d01..f9d597cdc62 100644
--- a/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java
@@ -20,18 +20,15 @@
package org.elasticsearch.indices.mapping;
-import com.google.common.collect.Sets;
import org.elasticsearch.action.ActionListener;
-import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
@@ -40,8 +37,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.emptyIterable;
-@ElasticsearchIntegrationTest.ClusterScope(randomDynamicTemplates = false) // this test takes a long time to delete the idx if all fields are eager loading
-public class ConcurrentDynamicTemplateTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(randomDynamicTemplates = false) // this test takes a long time to delete the idx if all fields are eager loading
+public class ConcurrentDynamicTemplateIT extends ESIntegTestCase {
private final String mappingType = "test-mapping";
diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java
similarity index 80%
rename from core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java
rename to core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java
index 2b7e7a0e77c..62745a64245 100644
--- a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java
@@ -22,16 +22,12 @@ package org.elasticsearch.indices.mapping;
import org.elasticsearch.common.settings.Settings;
import org.junit.Before;
-import static org.apache.lucene.util.LuceneTestCase.Slow;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
-/**
- */
-@Slow
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class DedicatedMasterGetFieldMappingTests extends SimpleGetFieldMappingsTests {
+public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT {
@Before
public void before1() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java
rename to core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java
index 3a97dcf7368..974599f069c 100644
--- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.admin.indices.mapping.get.GetFieldMappingsRespon
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import java.io.IOException;
@@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.*;
-public class SimpleGetFieldMappingsTests extends ElasticsearchIntegrationTest {
+public class SimpleGetFieldMappingsIT extends ESIntegTestCase {
public void testGetMappingsWhereThereAreNone() {
createIndex("index");
diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsTests.java b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsTests.java
rename to core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java
index 4757aea8600..504d9a5840a 100644
--- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java
@@ -23,8 +23,8 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue;
*
*/
@ClusterScope(randomDynamicTemplates = false)
-public class SimpleGetMappingsTests extends ElasticsearchIntegrationTest {
+public class SimpleGetMappingsIT extends ESIntegTestCase {
@Test
public void getMappingsWhereThereAreNone() {
diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java
index e9aef353582..71ccf68e41a 100644
--- a/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java
@@ -34,8 +34,8 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.mapper.MergeMappingException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -50,7 +50,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
@ClusterScope(randomDynamicTemplates = false)
-public class UpdateMappingIntegrationTests extends ElasticsearchIntegrationTest {
+public class UpdateMappingIntegrationIT extends ESIntegTestCase {
@Test
public void dynamicUpdates() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerTests.java b/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerTests.java
rename to core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java
index 6914bcb95d4..ca13c07d6b7 100644
--- a/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java
@@ -28,12 +28,12 @@ import org.elasticsearch.index.engine.EngineConfig;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class IndexingMemoryControllerTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class IndexingMemoryControllerIT extends ESIntegTestCase {
@Test
public void testIndexBufferSizeUpdateAfterCreationRemoval() throws InterruptedException {
@@ -138,8 +138,8 @@ public class IndexingMemoryControllerTests extends ElasticsearchIntegrationTest
private void createNode(Settings settings) {
internalCluster().startNode(Settings.builder()
- .put(ClusterName.SETTING, "IndexingMemoryControllerTests")
- .put("node.name", "IndexingMemoryControllerTests")
+ .put(ClusterName.SETTING, "IndexingMemoryControllerIT")
+ .put("node.name", "IndexingMemoryControllerIT")
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)
.put(EsExecutors.PROCESSORS, 1) // limit the number of threads created
diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopTests.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopTests.java
rename to core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java
index 23ff0709c61..29e057d612c 100644
--- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.client.Client;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.List;
@@ -37,8 +37,8 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinal
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
/** Tests for the noop breakers, which are non-dynamic settings */
-@ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes=0)
-public class CircuitBreakerNoopTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE, numDataNodes=0)
+public class CircuitBreakerNoopIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceTests.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceTests.java
rename to core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java
index 878a9aaf4c5..fb9e9cb935f 100644
--- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java
@@ -19,13 +19,10 @@
package org.elasticsearch.indices.memory.breaker;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse;
import org.elasticsearch.action.index.IndexRequestBuilder;
-import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchRequestBuilder;
-import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.breaker.CircuitBreakingException;
@@ -37,13 +34,12 @@ import org.elasticsearch.indices.breaker.CircuitBreakerStats;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -52,7 +48,7 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.TEST;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.TEST;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures;
import static org.hamcrest.CoreMatchers.containsString;
@@ -63,7 +59,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
* Integration tests for InternalCircuitBreakerService
*/
@ClusterScope(scope = TEST, randomDynamicTemplates = false)
-public class CircuitBreakerServiceTests extends ElasticsearchIntegrationTest {
+public class CircuitBreakerServiceIT extends ESIntegTestCase {
/** Reset all breaker settings back to their defaults */
private void reset() {
diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerUnitTests.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerUnitTests.java
index c2296c363fd..013bc718ec9 100644
--- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerUnitTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.indices.breaker.BreakerSettings;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.*;
/**
* Unit tests for the circuit breaker
*/
-public class CircuitBreakerUnitTests extends ElasticsearchTestCase {
+public class CircuitBreakerUnitTests extends ESTestCase {
public static long pctBytes(String percentString) {
return Settings.EMPTY.getAsMemory("", percentString).bytes();
diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerTests.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerTests.java
rename to core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java
index 7b2a12f8f98..053b2391536 100644
--- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java
@@ -36,7 +36,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.engine.MockEngineSupport;
import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper;
import org.junit.Test;
@@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests for the circuit breaker while random exceptions are happening
*/
-public class RandomExceptionCircuitBreakerTests extends ElasticsearchIntegrationTest {
+public class RandomExceptionCircuitBreakerIT extends ESIntegTestCase {
@Test
public void testBreakerWithRandomExceptions() throws IOException, InterruptedException, ExecutionException {
diff --git a/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryTests.java b/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java
index 0adbcbeb831..084862acf7a 100644
--- a/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java
@@ -48,8 +48,8 @@ import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.indices.recovery.RecoveryState.Stage;
import org.elasticsearch.indices.recovery.RecoveryState.Type;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.elasticsearch.test.transport.MockTransportService;
@@ -64,7 +64,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.*;
@@ -73,7 +73,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class IndexRecoveryTests extends ElasticsearchIntegrationTest {
+public class IndexRecoveryIT extends ESIntegTestCase {
private static final String INDEX_NAME = "test-idx-1";
private static final String INDEX_TYPE = "test-type-1";
diff --git a/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStateTest.java b/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStateTest.java
index d0adffc383b..3f0fe79623b 100644
--- a/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStateTest.java
+++ b/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStateTest.java
@@ -27,7 +27,7 @@ import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.transport.DummyTransportAddress;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.recovery.RecoveryState.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicReference;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.Matchers.*;
-public class RecoveryStateTest extends ElasticsearchTestCase {
+public class RecoveryStateTest extends ESTestCase {
abstract class Streamer extends Thread {
diff --git a/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStatusTests.java b/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStatusTests.java
index a86230248b2..35847f51ab7 100644
--- a/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStatusTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/recovery/RecoveryStatusTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.transport.LocalTransportAddress;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.store.StoreFileMetaData;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
import java.util.Set;
@@ -34,7 +34,7 @@ import java.util.regex.Pattern;
/**
*/
-public class RecoveryStatusTests extends ElasticsearchSingleNodeTest {
+public class RecoveryStatusTests extends ESSingleNodeTestCase {
public void testRenameTempFiles() throws IOException {
IndexService service = createIndex("foo");
diff --git a/core/src/test/java/org/elasticsearch/indices/recovery/StartRecoveryRequestTest.java b/core/src/test/java/org/elasticsearch/indices/recovery/StartRecoveryRequestTest.java
index 4a1586e5c45..52c46c70a4e 100644
--- a/core/src/test/java/org/elasticsearch/indices/recovery/StartRecoveryRequestTest.java
+++ b/core/src/test/java/org/elasticsearch/indices/recovery/StartRecoveryRequestTest.java
@@ -19,7 +19,6 @@
package org.elasticsearch.indices.recovery;
-import org.apache.lucene.index.IndexFileNames;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.io.stream.InputStreamStreamInput;
@@ -27,15 +26,11 @@ import org.elasticsearch.common.io.stream.OutputStreamStreamOutput;
import org.elasticsearch.common.transport.LocalTransportAddress;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.store.Store;
-import org.elasticsearch.index.store.StoreFileMetaData;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.Matchers.equalTo;
@@ -43,7 +38,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-public class StartRecoveryRequestTest extends ElasticsearchTestCase {
+public class StartRecoveryRequestTest extends ESTestCase {
@Test
public void testSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksTests.java b/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksTests.java
rename to core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java
index 70783a8efb1..357e87f0692 100644
--- a/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.indices.settings;
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -32,7 +32,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-public class GetSettingsBlocksTests extends ElasticsearchIntegrationTest {
+public class GetSettingsBlocksIT extends ESIntegTestCase {
@Test
public void testGetSettingsWithBlocks() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasTests.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasTests.java
rename to core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java
index 3eb35db9ccc..9d3a6773c3d 100644
--- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.count.CountResponse;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -37,8 +37,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.equalTo;
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class UpdateNumberOfReplicasTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class UpdateNumberOfReplicasIT extends ESIntegTestCase {
@Override
protected int maximumNumberOfReplicas() {
@@ -46,7 +46,7 @@ public class UpdateNumberOfReplicasTests extends ElasticsearchIntegrationTest {
}
@Test
- public void simpleUpdateNumberOfReplicasTests() throws Exception {
+ public void simpleUpdateNumberOfReplicasIT() throws Exception {
logger.info("Creating index test");
assertAcked(prepareCreate("test", 2));
logger.info("Running Cluster Health");
diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsTests.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsTests.java
rename to core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java
index ffc437ea678..f26a5b25862 100644
--- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java
@@ -35,7 +35,7 @@ import org.elasticsearch.index.engine.VersionConflictEngineException;
import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.index.store.IndexStore;
import org.elasticsearch.index.store.Store;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -45,7 +45,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class UpdateSettingsTests extends ElasticsearchIntegrationTest {
+public class UpdateSettingsIT extends ESIntegTestCase {
@Test
public void testOpenCloseUpdateSettings() throws Exception {
@@ -138,7 +138,6 @@ public class UpdateSettingsTests extends ElasticsearchIntegrationTest {
// #6626: make sure we can update throttle settings and the changes take effect
@Test
- @Slow
public void testUpdateThrottleSettings() {
// No throttling at first, only 1 non-replicated shard, force lots of merging:
@@ -262,7 +261,7 @@ public class UpdateSettingsTests extends ElasticsearchIntegrationTest {
assertEquals(sumThrottleTime, newSumThrottleTime);
// Optimize & flush and wait; else we sometimes get a "Delete Index failed - not acked"
- // when ElasticsearchIntegrationTest.after tries to remove indices created by the test:
+ // when ESIntegTestCase.after tries to remove indices created by the test:
// Wait for merges to finish
client().admin().indices().prepareOptimize("test").get();
diff --git a/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllTests.java b/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllTests.java
rename to core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java
index ec060575785..daebe71ac56 100644
--- a/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java
@@ -24,17 +24,17 @@ import org.elasticsearch.action.admin.indices.close.CloseIndexResponse;
import org.elasticsearch.action.support.DestructiveOperations;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
@ClusterScope(scope= Scope.TEST, numDataNodes =2)
-public class CloseIndexDisableCloseAllTests extends ElasticsearchIntegrationTest {
+public class CloseIndexDisableCloseAllIT extends ESIntegTestCase {
@Test
// Combined multiple tests into one, because cluster scope is test.
diff --git a/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexTests.java b/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexTests.java
rename to core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java
index d1b461ef207..9f2dca3d9e9 100644
--- a/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.indices.state;
-import org.elasticsearch.ResourceNotFoundException;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
@@ -34,7 +33,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -46,7 +45,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class OpenCloseIndexTests extends ElasticsearchIntegrationTest {
+public class OpenCloseIndexIT extends ESIntegTestCase {
@Test
public void testSimpleCloseOpen() {
diff --git a/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateTests.java b/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/indices/state/RareClusterStateTests.java
rename to core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java
index 2792c77870a..24a438bbe65 100644
--- a/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java
@@ -49,7 +49,7 @@ import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.disruption.BlockClusterStateProcessing;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.junit.Test;
@@ -64,8 +64,8 @@ import static org.hamcrest.Matchers.*;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0)
-public class RareClusterStateTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0)
+public class RareClusterStateIT extends ESIntegTestCase {
@Override
protected int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateTests.java b/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateTests.java
rename to core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java
index 0d162b7c52c..3001c038486 100644
--- a/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.common.settings.SettingsException;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.indices.IndexClosedException;
import org.elasticsearch.indices.IndexPrimaryShardNotAllocatedException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
@@ -44,10 +44,10 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class SimpleIndexStateTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class SimpleIndexStateIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(SimpleIndexStateTests.class);
+ private final ESLogger logger = Loggers.getLogger(SimpleIndexStateIT.class);
@Test
public void testSimpleOpenClose() {
diff --git a/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsTests.java b/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/stats/IndexStatsTests.java
rename to core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java
index ad446251db9..8aeb6f65b9b 100644
--- a/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java
@@ -48,9 +48,9 @@ import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.index.store.IndexStore;
import org.elasticsearch.indices.cache.request.IndicesRequestCache;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.io.IOException;
@@ -72,7 +72,7 @@ import static org.hamcrest.Matchers.nullValue;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 2, numClientNodes = 0, randomDynamicTemplates = false)
@SuppressCodecs("*") // requires custom completion format
-public class IndexStatsTests extends ElasticsearchIntegrationTest {
+public class IndexStatsIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
@@ -354,7 +354,7 @@ public class IndexStatsTests extends ElasticsearchIntegrationTest {
}
// Optimize & flush and wait; else we sometimes get a "Delete Index failed - not acked"
- // when ElasticsearchIntegrationTest.after tries to remove indices created by the test:
+ // when ESIntegTestCase.after tries to remove indices created by the test:
logger.info("test: now optimize");
client().admin().indices().prepareOptimize("test").get();
flush();
diff --git a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java
index ac43f0e8a8d..5886e9b91d4 100644
--- a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java
@@ -28,7 +28,13 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.cluster.routing.*;
+import org.elasticsearch.cluster.routing.IndexRoutingTable;
+import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
+import org.elasticsearch.cluster.routing.RoutingNode;
+import org.elasticsearch.cluster.routing.RoutingTable;
+import org.elasticsearch.cluster.routing.ShardRouting;
+import org.elasticsearch.cluster.routing.ShardRoutingState;
+import org.elasticsearch.cluster.routing.TestShardRouting;
import org.elasticsearch.cluster.routing.allocation.command.MoveAllocationCommand;
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
@@ -41,8 +47,8 @@ import org.elasticsearch.index.Index;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.indices.recovery.RecoverySource;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.disruption.BlockClusterStateProcessing;
import org.elasticsearch.test.disruption.SingleNodeDisruption;
@@ -64,7 +70,7 @@ import java.util.concurrent.TimeUnit;
import static java.lang.Thread.sleep;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
@@ -72,7 +78,7 @@ import static org.hamcrest.Matchers.equalTo;
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class IndicesStoreIntegrationTests extends ElasticsearchIntegrationTest {
+public class IndicesStoreIntegrationIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) { // simplify this and only use a single data path
@@ -92,7 +98,6 @@ public class IndicesStoreIntegrationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void indexCleanup() throws Exception {
final String masterNode = internalCluster().startNode(Settings.builder().put("node.data", false));
final String node_1 = internalCluster().startNode(Settings.builder().put("node.master", false));
@@ -304,7 +309,6 @@ public class IndicesStoreIntegrationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testShardActiveElseWhere() throws Exception {
List nodes = internalCluster().startNodesAsync(2).get();
diff --git a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java
index bf34648d648..890b94d1583 100644
--- a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.cluster.routing.*;
import org.elasticsearch.common.transport.LocalTransportAddress;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.is;
/**
*/
-public class IndicesStoreTests extends ElasticsearchTestCase {
+public class IndicesStoreTests extends ESTestCase {
private final static ShardRoutingState[] NOT_STARTED_STATES;
diff --git a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksTests.java b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksTests.java
rename to core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java
index e8fddf2c1aa..c1c41cf6c37 100644
--- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java
@@ -22,8 +22,8 @@ package org.elasticsearch.indices.template;
import org.elasticsearch.action.admin.indices.alias.Alias;
import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.io.IOException;
@@ -31,8 +31,8 @@ import java.io.IOException;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.hasSize;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class IndexTemplateBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class IndexTemplateBlocksIT extends ESIntegTestCase {
@Test
public void testIndexTemplatesWithBlocks() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringTests.java b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringTests.java
rename to core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java
index d09761c5a51..fdabe10888b 100644
--- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java
@@ -28,9 +28,9 @@ import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.AbstractPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsNull.notNullValue;
@ClusterScope(scope = Scope.SUITE)
-public class IndexTemplateFilteringTests extends ElasticsearchIntegrationTest{
+public class IndexTemplateFilteringIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateTests.java b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateTests.java
rename to core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java
index 366a4cb96fd..1cbe5eb56dc 100644
--- a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.indices.IndexTemplateAlreadyExistsException;
import org.elasticsearch.indices.InvalidAliasNameException;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class SimpleIndexTemplateTests extends ElasticsearchIntegrationTest {
+public class SimpleIndexTemplateIT extends ESIntegTestCase {
@Test
public void simpleIndexTemplateTests() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerTests.java b/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerTests.java
rename to core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java
index b63a8273c89..1c1b1939868 100644
--- a/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java
@@ -26,22 +26,22 @@ import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
import org.hamcrest.Matchers;
import org.junit.Test;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
/**
*/
@ClusterScope(numDataNodes =0, scope= Scope.TEST)
-public class GatewayIndicesWarmerTests extends ElasticsearchIntegrationTest {
+public class GatewayIndicesWarmerIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(GatewayIndicesWarmerTests.class);
+ private final ESLogger logger = Loggers.getLogger(GatewayIndicesWarmerIT.class);
@Test
public void testStatePersistence() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksTests.java b/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksTests.java
rename to core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java
index a2735d6134e..e6afa4c259c 100644
--- a/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java
@@ -25,8 +25,8 @@ import com.google.common.collect.ImmutableList;
import org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.Arrays;
@@ -37,8 +37,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.hamcrest.Matchers.equalTo;
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class IndicesWarmerBlocksTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class IndicesWarmerBlocksIT extends ESIntegTestCase {
@Test
public void testPutWarmerWithBlocks() {
diff --git a/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerTests.java b/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerTests.java
rename to core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.java
index f8ac6c156f9..6179af72d34 100644
--- a/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerTests.java
+++ b/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.java
@@ -42,7 +42,7 @@ import org.elasticsearch.indices.cache.request.IndicesRequestCache;
import org.elasticsearch.search.SearchService;
import org.elasticsearch.search.warmer.IndexWarmerMissingException;
import org.elasticsearch.search.warmer.IndexWarmersMetaData;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -51,7 +51,7 @@ import java.util.Locale;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class SimpleIndicesWarmerTests extends ElasticsearchIntegrationTest {
+public class SimpleIndicesWarmerIT extends ESIntegTestCase {
@Test
public void simpleWarmerTests() {
diff --git a/core/src/test/java/org/elasticsearch/mget/SimpleMgetTests.java b/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/mget/SimpleMgetTests.java
rename to core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java
index 20038763892..7716bf7300b 100644
--- a/core/src/test/java/org/elasticsearch/mget/SimpleMgetTests.java
+++ b/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -38,7 +38,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class SimpleMgetTests extends ElasticsearchIntegrationTest {
+public class SimpleMgetIT extends ESIntegTestCase {
@Test
public void testThatMgetShouldWorkWithOneIndexMissing() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/monitor/fs/FsProbeTests.java b/core/src/test/java/org/elasticsearch/monitor/fs/FsProbeTests.java
index 82c9097d693..383bd0c891b 100644
--- a/core/src/test/java/org/elasticsearch/monitor/fs/FsProbeTests.java
+++ b/core/src/test/java/org/elasticsearch/monitor/fs/FsProbeTests.java
@@ -21,14 +21,14 @@ package org.elasticsearch.monitor.fs;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
import static org.hamcrest.Matchers.*;
-public class FsProbeTests extends ElasticsearchTestCase {
+public class FsProbeTests extends ESTestCase {
@Test
public void testFsInfo() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/monitor/os/OsProbeTests.java b/core/src/test/java/org/elasticsearch/monitor/os/OsProbeTests.java
index bd7629fca96..d5d14e993f8 100644
--- a/core/src/test/java/org/elasticsearch/monitor/os/OsProbeTests.java
+++ b/core/src/test/java/org/elasticsearch/monitor/os/OsProbeTests.java
@@ -20,13 +20,12 @@
package org.elasticsearch.monitor.os;
import org.apache.lucene.util.Constants;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
-public class OsProbeTests extends ElasticsearchTestCase {
+public class OsProbeTests extends ESTestCase {
OsProbe probe = OsProbe.getInstance();
diff --git a/core/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java b/core/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java
index 4aa4e64dbd2..910e51fddad 100644
--- a/core/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java
+++ b/core/src/test/java/org/elasticsearch/monitor/process/ProcessProbeTests.java
@@ -20,13 +20,13 @@
package org.elasticsearch.monitor.process;
import org.elasticsearch.bootstrap.Bootstrap;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.monitor.jvm.JvmInfo.jvmInfo;
import static org.hamcrest.Matchers.*;
-public class ProcessProbeTests extends ElasticsearchTestCase {
+public class ProcessProbeTests extends ESTestCase {
ProcessProbe probe = ProcessProbe.getInstance();
diff --git a/core/src/test/java/org/elasticsearch/nested/SimpleNestedTests.java b/core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/nested/SimpleNestedTests.java
rename to core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.java
index f0cd668e431..c876ebf0900 100644
--- a/core/src/test/java/org/elasticsearch/nested/SimpleNestedTests.java
+++ b/core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.java
@@ -25,7 +25,6 @@ import org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse;
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetResponse;
-import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
@@ -34,24 +33,20 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.index.query.support.QueryInnerHitBuilder;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Assert;
import org.junit.Test;
-import java.util.ArrayList;
-import java.util.List;
-
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
-public class SimpleNestedTests extends ElasticsearchIntegrationTest {
+public class SimpleNestedIT extends ESIntegTestCase {
@Test
public void simpleNested() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java b/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java
rename to core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java
index 979bc8b4543..6d79de93770 100644
--- a/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java
+++ b/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC
/**
*/
-public class DirectBufferNetworkTests extends ElasticsearchIntegrationTest {
+public class DirectBufferNetworkIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/node/internal/InternalSettingsPreparerTests.java b/core/src/test/java/org/elasticsearch/node/internal/InternalSettingsPreparerTests.java
index 2830435055e..a299be41093 100644
--- a/core/src/test/java/org/elasticsearch/node/internal/InternalSettingsPreparerTests.java
+++ b/core/src/test/java/org/elasticsearch/node/internal/InternalSettingsPreparerTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.cli.Terminal;
import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +38,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.*;
-public class InternalSettingsPreparerTests extends ElasticsearchTestCase {
+public class InternalSettingsPreparerTests extends ESTestCase {
@Before
public void setupSystemProperties() {
diff --git a/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java b/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java
similarity index 86%
rename from core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java
rename to core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java
index 68f0281b621..86b1a6a4cc3 100644
--- a/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java
+++ b/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java
@@ -19,33 +19,24 @@
package org.elasticsearch.nodesinfo;
-import com.google.common.collect.Lists;
-
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.cluster.ClusterService;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.nodesinfo.plugin.dummy1.TestPlugin;
-import org.elasticsearch.nodesinfo.plugin.dummy2.TestNoVersionPlugin;
import org.elasticsearch.plugins.PluginTestCase;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
-import java.net.URISyntaxException;
-import java.util.Collections;
import java.util.List;
-import static org.elasticsearch.client.Requests.clusterHealthRequest;
import static org.elasticsearch.client.Requests.nodesInfoRequest;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
/**
*
*/
@ClusterScope(scope= Scope.TEST, numDataNodes =0)
-public class SimpleNodesInfoTests extends PluginTestCase {
+public class SimpleNodesInfoIT extends PluginTestCase {
static final class Fields {
static final String SITE_PLUGIN = "dummy";
diff --git a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java b/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java
index 2390e3b9f85..3e2d0e70d9f 100644
--- a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.operateAllIndices;
import org.elasticsearch.action.support.DestructiveOperations;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -29,8 +29,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class DestructiveOperationsIntegrationTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class DestructiveOperationsIntegrationIT extends ESIntegTestCase {
@Test
// One test for test performance, since cluster scope is test
diff --git a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledTest.java b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledTest.java
rename to core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.java
index fa8762861e0..e6282d803b3 100644
--- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledTest.java
+++ b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.java
@@ -24,9 +24,9 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.http.netty.NettyHttpServerTransport;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.rest.client.http.HttpDeleteWithEntity;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.is;
* Tests that when disabling detailed errors, a request with the error_trace parameter returns a HTTP 400
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
-public class DetailedErrorsDisabledTest extends ElasticsearchIntegrationTest {
+public class DetailedErrorsDisabledIT extends ESIntegTestCase {
// Build our cluster settings
@Override
diff --git a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledTest.java b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledTest.java
rename to core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java
index 979e362eae0..af3e57075c5 100644
--- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledTest.java
+++ b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java
@@ -23,9 +23,9 @@ import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.rest.client.http.HttpDeleteWithEntity;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.containsString;
* Tests that by default the error_trace parameter can be used to show stacktraces
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
-public class DetailedErrorsEnabledTest extends ElasticsearchIntegrationTest {
+public class DetailedErrorsEnabledIT extends ESIntegTestCase {
// Build our cluster settings
@Override
diff --git a/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorTests.java
rename to core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java
index 82e61defa12..9efd001b98e 100644
--- a/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Random;
@@ -38,7 +38,7 @@ import java.util.concurrent.atomic.AtomicReference;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
-import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray;
+import static org.elasticsearch.percolator.PercolatorIT.convertFromTextArray;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*;
@@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class ConcurrentPercolatorTests extends ElasticsearchIntegrationTest {
+public class ConcurrentPercolatorIT extends ESIntegTestCase {
@Test
public void testSimpleConcurrentPercolator() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/percolator/MultiPercolatorTests.java
rename to core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java
index 5d71d3034e0..cb64437e104 100644
--- a/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.MatchQueryBuilder;
import org.elasticsearch.index.query.Operator;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -36,14 +36,14 @@ import java.io.IOException;
import static org.elasticsearch.action.percolate.PercolateSourceBuilder.docBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.*;
import static org.elasticsearch.index.query.QueryBuilders.*;
-import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray;
+import static org.elasticsearch.percolator.PercolatorIT.convertFromTextArray;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertMatchCount;
import static org.hamcrest.Matchers.*;
/**
*/
-public class MultiPercolatorTests extends ElasticsearchIntegrationTest {
+public class MultiPercolatorIT extends ESIntegTestCase {
@Test
public void testBasics() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java
index 4c2cfcf487e..ecee1933fb8 100644
--- a/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.percolate.PercolateResponse;
import org.elasticsearch.action.percolate.PercolateSourceBuilder;
import org.elasticsearch.index.percolator.PercolatorException;
import org.elasticsearch.index.query.QueryParsingException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class PercolatorBackwardsCompatibilityTests extends ElasticsearchIntegrationTest {
+public class PercolatorBackwardsCompatibilityIT extends ESIntegTestCase {
@Test
public void testPercolatorUpgrading() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsTests.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsTests.java
rename to core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java
index e14dbf60dab..c1326845b49 100644
--- a/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorBuilders;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.InternalBucketMetricValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class PercolatorFacetsAndAggregationsTests extends ElasticsearchIntegrationTest {
+public class PercolatorFacetsAndAggregationsIT extends ESIntegTestCase {
@Test
// Just test the integration with facets and aggregations, not the facet and aggregation functionality!
diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/percolator/PercolatorTests.java
rename to core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java
index 1dd2878532e..0f938527453 100644
--- a/core/src/test/java/org/elasticsearch/percolator/PercolatorTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java
@@ -51,7 +51,7 @@ import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.highlight.HighlightBuilder;
import org.elasticsearch.search.sort.SortBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -96,7 +96,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class PercolatorTests extends ElasticsearchIntegrationTest {
+public class PercolatorIT extends ESIntegTestCase {
@Test
public void testSimple1() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java
rename to core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java
index ec4d65316c3..617c964364f 100644
--- a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java
@@ -35,7 +35,7 @@ import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
@@ -46,15 +46,24 @@ import static org.elasticsearch.action.percolate.PercolateSourceBuilder.docBuild
import static org.elasticsearch.client.Requests.clusterHealthRequest;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.index.query.QueryBuilders.*;
-import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
-import static org.hamcrest.Matchers.*;
+import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
+import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
+import static org.elasticsearch.index.query.QueryBuilders.termQuery;
+import static org.elasticsearch.percolator.PercolatorIT.convertFromTextArray;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertMatchCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
+import static org.hamcrest.Matchers.arrayContainingInAnyOrder;
+import static org.hamcrest.Matchers.arrayWithSize;
+import static org.hamcrest.Matchers.emptyArray;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.nullValue;
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0)
-public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest {
+public class RecoveryPercolatorIT extends ESIntegTestCase {
@Override
protected int numberOfShards() {
@@ -62,7 +71,6 @@ public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testRestartNodePercolator1() throws Exception {
internalCluster().startNode();
assertAcked(prepareCreate("test").addMapping("type1", "field1", "type=string").addMapping(PercolatorService.TYPE_NAME, "color", "type=string"));
@@ -100,7 +108,6 @@ public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testRestartNodePercolator2() throws Exception {
internalCluster().startNode();
assertAcked(prepareCreate("test").addMapping("type1", "field1", "type=string").addMapping(PercolatorService.TYPE_NAME, "color", "type=string"));
@@ -173,7 +180,6 @@ public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testLoadingPercolateQueriesDuringCloseAndOpen() throws Exception {
internalCluster().startNode();
internalCluster().startNode();
@@ -221,13 +227,11 @@ public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testSinglePercolator_recovery() throws Exception {
percolatorRecovery(false);
}
@Test
- @Slow
public void testMultiPercolator_recovery() throws Exception {
percolatorRecovery(true);
}
diff --git a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java
rename to core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java
index dff850d9bf6..af77b029e62 100644
--- a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java
+++ b/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java
@@ -29,8 +29,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.AlreadyExpiredException;
import org.elasticsearch.index.mapper.MapperParsingException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -39,15 +39,15 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.percolator.PercolatorTests.convertFromTextArray;
+import static org.elasticsearch.percolator.PercolatorIT.convertFromTextArray;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertMatchCount;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*;
/**
*/
-@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class TTLPercolatorTests extends ElasticsearchIntegrationTest {
+@ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class TTLPercolatorIT extends ESIntegTestCase {
private static final long PURGE_INTERVAL = 200;
diff --git a/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleTests.java b/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleTests.java
rename to core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java
index a678aa9e8c6..514e8460f08 100644
--- a/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.AssertingLocalTransport;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.*;
@@ -33,15 +33,15 @@ import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
/**
*
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 2)
-public class PluggableTransportModuleTests extends ElasticsearchIntegrationTest {
+public class PluggableTransportModuleIT extends ESIntegTestCase {
public static final AtomicInteger SENT_REQUEST_COUNTER = new AtomicInteger(0);
diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java
index 525b3bf4a09..2cdf82322bb 100644
--- a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java
@@ -23,9 +23,7 @@ import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.cluster.node.info.PluginsInfo;
-import org.elasticsearch.plugins.PluginInfo;
-import org.elasticsearch.test.ElasticsearchTestCase;
-import org.junit.Test;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.io.OutputStream;
@@ -36,7 +34,7 @@ import java.util.Properties;
import static org.hamcrest.Matchers.contains;
-public class PluginInfoTests extends ElasticsearchTestCase {
+public class PluginInfoTests extends ESTestCase {
static void writeProperties(Path pluginDir, String... stringProps) throws IOException {
assert stringProps.length % 2 == 0;
diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java
rename to core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java
index 9e50abd2115..31f088498bc 100644
--- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.common.collect.Tuple;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.junit.annotations.Network;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
@@ -55,7 +55,7 @@ import static org.elasticsearch.common.cli.CliToolTestCase.args;
import static org.elasticsearch.common.io.FileSystemUtilsTests.assertFileContent;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.plugins.PluginInfoTests.writeProperties;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertDirectoryExists;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFileExists;
import static org.hamcrest.Matchers.*;
@@ -64,7 +64,7 @@ import static org.hamcrest.Matchers.*;
@LuceneTestCase.SuppressFileSystems("*") // TODO: clean up this test to allow extra files
// TODO: jimfs is really broken here (throws wrong exception from detection method).
// if its in your classpath, then do not use plugins!!!!!!
-public class PluginManagerTests extends ElasticsearchIntegrationTest {
+public class PluginManagerIT extends ESIntegTestCase {
private Tuple initialSettings;
private CaptureOutputTerminal terminal = new CaptureOutputTerminal();
@@ -73,7 +73,7 @@ public class PluginManagerTests extends ElasticsearchIntegrationTest {
public void setup() throws Exception {
initialSettings = buildInitialSettings();
System.setProperty("es.default.path.home", initialSettings.v1().get("path.home"));
- Path binDir = initialSettings.v2().homeFile().resolve("bin");
+ Path binDir = initialSettings.v2().binFile();
if (!Files.exists(binDir)) {
Files.createDirectories(binDir);
}
@@ -136,7 +136,7 @@ public class PluginManagerTests extends ElasticsearchIntegrationTest {
"classname", "FakePlugin");
Environment env = initialSettings.v2();
- Path binDir = env.homeFile().resolve("bin");
+ Path binDir = env.binFile();
Path pluginBinDir = binDir.resolve(pluginName);
Path pluginConfigDir = env.configFile().resolve(pluginName);
@@ -281,7 +281,7 @@ public class PluginManagerTests extends ElasticsearchIntegrationTest {
"classname", "FakePlugin");
Environment env = initialSettings.v2();
- Path binDir = env.homeFile().resolve("bin");
+ Path binDir = env.binFile();
Path pluginBinDir = binDir.resolve(pluginName);
assertStatusOk(String.format(Locale.ROOT, "install %s --url %s --verbose", pluginName, pluginUrl));
diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginManagerUnitTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginManagerUnitTests.java
index 3d4c9d57908..75d680c1abd 100644
--- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/PluginManagerUnitTests.java
@@ -23,7 +23,7 @@ import com.google.common.io.Files;
import org.elasticsearch.Version;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class PluginManagerUnitTests extends ElasticsearchTestCase {
+public class PluginManagerUnitTests extends ESTestCase {
@Test
public void testThatConfigDirectoryCanBeOutsideOfElasticsearchHomeDirectory() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginTestCase.java b/core/src/test/java/org/elasticsearch/plugins/PluginTestCase.java
index dd3cb164aaa..dffcba6e69f 100644
--- a/core/src/test/java/org/elasticsearch/plugins/PluginTestCase.java
+++ b/core/src/test/java/org/elasticsearch/plugins/PluginTestCase.java
@@ -21,8 +21,7 @@ package org.elasticsearch.plugins;
import org.elasticsearch.cluster.ClusterService;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.junit.Ignore;
+import org.elasticsearch.test.ESIntegTestCase;
import java.net.URISyntaxException;
import java.net.URL;
@@ -33,8 +32,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**
* Base class that lets you start a node with plugins.
*/
-@Ignore
-public abstract class PluginTestCase extends ElasticsearchIntegrationTest {
+public abstract class PluginTestCase extends ESIntegTestCase {
public String startNodeWithPlugins(Settings nodeSettings, String pluginDir, String ... pluginClassNames) throws URISyntaxException {
URL resource = getClass().getResource(pluginDir);
diff --git a/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java b/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java
rename to core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java
index 96673555e09..b171278d659 100644
--- a/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java
@@ -20,14 +20,14 @@ package org.elasticsearch.plugins;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.responseheader.TestResponseHeaderPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
import static org.elasticsearch.rest.RestStatus.OK;
import static org.elasticsearch.rest.RestStatus.UNAUTHORIZED;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasStatus;
import static org.hamcrest.Matchers.equalTo;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
* Test a rest action that sets special response headers
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class ResponseHeaderPluginTests extends ElasticsearchIntegrationTest {
+public class ResponseHeaderPluginIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/plugins/SitePluginTests.java b/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/plugins/SitePluginTests.java
rename to core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java
index 254d35253cb..6e62fd9e675 100644
--- a/core/src/test/java/org/elasticsearch/plugins/SitePluginTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java
@@ -23,8 +23,8 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
@@ -36,7 +36,7 @@ import java.util.Locale;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.rest.RestStatus.*;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasStatus;
import static org.hamcrest.Matchers.containsString;
@@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.containsString;
* We want to test site plugins
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class SitePluginTests extends ElasticsearchIntegrationTest {
+public class SitePluginIT extends ESIntegTestCase {
@Override
diff --git a/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigTests.java b/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigTests.java
rename to core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java
index 78dd6809033..ed3062620bc 100644
--- a/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigTests.java
+++ b/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java
@@ -23,8 +23,8 @@ import org.apache.http.impl.client.HttpClients;
import org.elasticsearch.common.io.PathUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.http.HttpServerTransport;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
@@ -34,11 +34,11 @@ import java.nio.file.Path;
import static org.apache.lucene.util.Constants.WINDOWS;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.rest.RestStatus.OK;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasStatus;
@ClusterScope(scope = SUITE, numDataNodes = 1)
-public class SitePluginRelativePathConfigTests extends ElasticsearchIntegrationTest {
+public class SitePluginRelativePathConfigIT extends ESIntegTestCase {
private final Path root = PathUtils.get(".").toAbsolutePath().getRoot();
diff --git a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartTests.java b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/recovery/FullRollingRestartTests.java
rename to core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
index dd859b46fb4..c0d64533725 100644
--- a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
@@ -25,19 +25,19 @@ import org.elasticsearch.common.Priority;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.zen.ZenDiscovery;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
/**
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0.0)
-public class FullRollingRestartTests extends ElasticsearchIntegrationTest {
+public class FullRollingRestartIT extends ESIntegTestCase {
protected void assertTimeout(ClusterHealthRequestBuilder requestBuilder) {
ClusterHealthResponse clusterHealth = requestBuilder.get();
@@ -53,7 +53,6 @@ public class FullRollingRestartTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testFullRollingRestart() throws Exception {
Settings settings = Settings.builder().put(ZenDiscovery.SETTING_JOIN_TIMEOUT, "30s").build();
internalCluster().startNode(settings);
diff --git a/core/src/test/java/org/elasticsearch/recovery/RecoveriesCollectionTests.java b/core/src/test/java/org/elasticsearch/recovery/RecoveriesCollectionTests.java
index 37bf22aa470..354a63c3b02 100644
--- a/core/src/test/java/org/elasticsearch/recovery/RecoveriesCollectionTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/RecoveriesCollectionTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.indices.recovery.*;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.Test;
@@ -42,7 +42,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.lessThan;
-public class RecoveriesCollectionTests extends ElasticsearchSingleNodeTest {
+public class RecoveriesCollectionTests extends ESSingleNodeTestCase {
final static RecoveryTarget.RecoveryListener listener = new RecoveryTarget.RecoveryListener() {
@Override
diff --git a/core/src/test/java/org/elasticsearch/recovery/RecoverySettingsTest.java b/core/src/test/java/org/elasticsearch/recovery/RecoverySettingsTest.java
index f1610f5b197..3d678865e4d 100644
--- a/core/src/test/java/org/elasticsearch/recovery/RecoverySettingsTest.java
+++ b/core/src/test/java/org/elasticsearch/recovery/RecoverySettingsTest.java
@@ -21,12 +21,12 @@ package org.elasticsearch.recovery;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.indices.recovery.RecoverySettings;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.concurrent.TimeUnit;
-public class RecoverySettingsTest extends ElasticsearchSingleNodeTest {
+public class RecoverySettingsTest extends ESSingleNodeTestCase {
@Override
protected boolean resetNodeAfterTest() {
diff --git a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java
rename to core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java
index cccfe8024b7..60a6acb7ed9 100644
--- a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.index.shard.DocsStats;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.TranslogConfig;
import org.elasticsearch.test.BackgroundIndexer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -42,15 +42,17 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
import static org.hamcrest.Matchers.equalTo;
-public class RecoveryWhileUnderLoadTests extends ElasticsearchIntegrationTest {
+public class RecoveryWhileUnderLoadIT extends ESIntegTestCase {
- private final ESLogger logger = Loggers.getLogger(RecoveryWhileUnderLoadTests.class);
+ private final ESLogger logger = Loggers.getLogger(RecoveryWhileUnderLoadIT.class);
@Test
- @Slow
public void recoverWhileUnderLoadAllocateReplicasTest() throws Exception {
logger.info("--> creating test index ...");
int numberOfShards = numberOfShards();
@@ -105,7 +107,6 @@ public class RecoveryWhileUnderLoadTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void recoverWhileUnderLoadAllocateReplicasRelocatePrimariesTest() throws Exception {
logger.info("--> creating test index ...");
int numberOfShards = numberOfShards();
@@ -158,7 +159,6 @@ public class RecoveryWhileUnderLoadTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void recoverWhileUnderLoadWithReducedAllowedNodes() throws Exception {
logger.info("--> creating test index ...");
int numberOfShards = numberOfShards();
@@ -229,7 +229,6 @@ public class RecoveryWhileUnderLoadTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void recoverWhileRelocating() throws Exception {
final int numShards = between(2, 10);
final int numReplicas = 0;
diff --git a/core/src/test/java/org/elasticsearch/recovery/RelocationTests.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/recovery/RelocationTests.java
rename to core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
index 4f61be0b273..54afe037ca5 100644
--- a/core/src/test/java/org/elasticsearch/recovery/RelocationTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
@@ -57,11 +57,16 @@ import org.elasticsearch.indices.recovery.RecoveryTarget;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.test.BackgroundIndexer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
-import org.elasticsearch.transport.*;
+import org.elasticsearch.transport.Transport;
+import org.elasticsearch.transport.TransportException;
+import org.elasticsearch.transport.TransportModule;
+import org.elasticsearch.transport.TransportRequest;
+import org.elasticsearch.transport.TransportRequestOptions;
+import org.elasticsearch.transport.TransportService;
import org.junit.Test;
import java.io.IOException;
@@ -78,15 +83,20 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
-import static org.hamcrest.Matchers.*;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
/**
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
@TestLogging("indices.recovery:TRACE,index.shard.service:TRACE")
-public class RelocationTests extends ElasticsearchIntegrationTest {
+public class RelocationIT extends ESIntegTestCase {
private final TimeValue ACCEPTABLE_RELOCATION_TIME = new TimeValue(5, TimeUnit.MINUTES);
@Override
@@ -145,7 +155,6 @@ public class RelocationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testRelocationWhileIndexingRandom() throws Exception {
int numberOfRelocations = scaledRandomIntBetween(1, rarely() ? 10 : 4);
int numberOfReplicas = randomBoolean() ? 0 : 1;
@@ -255,7 +264,6 @@ public class RelocationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testRelocationWhileRefreshing() throws Exception {
int numberOfRelocations = scaledRandomIntBetween(1, rarely() ? 10 : 4);
int numberOfReplicas = randomBoolean() ? 0 : 1;
@@ -441,7 +449,6 @@ public class RelocationTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testCancellationCleansTempFiles() throws Exception {
final String indexName = "test";
diff --git a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java
index f91ce01967c..d19117e1d23 100644
--- a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.client.Requests.*;
@@ -31,7 +31,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.equalTo;
-public class SimpleRecoveryTests extends ElasticsearchIntegrationTest {
+public class SimpleRecoveryIT extends ESIntegTestCase {
@Override
public Settings indexSettings() {
diff --git a/core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryIT.java
index eb2f0af69ee..aba0f38af85 100644
--- a/core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/SmallFileChunkSizeRecoveryIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Settings;
/**
*
*/
-public class SmallFileChunkSizeRecoveryTests extends SimpleRecoveryTests {
+public class SmallFileChunkSizeRecoveryIT extends SimpleRecoveryIT {
@Override
protected Settings recoverySettings() {
diff --git a/core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryIT.java
index d565bacfd55..e716736252c 100644
--- a/core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/SmallTranslogOpsRecoveryIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Settings;
/**
*
*/
-public class SmallTranslogOpsRecoveryTests extends SimpleRecoveryTests {
+public class SmallTranslogOpsRecoveryIT extends SimpleRecoveryIT {
@Override
protected Settings recoverySettings() {
diff --git a/core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryIT.java
index 500b1c74ca5..a39849e0f1c 100644
--- a/core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/SmallTranslogSizeRecoveryIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Settings;
/**
*
*/
-public class SmallTranslogSizeRecoveryTests extends SimpleRecoveryTests {
+public class SmallTranslogSizeRecoveryIT extends SimpleRecoveryIT {
@Override
protected Settings recoverySettings() {
diff --git a/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryTests.java
rename to core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java
index 02656e9e4e0..335da8601d9 100644
--- a/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryTests.java
+++ b/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.indices.recovery.RecoveryFileChunkRequest;
import org.elasticsearch.indices.recovery.RecoverySettings;
import org.elasticsearch.indices.recovery.RecoveryTarget;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.*;
import org.junit.Test;
@@ -51,9 +51,9 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-@ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 2, numClientNodes = 0, scope = ElasticsearchIntegrationTest.Scope.TEST)
+@ESIntegTestCase.ClusterScope(numDataNodes = 2, numClientNodes = 0, scope = ESIntegTestCase.Scope.TEST)
@SuppressCodecs("*") // test relies on exact file extensions
-public class TruncatedRecoveryTests extends ElasticsearchIntegrationTest {
+public class TruncatedRecoveryIT extends ESIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
Settings.Builder builder = Settings.builder()
diff --git a/core/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java b/core/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java
index 478d77b663c..683229c87e8 100644
--- a/core/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/BytesRestResponseTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.query.TestQueryParsingException;
import org.elasticsearch.search.SearchShardTarget;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.FakeRestRequest;
import org.elasticsearch.transport.RemoteTransportException;
import org.junit.Test;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class BytesRestResponseTests extends ElasticsearchTestCase {
+public class BytesRestResponseTests extends ESTestCase {
@Test
public void testWithHeaders() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java b/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java
rename to core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java
index da5da159223..fa7eccd6658 100644
--- a/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java
@@ -20,7 +20,7 @@ package org.elasticsearch.rest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
@@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class CorsRegexDefaultTests extends ElasticsearchIntegrationTest {
+public class CorsRegexDefaultIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/rest/CorsRegexTests.java b/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/rest/CorsRegexTests.java
rename to core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java
index 8e568d847cf..d0e0282f2ca 100644
--- a/core/src/test/java/org/elasticsearch/rest/CorsRegexTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java
@@ -22,15 +22,15 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ALLOW_ORIGIN;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ALLOW_CREDENTIALS;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ENABLED;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.is;
@@ -38,9 +38,9 @@ import static org.hamcrest.Matchers.is;
*
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class CorsRegexTests extends ElasticsearchIntegrationTest {
+public class CorsRegexIT extends ESIntegTestCase {
- protected static final ESLogger logger = Loggers.getLogger(CorsRegexTests.class);
+ protected static final ESLogger logger = Loggers.getLogger(CorsRegexIT.class);
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/rest/HeadersAndContextCopyClientTests.java b/core/src/test/java/org/elasticsearch/rest/HeadersAndContextCopyClientTests.java
index 6a110cd5da4..2faabe76ba3 100644
--- a/core/src/test/java/org/elasticsearch/rest/HeadersAndContextCopyClientTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/HeadersAndContextCopyClientTests.java
@@ -36,7 +36,7 @@ import org.elasticsearch.client.Client;
import org.elasticsearch.client.Requests;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.FakeRestRequest;
import org.junit.Test;
@@ -53,7 +53,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.is;
-public class HeadersAndContextCopyClientTests extends ElasticsearchTestCase {
+public class HeadersAndContextCopyClientTests extends ESTestCase {
@Test
public void testRegisterRelevantHeaders() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/rest/RestFilterChainTests.java b/core/src/test/java/org/elasticsearch/rest/RestFilterChainTests.java
index 087bc306321..a8ad99d3b39 100644
--- a/core/src/test/java/org/elasticsearch/rest/RestFilterChainTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/RestFilterChainTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.FakeRestRequest;
import org.junit.Test;
@@ -37,7 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.CoreMatchers.equalTo;
-public class RestFilterChainTests extends ElasticsearchTestCase {
+public class RestFilterChainTests extends ESTestCase {
@Test
public void testRestFilters() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/rest/RestRequestTests.java b/core/src/test/java/org/elasticsearch/rest/RestRequestTests.java
index 1565455b604..12bbef4735b 100644
--- a/core/src/test/java/org/elasticsearch/rest/RestRequestTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/RestRequestTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.rest;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.collect.ImmutableOpenMap;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class RestRequestTests extends ElasticsearchTestCase {
+public class RestRequestTests extends ESTestCase {
@Test
public void testContext() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java b/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java
rename to core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeIT.java
index 3b9f8c19b5a..82d88aeb950 100644
--- a/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeTest.java
+++ b/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeIT.java
@@ -36,8 +36,8 @@ import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.engine.Segment;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.BeforeClass;
import java.util.ArrayList;
@@ -47,8 +47,8 @@ import java.util.List;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) // test scope since we set cluster wide settings
-public class UpgradeTest extends ElasticsearchBackwardsCompatIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST) // test scope since we set cluster wide settings
+public class UpgradeIT extends ESBackcompatTestCase {
@BeforeClass
public static void checkUpgradeVersion() {
@@ -235,7 +235,7 @@ public class UpgradeTest extends ElasticsearchBackwardsCompatIntegrationTest {
}
static boolean isUpgraded(Client client, String index) throws Exception {
- ESLogger logger = Loggers.getLogger(UpgradeTest.class);
+ ESLogger logger = Loggers.getLogger(UpgradeIT.class);
int toUpgrade = 0;
for (IndexUpgradeStatus status : getUpgradeStatus(client, index)) {
logger.info("Index: " + status.getIndex() + ", total: " + status.getTotalBytes() + ", toUpgrade: " + status.getToUpgradeBytes());
diff --git a/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexTest.java b/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexIT.java
similarity index 86%
rename from core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexTest.java
rename to core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexIT.java
index 3fd6bf4c5fb..68777f107e3 100644
--- a/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexTest.java
+++ b/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeReallyOldIndexIT.java
@@ -20,27 +20,27 @@
package org.elasticsearch.rest.action.admin.indices.upgrade;
import org.elasticsearch.Version;
-import org.elasticsearch.bwcompat.StaticIndexBackwardCompatibilityTest;
+import org.elasticsearch.bwcompat.StaticIndexBackwardCompatibilityIT;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.indices.IndicesService;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-public class UpgradeReallyOldIndexTest extends StaticIndexBackwardCompatibilityTest {
+public class UpgradeReallyOldIndexIT extends StaticIndexBackwardCompatibilityIT {
public void testUpgrade_0_90_6() throws Exception {
String indexName = "index-0.90.6";
loadIndex(indexName);
assertMinVersion(indexName, org.apache.lucene.util.Version.parse("4.5.1"));
- UpgradeTest.assertNotUpgraded(client(), indexName);
- assertTrue(UpgradeTest.hasAncientSegments(client(), indexName));
+ UpgradeIT.assertNotUpgraded(client(), indexName);
+ assertTrue(UpgradeIT.hasAncientSegments(client(), indexName));
assertNoFailures(client().admin().indices().prepareUpgrade(indexName).setUpgradeOnlyAncientSegments(true).get());
- assertFalse(UpgradeTest.hasAncientSegments(client(), "index-0.90.6"));
+ assertFalse(UpgradeIT.hasAncientSegments(client(), "index-0.90.6"));
// This index has only ancient segments, so it should now be fully upgraded:
- UpgradeTest.assertUpgraded(client(), indexName);
+ UpgradeIT.assertUpgraded(client(), indexName);
assertEquals(Version.CURRENT.luceneVersion.toString(), client().admin().indices().prepareGetSettings(indexName).get().getSetting(indexName, IndexMetaData.SETTING_VERSION_MINIMUM_COMPATIBLE));
assertMinVersion(indexName, Version.CURRENT.luceneVersion);
}
diff --git a/core/src/test/java/org/elasticsearch/rest/action/support/RestTableTest.java b/core/src/test/java/org/elasticsearch/rest/action/support/RestTableTest.java
index 3faa0ea3673..3df6c256e21 100644
--- a/core/src/test/java/org/elasticsearch/rest/action/support/RestTableTest.java
+++ b/core/src/test/java/org/elasticsearch/rest/action/support/RestTableTest.java
@@ -20,7 +20,7 @@
package org.elasticsearch.rest.action.support;
import org.elasticsearch.common.Table;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.FakeRestRequest;
import org.junit.Before;
import org.junit.Test;
@@ -31,7 +31,7 @@ import java.util.List;
import static org.elasticsearch.rest.action.support.RestTable.buildDisplayHeaders;
import static org.hamcrest.Matchers.*;
-public class RestTableTest extends ElasticsearchTestCase {
+public class RestTableTest extends ESTestCase {
private Table table = new Table();
private FakeRestRequest restRequest = new FakeRestRequest();
diff --git a/core/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java b/core/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
index b3bf486b1de..980d4a1bdc8 100644
--- a/core/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/rest/util/RestUtilsTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.rest.util;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.rest.support.RestUtils;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Locale;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class RestUtilsTests extends ElasticsearchTestCase {
+public class RestUtilsTests extends ESTestCase {
@Test
public void testDecodeQueryString() {
diff --git a/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingTests.java b/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingTests.java
rename to core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java
index 0ebbda7d313..a3868e33ab7 100644
--- a/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java
@@ -22,7 +22,7 @@ package org.elasticsearch.routing;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
import org.elasticsearch.common.Priority;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Map;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class AliasResolveRoutingTests extends ElasticsearchIntegrationTest {
+public class AliasResolveRoutingIT extends ESIntegTestCase {
@Test
public void testResolveIndexRouting() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/routing/AliasRoutingTests.java b/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/routing/AliasRoutingTests.java
rename to core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java
index ff2a006a049..b7b44afd437 100644
--- a/core/src/test/java/org/elasticsearch/routing/AliasRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.cluster.metadata.AliasAction.newAddAliasAction;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class AliasRoutingTests extends ElasticsearchIntegrationTest {
+public class AliasRoutingIT extends ESIntegTestCase {
@Override
protected int minimumNumberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java b/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java
rename to core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java
index cca1d2125a2..24f0df4f5d8 100644
--- a/core/src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java
+++ b/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java
@@ -36,12 +36,11 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.mapper.MapperParsingException;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
-import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.hamcrest.Matchers.*;
-public class SimpleRoutingTests extends ElasticsearchIntegrationTest {
+public class SimpleRoutingIT extends ESIntegTestCase {
@Override
protected int minimumNumberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/script/CustomScriptContextTests.java b/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/script/CustomScriptContextTests.java
rename to core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java
index 16006429baa..ef9c4e3ced4 100644
--- a/core/src/test/java/org/elasticsearch/script/CustomScriptContextTests.java
+++ b/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java
@@ -27,13 +27,13 @@ import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.script.expression.ExpressionScriptEngineService;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.notNullValue;
-public class CustomScriptContextTests extends ElasticsearchIntegrationTest {
+public class CustomScriptContextIT extends ESIntegTestCase {
private static final ImmutableSet LANG_SET = ImmutableSet.of(GroovyScriptEngineService.NAME, MustacheScriptEngineService.NAME, ExpressionScriptEngineService.NAME);
diff --git a/core/src/test/java/org/elasticsearch/script/GroovyScriptTests.java b/core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/script/GroovyScriptTests.java
rename to core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java
index 9ceda548b9f..8df2c205b38 100644
--- a/core/src/test/java/org/elasticsearch/script/GroovyScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.lucene.search.function.CombineFunction;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.List;
@@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Various tests for Groovy scripting
*/
-public class GroovyScriptTests extends ElasticsearchIntegrationTest {
+public class GroovyScriptIT extends ESIntegTestCase {
@Test
public void testGroovyBigDecimalTransformation() {
diff --git a/core/src/test/java/org/elasticsearch/script/GroovySecurityTests.java b/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/script/GroovySecurityTests.java
rename to core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java
index cb1a2771029..847fe28fbbf 100644
--- a/core/src/test/java/org/elasticsearch/script/GroovySecurityTests.java
+++ b/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java
@@ -23,7 +23,7 @@ import org.apache.lucene.util.Constants;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.nio.file.Path;
@@ -35,8 +35,8 @@ import static org.hamcrest.CoreMatchers.equalTo;
/**
* Tests for the Groovy security permissions
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0)
-public class GroovySecurityTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0)
+public class GroovySecurityIT extends ESIntegTestCase {
@Override
public void setUp() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/script/IndexLookupTests.java b/core/src/test/java/org/elasticsearch/script/IndexLookupIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/script/IndexLookupTests.java
rename to core/src/test/java/org/elasticsearch/script/IndexLookupIT.java
index 84322c73fb7..36128824a9c 100644
--- a/core/src/test/java/org/elasticsearch/script/IndexLookupTests.java
+++ b/core/src/test/java/org/elasticsearch/script/IndexLookupIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -43,7 +43,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.equalTo;
-public class IndexLookupTests extends ElasticsearchIntegrationTest {
+public class IndexLookupIT extends ESIntegTestCase {
String includeAllFlag = "_FREQUENCIES | _OFFSETS | _PAYLOADS | _POSITIONS | _CACHE";
String includeAllWithoutRecordFlag = "_FREQUENCIES | _OFFSETS | _PAYLOADS | _POSITIONS ";
diff --git a/core/src/test/java/org/elasticsearch/script/IndexedScriptTests.java b/core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/script/IndexedScriptTests.java
rename to core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java
index f4696d8f8e3..1142206ee8a 100644
--- a/core/src/test/java/org/elasticsearch/script/IndexedScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.script.expression.ExpressionScriptEngineService;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class IndexedScriptTests extends ElasticsearchIntegrationTest {
+public class IndexedScriptIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/script/NativeScriptTests.java b/core/src/test/java/org/elasticsearch/script/NativeScriptTests.java
index 9d07b17a91d..6ac8f198c98 100644
--- a/core/src/test/java/org/elasticsearch/script/NativeScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/script/NativeScriptTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.settings.SettingsModule;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.EnvironmentModule;
import org.elasticsearch.script.ScriptService.ScriptType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.threadpool.ThreadPoolModule;
import org.elasticsearch.watcher.ResourceWatcherService;
@@ -44,7 +44,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class NativeScriptTests extends ElasticsearchTestCase {
+public class NativeScriptTests extends ESTestCase {
@Test
public void testNativeScript() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java b/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java
rename to core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java
index adc5351d57b..636c8335df2 100644
--- a/core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -36,8 +36,8 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
//Use Suite scope so that paths get set correctly
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class OnDiskScriptTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class OnDiskScriptIT extends ESIntegTestCase {
@Override
public Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptContextRegistryTests.java b/core/src/test/java/org/elasticsearch/script/ScriptContextRegistryTests.java
index b96391682fe..8bb77b48fef 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptContextRegistryTests.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptContextRegistryTests.java
@@ -20,13 +20,13 @@
package org.elasticsearch.script;
import com.google.common.collect.Lists;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
import java.io.IOException;
-public class ScriptContextRegistryTests extends ElasticsearchTestCase {
+public class ScriptContextRegistryTests extends ESTestCase {
@Test
public void testValidateCustomScriptContextsOperation() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java
rename to core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java
index d50b9573bc7..2acfb553e4f 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java
@@ -26,19 +26,18 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
import static org.hamcrest.Matchers.equalTo;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 3)
-public class ScriptFieldTests extends ElasticsearchIntegrationTest {
+public class ScriptFieldIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsTest.java b/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsTest.java
rename to core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java
index 1a57c5155e2..0c0bf9aeea3 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsTest.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java
@@ -27,11 +27,11 @@ import org.elasticsearch.action.indexedscripts.get.GetIndexedScriptResponse;
import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptResponse;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.index.IndexNotFoundException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class ScriptIndexSettingsTest extends ElasticsearchIntegrationTest{
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class ScriptIndexSettingsIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java b/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java
index 188cd8d7650..0fc73d80875 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptModesTests.java
@@ -27,7 +27,7 @@ import org.elasticsearch.script.expression.ExpressionScriptEngineService;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
import org.elasticsearch.search.lookup.SearchLookup;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +37,7 @@ import java.util.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
-public class ScriptModesTests extends ElasticsearchTestCase {
+public class ScriptModesTests extends ESTestCase {
private static final Set ALL_LANGS = ImmutableSet.of(GroovyScriptEngineService.NAME, MustacheScriptEngineService.NAME, ExpressionScriptEngineService.NAME, "custom", "test");
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptParameterParserTest.java b/core/src/test/java/org/elasticsearch/script/ScriptParameterParserTest.java
index 8c13bb997c7..70c6617592d 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptParameterParserTest.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptParameterParserTest.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.XContentParser.Token;
import org.elasticsearch.script.Script.ScriptParseException;
import org.elasticsearch.script.ScriptParameterParser.ScriptParameterValue;
import org.elasticsearch.script.ScriptService.ScriptType;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -38,7 +38,7 @@ import java.util.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-public class ScriptParameterParserTest extends ElasticsearchTestCase {
+public class ScriptParameterParserTest extends ESTestCase {
@Test
public void testTokenDefaultInline() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
index ca7401e2f3f..96f2a45b2b9 100644
--- a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.script.expression.ExpressionScriptEngineService;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
import org.elasticsearch.search.lookup.SearchLookup;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.watcher.ResourceWatcherService;
import org.junit.Before;
import org.junit.Test;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.sameInstance;
-public class ScriptServiceTests extends ElasticsearchTestCase {
+public class ScriptServiceTests extends ESTestCase {
private ResourceWatcherService resourceWatcherService;
private Set scriptEngineServices;
diff --git a/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptTests.java b/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptTests.java
rename to core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.java
index 098cbb514a5..70d958de88f 100644
--- a/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.java
@@ -45,7 +45,7 @@ import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.pipeline.SimpleValue;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import java.util.HashMap;
@@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue;
-public class ExpressionScriptTests extends ElasticsearchIntegrationTest {
+public class ExpressionScriptIT extends ESIntegTestCase {
private SearchRequestBuilder buildRequest(String script, Object... params) {
ensureGreen("test");
diff --git a/core/src/test/java/org/elasticsearch/script/mustache/MustacheScriptEngineTest.java b/core/src/test/java/org/elasticsearch/script/mustache/MustacheScriptEngineTest.java
index beea87ec603..c2060b915fd 100644
--- a/core/src/test/java/org/elasticsearch/script/mustache/MustacheScriptEngineTest.java
+++ b/core/src/test/java/org/elasticsearch/script/mustache/MustacheScriptEngineTest.java
@@ -22,7 +22,7 @@ import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.CompiledScript;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Mustache based templating test
*/
-public class MustacheScriptEngineTest extends ElasticsearchTestCase {
+public class MustacheScriptEngineTest extends ESTestCase {
private MustacheScriptEngineService qe;
private JsonEscapingMustacheFactory escaper;
diff --git a/core/src/test/java/org/elasticsearch/script/mustache/MustacheTest.java b/core/src/test/java/org/elasticsearch/script/mustache/MustacheTest.java
index a793b279ec4..7dea0846df7 100644
--- a/core/src/test/java/org/elasticsearch/script/mustache/MustacheTest.java
+++ b/core/src/test/java/org/elasticsearch/script/mustache/MustacheTest.java
@@ -21,7 +21,7 @@ package org.elasticsearch.script.mustache;
import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import com.github.mustachejava.MustacheFactory;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.StringReader;
@@ -31,7 +31,7 @@ import java.util.HashMap;
/**
* Figure out how Mustache works for the simplest use case. Leaving in here for now for reference.
* */
-public class MustacheTest extends ElasticsearchTestCase {
+public class MustacheTest extends ESTestCase {
@Test
public void test() {
diff --git a/core/src/test/java/org/elasticsearch/search/CountSearchTests.java b/core/src/test/java/org/elasticsearch/search/CountSearchIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/CountSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/CountSearchIT.java
index fd7f028a922..61d887da366 100644
--- a/core/src/test/java/org/elasticsearch/search/CountSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/CountSearchIT.java
@@ -23,14 +23,14 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
/**
* {@link SearchType#COUNT} is deprecated but let's make sure it still works as expected.
*/
-public class CountSearchTests extends ElasticsearchIntegrationTest {
+public class CountSearchIT extends ESIntegTestCase {
public void testDuelCountQueryThenFetch() throws Exception {
createIndex("idx");
diff --git a/core/src/test/java/org/elasticsearch/search/MultiValueModeTests.java b/core/src/test/java/org/elasticsearch/search/MultiValueModeTests.java
index 197c6f8cbaa..5bf1a0e9139 100644
--- a/core/src/test/java/org/elasticsearch/search/MultiValueModeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/MultiValueModeTests.java
@@ -28,12 +28,12 @@ import org.elasticsearch.index.fielddata.FieldData;
import org.elasticsearch.index.fielddata.NumericDoubleValues;
import org.elasticsearch.index.fielddata.SortedBinaryDocValues;
import org.elasticsearch.index.fielddata.SortedNumericDoubleValues;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.Arrays;
-public class MultiValueModeTests extends ElasticsearchTestCase {
+public class MultiValueModeTests extends ESTestCase {
private static FixedBitSet randomRootDocs(int maxDoc) {
FixedBitSet set = new FixedBitSet(maxDoc);
diff --git a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java
index 2578257af7c..a222ff52722 100644
--- a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java
@@ -20,7 +20,7 @@ package org.elasticsearch.search;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.util.concurrent.ExecutionException;
@@ -28,7 +28,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
-public class SearchServiceTests extends ElasticsearchSingleNodeTest {
+public class SearchServiceTests extends ESSingleNodeTestCase {
@Override
protected boolean resetNodeAfterTest() {
diff --git a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java
rename to core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java
index 322679a584e..b5b4b94a8a1 100644
--- a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java
@@ -20,12 +20,11 @@
package org.elasticsearch.search;
import com.google.common.base.Predicate;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.concurrent.Future;
@@ -34,11 +33,9 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-@LuceneTestCase.Slow
-public class SearchWithRejectionsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class SearchWithRejectionsIT extends ESIntegTestCase {
@Override
public Settings nodeSettings(int nodeOrdinal) {
return settingsBuilder().put(super.nodeSettings(nodeOrdinal))
diff --git a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperTest.java b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperTest.java
rename to core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java
index e83f477d335..c97e29a0f9c 100644
--- a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperTest.java
+++ b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java
@@ -23,19 +23,19 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
@ClusterScope(scope = SUITE)
-public class StressSearchServiceReaperTest extends ElasticsearchIntegrationTest {
+public class StressSearchServiceReaperIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
@@ -44,7 +44,6 @@ public class StressSearchServiceReaperTest extends ElasticsearchIntegrationTest
.put(SearchService.KEEPALIVE_INTERVAL_KEY, TimeValue.timeValueMillis(1)).build();
}
- @Slow
@Test // see issue #5165 - this test fails each time without the fix in pull #5170
public void testStressReaper() throws ExecutionException, InterruptedException {
int num = randomIntBetween(100, 150);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationCollectorTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationCollectorTests.java
index dcb3dc2f165..1172170ca12 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationCollectorTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationCollectorTests.java
@@ -24,11 +24,11 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.search.aggregations.support.AggregationContext;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import java.io.IOException;
-public class AggregationCollectorTests extends ElasticsearchSingleNodeTest {
+public class AggregationCollectorTests extends ESSingleNodeTestCase {
public void testNeedsScores() throws Exception {
IndexService index = createIndex("idx");
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.java
index 2e27c683046..631f705bf5b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -40,8 +40,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class AggregationsBinaryTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class AggregationsBinaryIT extends ESIntegTestCase {
private static final String STRING_FIELD_NAME = "s_value";
private static final String INT_FIELD_NAME = "i_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java
index 640ac7ffb81..8944294fd42 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.List;
@@ -35,8 +35,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class AggregationsIntegrationTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class AggregationsIntegrationIT extends ESIntegTestCase {
static int numDocs;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/CombiTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/CombiTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java
index 4888996f35f..8282a538bec 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/CombiTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.missing.Missing;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -46,7 +46,7 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-public class CombiTests extends ElasticsearchIntegrationTest {
+public class CombiIT extends ESIntegTestCase {
/**
* Making sure that if there are multiple aggregations, working on the same field, yet require different
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java
index 109d0951a56..abe88af10aa 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java
@@ -22,8 +22,6 @@ package org.elasticsearch.search.aggregations;
import com.carrotsearch.hppc.IntHashSet;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
@@ -42,7 +40,7 @@ import org.elasticsearch.search.aggregations.bucket.range.RangeBuilder;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.HashMap;
@@ -71,8 +69,7 @@ import static org.hamcrest.core.IsNull.notNullValue;
* Additional tests that aim at testing more complex aggregation trees on larger random datasets, so that things like
* the growth of dynamic arrays is tested.
*/
-@Slow
-public class EquivalenceTests extends ElasticsearchIntegrationTest {
+public class EquivalenceIT extends ESIntegTestCase {
// Make sure that unordered, reversed, disjoint and/or overlapping ranges are supported
// Duel with filters
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/MetaDataTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.java
index 10e399df6a4..c83ad5777bc 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.java
@@ -24,7 +24,7 @@ import com.carrotsearch.hppc.IntIntHashMap;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.bucket.missing.Missing;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -38,7 +38,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
/**
*
*/
-public class MetaDataTests extends ElasticsearchIntegrationTest {
+public class MetaDataIT extends ESIntegTestCase {
/**
* Making sure that if there are multiple aggregations, working on the same field, yet require different
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/MissingValueTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java
index 157dc528f80..f76e1ad9e56 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.metrics.cardinality.Cardinality;
import org.elasticsearch.search.aggregations.metrics.geobounds.GeoBounds;
import org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import static org.elasticsearch.search.aggregations.AggregationBuilders.cardinality;
import static org.elasticsearch.search.aggregations.AggregationBuilders.dateHistogram;
@@ -40,8 +40,8 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MissingValueTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MissingValueIT extends ESIntegTestCase {
@Override
protected int maximumNumberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/ParsingTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/ParsingTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java
index 9007611aa97..64f80d66e18 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/ParsingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java
@@ -22,14 +22,14 @@ package org.elasticsearch.search.aggregations;
import com.carrotsearch.randomizedtesting.generators.RandomStrings;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.security.SecureRandom;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class ParsingTests extends ElasticsearchIntegrationTest {
+public class ParsingIT extends ESIntegTestCase {
@Test(expected=SearchPhaseExecutionException.class)
public void testTwoTypes() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java
index 23947956466..4d5ff10f9cd 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java
@@ -23,14 +23,12 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.junit.Ignore;
+import org.elasticsearch.test.ESIntegTestCase;
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
-@Ignore
-public abstract class AbstractTermsTests extends ElasticsearchIntegrationTest {
+public abstract class AbstractTermsTestCase extends ESIntegTestCase {
public String randomExecutionHint() {
return randomBoolean() ? null : randomFrom(ExecutionMode.values()).toString();
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java
index 20378c96e25..b4c28ac3521 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java
@@ -22,7 +22,7 @@ import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -34,8 +34,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class BooleanTermsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class BooleanTermsIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "b_value";
private static final String MULTI_VALUED_FIELD_NAME = "b_values";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenIT.java
index 6379ba4709f..169901aad59 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.metrics.tophits.TopHits;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -48,8 +48,8 @@ import static org.hamcrest.Matchers.*;
/**
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class ChildrenTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class ChildrenIT extends ESIntegTestCase {
private final static Map categoryToControl = new HashMap<>();
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
index 496b5eb640a..4e81448ab6d 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -63,8 +63,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class DateHistogramTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class DateHistogramIT extends ESIntegTestCase {
private DateTime date(int month, int day) {
return new DateTime(2012, month, day, 0, 0, DateTimeZone.UTC);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java
index b4ec3e33424..d0d91b8d66a 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.mapper.core.DateFieldMapper;
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.transport.AssertingLocalTransport;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -48,9 +48,9 @@ import static org.hamcrest.core.IsNull.notNullValue;
* serialisation of negative offsets in these tests would break in pre 1.4 versions. These tests are separated from the other DateHistogramTests so the
* AssertingLocalTransport for these tests can be set to only use versions 1.4 onwards while keeping the other tests using all versions
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-@ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE)
-public class DateHistogramOffsetTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE)
+public class DateHistogramOffsetIT extends ESIntegTestCase {
private static final String DATE_FORMAT = "yyyy-MM-dd:hh-mm-ss";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java
index 795c5829432..caef65714fc 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.range.date.DateRangeBuilder;
import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.min.Min;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -55,8 +55,8 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class DateRangeTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class DateRangeIT extends ESIntegTestCase {
private static IndexRequestBuilder indexDoc(int month, int day, int value) throws Exception {
return client().prepareIndex("idx", "type").setSource(jsonBuilder()
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationIT.java
index aeba973a7da..941cf238d5a 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.search.aggregations.bucket;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.bucket.filter.Filter;
import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -32,7 +32,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf;
-public class DedicatedAggregationTests extends ElasticsearchIntegrationTest {
+public class DedicatedAggregationIT extends ESIntegTestCase {
// https://github.com/elasticsearch/elasticsearch/issues/7240
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java
index c7d38ad53ed..2bb98c2d59d 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -65,8 +65,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class DoubleTermsTests extends AbstractTermsTests {
+@ESIntegTestCase.SuiteScopeTestCase
+public class DoubleTermsIT extends AbstractTermsTestCase {
private static final int NUM_DOCS = 5; // TODO: randomize the size?
private static final String SINGLE_VALUED_FIELD_NAME = "d_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java
index 032504b1a0a..e881200d528 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.Filter;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.metrics.avg.Avg;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -48,8 +48,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class FilterTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class FilterIT extends ESIntegTestCase {
static int numDocs, numTag1Docs;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java
index e8cbce4bbbf..cd66d34b22a 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.bucket.filters.Filters;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.metrics.avg.Avg;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -51,8 +51,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class FiltersTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class FiltersIT extends ESIntegTestCase {
static int numDocs, numTag1Docs, numTag2Docs, numOtherDocs;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java
index 028b053c644..f6dff6ecf92 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.range.Range;
import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -53,8 +53,8 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GeoDistanceTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GeoDistanceIT extends ESIntegTestCase {
private IndexRequestBuilder indexCity(String idx, String name, String... latLons) throws Exception {
XContentBuilder source = jsonBuilder().startObject().field("city", name);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java
index dac686ea4ae..d385ea9f29e 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.filter.Filter;
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGrid;
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGrid.Bucket;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -49,8 +49,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GeoHashGridTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GeoHashGridIT extends ESIntegTestCase {
static ObjectIntMap expectedDocCountsForGeoHash = null;
static ObjectIntMap multiValuedExpectedDocCountsForGeoHash = null;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java
index a3b5a985e39..a313d157214 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -42,8 +42,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GlobalTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GlobalIT extends ESIntegTestCase {
static int numDocs;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java
index 2b8b57a3fec..e244d97cb7e 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -60,8 +60,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class HistogramTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class HistogramIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
private static final String MULTI_VALUED_FIELD_NAME = "l_values";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeIT.java
index fd7db94b3b9..ddbc885cb1d 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.search.aggregations.bucket.range.Range;
import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket;
import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -50,8 +50,8 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class IPv4RangeTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class IPv4RangeIT extends ESIntegTestCase {
@Override
public void setupSuiteScopeCluster() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java
index dee56814e70..cea685e31b0 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -63,8 +63,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class LongTermsTests extends AbstractTermsTests {
+@ESIntegTestCase.SuiteScopeTestCase
+public class LongTermsIT extends AbstractTermsTestCase {
private static final int NUM_DOCS = 5; // TODO randomize the size?
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java
index 6afcd455051..cdef370f1a4 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInter
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
@@ -53,8 +53,8 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MinDocCountTests extends AbstractTermsTests {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MinDocCountIT extends AbstractTermsTestCase {
private static final QueryBuilder QUERY = QueryBuilders.termQuery("match", true);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.java
index b2631879203..9b5df37cd8c 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.missing.Missing;
import org.elasticsearch.search.aggregations.metrics.avg.Avg;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -43,8 +43,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MissingTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MissingIT extends ESIntegTestCase {
static int numDocs, numDocsMissing, numDocsUnmapped;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java
index a8acf62ac73..3825901d54e 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.MetricsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.avg.Avg;
import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStats;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -40,8 +40,8 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class NaNSortingTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class NaNSortingIT extends ESIntegTestCase {
private enum SubAggregation {
AVG("avg") {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java
index 9b4a5bb78b5..7842fd847a0 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket;
import org.elasticsearch.search.aggregations.metrics.max.Max;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -66,8 +66,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class NestedTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class NestedIT extends ESIntegTestCase {
static int numParents;
static int[] numChildren;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggIT.java
index b3ae0733dd1..75751c1fa48 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggIT.java
@@ -22,7 +22,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,7 +34,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf;
-public class ParentIdAggTests extends ElasticsearchIntegrationTest {
+public class ParentIdAggIT extends ESIntegTestCase {
@Test
public void testParentIdAggregation() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java
index 4ea14e5bf9c..567844b727b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.range.Range.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.avg.Avg;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -51,8 +51,8 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class RangeTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class RangeIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
private static final String MULTI_VALUED_FIELD_NAME = "l_values";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java
index 01321634cd3..2a7be3b8b0a 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.nested.Nested;
import org.elasticsearch.search.aggregations.bucket.nested.ReverseNested;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.valuecount.ValueCount;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -58,8 +58,8 @@ import static org.hamcrest.core.IsNull.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class ReverseNestedTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class ReverseNestedIT extends ESIntegTestCase {
@Override
public void setupSuiteScopeCluster() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java
index d6ff926e4f7..58987220909 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
import org.elasticsearch.search.aggregations.metrics.max.Max;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Collection;
@@ -49,8 +49,8 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
* Tests the Sampler aggregation
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class SamplerTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class SamplerIT extends ESIntegTestCase {
public static final int NUM_SHARDS = 2;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java
index 232f85f3cfb..3436b4ccfa4 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java
@@ -32,7 +32,7 @@ import org.elasticsearch.search.aggregations.bucket.missing.Missing;
import org.elasticsearch.search.aggregations.bucket.nested.Nested;
import org.elasticsearch.search.aggregations.bucket.range.Range;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -57,8 +57,8 @@ import static org.hamcrest.Matchers.equalTo;
* compute empty buckets, its {@code reduce()} method must be called. So by adding the date histogram under other buckets,
* we can make sure that the reduce is properly propagated by checking that empty buckets were created.
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class ShardReduceTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class ShardReduceIT extends ESIntegTestCase {
private IndexRequestBuilder indexDoc(String date, int value) throws Exception {
return client().prepareIndex("idx", "type").setSource(jsonBuilder()
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java
index df449ea7c2a..d0457059062 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsIT.java
@@ -32,7 +32,7 @@ import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
import static org.hamcrest.Matchers.equalTo;
-public class ShardSizeTermsTests extends ShardSizeTests {
+public class ShardSizeTermsIT extends ShardSizeTestCase {
@Test
public void noShardSize_string() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTestCase.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTestCase.java
index 68da2bc384e..0dce2000f1b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTestCase.java
@@ -21,8 +21,8 @@ package org.elasticsearch.search.aggregations.bucket;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Ignore;
import java.util.ArrayList;
@@ -31,14 +31,12 @@ import java.util.List;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
import static org.hamcrest.Matchers.is;
-@Ignore
-@ClusterScope(scope = SUITE)
-public abstract class ShardSizeTests extends ElasticsearchIntegrationTest {
+public abstract class ShardSizeTestCase extends ESIntegTestCase {
@Override
protected int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.java
index de24ea8d32b..556c012c98b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms
import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class SignificantTermsBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
+public class SignificantTermsBackwardCompatibilityIT extends ESBackcompatTestCase {
static final String INDEX_NAME = "testidx";
static final String DOC_TYPE = "doc";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsIT.java
index 8e5431d6535..882f2b7318f 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsIT.java
@@ -35,7 +35,7 @@ import org.elasticsearch.search.aggregations.bucket.significant.heuristics.Mutua
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.PercentageScore;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -54,8 +54,8 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class SignificantTermsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class SignificantTermsIT extends ESIntegTestCase {
public String randomExecutionHint() {
return randomBoolean() ? null : randomFrom(ExecutionMode.values()).toString();
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
index 05fc2030aaf..941fcb36001 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
@@ -48,7 +48,7 @@ import org.elasticsearch.search.aggregations.bucket.significant.heuristics.*;
import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -65,8 +65,8 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class SignificantTermsSignificanceScoreTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class SignificantTermsSignificanceScoreIT extends ESIntegTestCase {
static final String INDEX_NAME = "testidx";
static final String DOC_TYPE = "doc";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java
index a2daafdc13f..38872f2bfa7 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsIT.java
@@ -37,7 +37,7 @@ import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.stats.extended.ExtendedStats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.metrics.valuecount.ValueCount;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -71,8 +71,8 @@ import static org.hamcrest.core.IsNull.nullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class StringTermsTests extends AbstractTermsTests {
+@ESIntegTestCase.SuiteScopeTestCase
+public class StringTermsIT extends AbstractTermsTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "s_value";
private static final String MULTI_VALUED_FIELD_NAME = "s_values";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java
index 144cb4d4f90..db6f5be9024 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.ExecutionMode;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -46,8 +46,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class TermsDocCountErrorTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class TermsDocCountErrorIT extends ESIntegTestCase {
private static final String STRING_FIELD_NAME = "s_value";
private static final String LONG_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
index 4a7a49d2e99..03aebd6058c 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms
import org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsBuilder;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class TermsShardMinDocCountTests extends ElasticsearchIntegrationTest {
+public class TermsShardMinDocCountIT extends ESIntegTestCase {
private static final String index = "someindex";
private static final String type = "testtype";
public String randomExecutionHint() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsIT.java
index f3ddb1ff284..e0d56d1e033 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsIT.java
@@ -42,7 +42,7 @@ import org.elasticsearch.search.highlight.HighlightBuilder;
import org.elasticsearch.search.highlight.HighlightField;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -78,8 +78,8 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest()
-public class TopHitsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase()
+public class TopHitsIT extends ESIntegTestCase {
private static final String TERMS_AGGS_FIELD = "terms";
private static final String SORT_FIELD = "sort";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregatorTest.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregatorTest.java
index a3da35401e0..15da498fb67 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregatorTest.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/nested/NestedAggregatorTest.java
@@ -44,7 +44,7 @@ import org.elasticsearch.search.aggregations.BucketCollector;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.aggregations.support.AggregationContext;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class NestedAggregatorTest extends ElasticsearchSingleNodeTest {
+public class NestedAggregatorTest extends ESSingleNodeTestCase {
@Test
public void testResetRootDocId() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificanceHeuristicTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificanceHeuristicTests.java
index 13491b46627..67c02bcafd8 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificanceHeuristicTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/significant/SignificanceHeuristicTests.java
@@ -42,7 +42,7 @@ import org.elasticsearch.search.aggregations.bucket.significant.heuristics.Signi
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicStreams;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator;
import org.elasticsearch.search.internal.SearchContext;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.junit.Test;
@@ -65,7 +65,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
*
*/
-public class SignificanceHeuristicTests extends ElasticsearchTestCase {
+public class SignificanceHeuristicTests extends ESTestCase {
static class SignificantTermsTestSearchContext extends TestSearchContext {
@Override
public int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java
index e8c42fb9747..d60a8706109 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java
@@ -19,7 +19,7 @@
package org.elasticsearch.search.aggregations.metrics;
import org.elasticsearch.action.index.IndexRequestBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.List;
@@ -29,8 +29,8 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public abstract class AbstractNumericTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public abstract class AbstractNumericTestCase extends ESIntegTestCase {
protected static long minValue, maxValue, minValues, maxValues;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java
index 3f7719a8e62..584da8a5b5f 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgIT.java
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class AvgTests extends AbstractNumericTests {
+public class AvgIT extends AbstractNumericTestCase {
@Override
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java
index bf708ec5c50..491e4f694c9 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java
@@ -27,7 +27,7 @@ import org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode;
import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.cardinality.Cardinality;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -40,8 +40,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class CardinalityTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class CardinalityIT extends ESIntegTestCase {
@Override
public Settings indexSettings() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java
index 3d9a0d46b55..d4ce88eea66 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ExtendedStatsIT.java
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class ExtendedStatsTests extends AbstractNumericTests {
+public class ExtendedStatsIT extends AbstractNumericTestCase {
private static double stdDev(int... vals) {
return Math.sqrt(variance(vals));
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java
index 386ae1416e5..6d2d61e707d 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java
@@ -36,7 +36,7 @@ import org.elasticsearch.search.aggregations.metrics.geobounds.GeoBounds;
import org.elasticsearch.search.aggregations.metrics.geobounds.GeoBoundsAggregator;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -59,8 +59,8 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GeoBoundsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GeoBoundsIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "geo_value";
private static final String MULTI_VALUED_FIELD_NAME = "geo_values";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java
index 2048949a862..5a25aa27252 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentileRanksIT.java
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class HDRPercentileRanksTests extends AbstractNumericTests {
+public class HDRPercentileRanksIT extends AbstractNumericTestCase {
private static double[] randomPercents(long minValue, long maxValue) {
@@ -70,7 +70,7 @@ public class HDRPercentileRanksTests extends AbstractNumericTests {
}
}
Arrays.sort(percents);
- Loggers.getLogger(HDRPercentileRanksTests.class).info("Using percentiles={}", Arrays.toString(percents));
+ Loggers.getLogger(HDRPercentileRanksIT.class).info("Using percentiles={}", Arrays.toString(percents));
return percents;
}
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java
index a131933ecb3..ebbbf1eb18c 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java
@@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class HDRPercentilesTests extends AbstractNumericTests {
+public class HDRPercentilesIT extends AbstractNumericTestCase {
private static double[] randomPercentiles() {
final int length = randomIntBetween(1, 20);
@@ -70,7 +70,7 @@ public class HDRPercentilesTests extends AbstractNumericTests {
}
}
Arrays.sort(percentiles);
- Loggers.getLogger(HDRPercentilesTests.class).info("Using percentiles={}", Arrays.toString(percentiles));
+ Loggers.getLogger(HDRPercentilesIT.class).info("Using percentiles={}", Arrays.toString(percentiles));
return percentiles;
}
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java
index 66a34b65138..04a3a90dfd3 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MaxIT.java
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class MaxTests extends AbstractNumericTests {
+public class MaxIT extends AbstractNumericTestCase {
@Override
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java
index 94f895911a6..38e4e1ef555 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/MinIT.java
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class MinTests extends AbstractNumericTests {
+public class MinIT extends AbstractNumericTestCase {
@Override
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java
index 4400f96273a..197da9dff86 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java
@@ -32,9 +32,9 @@ import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetric;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.util.ArrayList;
@@ -59,8 +59,8 @@ import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.sameInstance;
@ClusterScope(scope = Scope.SUITE)
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class ScriptedMetricTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class ScriptedMetricIT extends ESIntegTestCase {
private static long numDocs;
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java
index e5ae18774f8..d4e6ea9b527 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/StatsIT.java
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class StatsTests extends AbstractNumericTests {
+public class StatsIT extends AbstractNumericTestCase {
@Override
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java
index 6145cc5054c..6351bb68d87 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/SumIT.java
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class SumTests extends AbstractNumericTests {
+public class SumIT extends AbstractNumericTestCase {
@Override
@Test
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java
index 7ef236aece6..b1be56a973b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class TDigestPercentileRanksTests extends AbstractNumericTests {
+public class TDigestPercentileRanksIT extends AbstractNumericTestCase {
private static double[] randomPercents(long minValue, long maxValue) {
@@ -70,7 +70,7 @@ public class TDigestPercentileRanksTests extends AbstractNumericTests {
}
}
Arrays.sort(percents);
- Loggers.getLogger(TDigestPercentileRanksTests.class).info("Using percentiles={}", Arrays.toString(percents));
+ Loggers.getLogger(TDigestPercentileRanksIT.class).info("Using percentiles={}", Arrays.toString(percents));
return percents;
}
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java
index aeeb40b1382..60e385ecc1f 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesIT.java
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.sameInstance;
/**
*
*/
-public class TDigestPercentilesTests extends AbstractNumericTests {
+public class TDigestPercentilesIT extends AbstractNumericTestCase {
private static double[] randomPercentiles() {
final int length = randomIntBetween(1, 20);
@@ -69,7 +69,7 @@ public class TDigestPercentilesTests extends AbstractNumericTests {
}
}
Arrays.sort(percentiles);
- Loggers.getLogger(TDigestPercentilesTests.class).info("Using percentiles={}", Arrays.toString(percentiles));
+ Loggers.getLogger(TDigestPercentilesIT.class).info("Using percentiles={}", Arrays.toString(percentiles));
return percentiles;
}
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java
index 0840bd60708..6fd4e833b9c 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.metrics.valuecount.ValueCount;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -39,8 +39,8 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class ValueCountTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class ValueCountIT extends ESIntegTestCase {
@Override
public void setupSuiteScopeCluster() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlusTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlusTests.java
index 91ad947ddbe..684a4336600 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlusTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/cardinality/HyperLogLogPlusPlusTests.java
@@ -22,14 +22,14 @@ package org.elasticsearch.search.aggregations.metrics.cardinality;
import com.carrotsearch.hppc.BitMixer;
import com.carrotsearch.hppc.IntHashSet;
import org.elasticsearch.common.util.BigArrays;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.search.aggregations.metrics.cardinality.HyperLogLogPlusPlus.MAX_PRECISION;
import static org.elasticsearch.search.aggregations.metrics.cardinality.HyperLogLogPlusPlus.MIN_PRECISION;
import static org.hamcrest.Matchers.closeTo;
-public class HyperLogLogPlusPlusTests extends ElasticsearchTestCase {
+public class HyperLogLogPlusPlusTests extends ESTestCase {
@Test
public void encodeDecode() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java
index abf8629ae20..a18f1296ddf 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java
@@ -26,9 +26,8 @@ import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -46,8 +45,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class AvgBucketTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class AvgBucketIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java
index 8667e9c28f2..2e3117e76ff 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram;
import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -48,8 +48,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class BucketScriptTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class BucketScriptIT extends ESIntegTestCase {
private static final String FIELD_1_NAME = "field1";
private static final String FIELD_2_NAME = "field2";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java
index bd8db68959f..faf43f09968 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram;
import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -49,8 +49,8 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class BucketSelectorTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class BucketSelectorIT extends ESIntegTestCase {
private static final String FIELD_1_NAME = "field1";
private static final String FIELD_2_NAME = "field2";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumIT.java
index 2af323722f1..1d844e17af2 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -40,8 +40,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class CumulativeSumTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class CumulativeSumIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java
index 1bba222387d..569830b0a95 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java
@@ -27,10 +27,9 @@ import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.search.aggregations.pipeline.SimpleValue;
import org.elasticsearch.search.aggregations.pipeline.derivative.Derivative;
import org.elasticsearch.search.aggregations.support.AggregationPath;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
@@ -53,8 +52,8 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.hamcrest.core.IsNull.nullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class DateDerivativeTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class DateDerivativeIT extends ESIntegTestCase {
private DateTime date(int month, int day) {
return new DateTime(2012, month, day, 0, 0, DateTimeZone.UTC);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java
index a95364393aa..fbbb173ee7f 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java
@@ -19,19 +19,22 @@
package org.elasticsearch.search.aggregations.pipeline;
+import org.elasticsearch.ElasticsearchException;
+import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.action.index.IndexRequestBuilder;
+import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
+import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram;
import org.elasticsearch.search.aggregations.bucket.histogram.InternalHistogram.Bucket;
import org.elasticsearch.search.aggregations.metrics.stats.Stats;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.search.aggregations.pipeline.SimpleValue;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
import org.elasticsearch.search.aggregations.pipeline.derivative.Derivative;
import org.elasticsearch.search.aggregations.support.AggregationPath;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -39,12 +42,13 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import static org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorBuilders.derivative;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
+import static org.elasticsearch.search.aggregations.AggregationBuilders.filters;
import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram;
import static org.elasticsearch.search.aggregations.AggregationBuilders.stats;
import static org.elasticsearch.search.aggregations.AggregationBuilders.sum;
+import static org.elasticsearch.search.aggregations.pipeline.PipelineAggregatorBuilders.derivative;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
import static org.hamcrest.Matchers.closeTo;
@@ -52,8 +56,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.hamcrest.core.IsNull.nullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class DerivativeTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class DerivativeIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
@@ -228,7 +232,7 @@ public class DerivativeTests extends ElasticsearchIntegrationTest {
Derivative docCountDeriv = bucket.getAggregations().get("deriv");
if (i > 0) {
assertThat(docCountDeriv, notNullValue());
- assertThat(docCountDeriv.value(), closeTo((double) (firstDerivValueCounts[i - 1]), 0.00001));
+ assertThat(docCountDeriv.value(), closeTo((firstDerivValueCounts[i - 1]), 0.00001));
assertThat(docCountDeriv.normalizedValue(), closeTo((double) (firstDerivValueCounts[i - 1]) / 5, 0.00001));
} else {
assertThat(docCountDeriv, nullValue());
@@ -236,7 +240,7 @@ public class DerivativeTests extends ElasticsearchIntegrationTest {
Derivative docCount2ndDeriv = bucket.getAggregations().get("2nd_deriv");
if (i > 1) {
assertThat(docCount2ndDeriv, notNullValue());
- assertThat(docCount2ndDeriv.value(), closeTo((double) (secondDerivValueCounts[i - 2]), 0.00001));
+ assertThat(docCount2ndDeriv.value(), closeTo((secondDerivValueCounts[i - 2]), 0.00001));
assertThat(docCount2ndDeriv.normalizedValue(), closeTo((double) (secondDerivValueCounts[i - 2]) * 2, 0.00001));
} else {
assertThat(docCount2ndDeriv, nullValue());
@@ -596,6 +600,42 @@ public class DerivativeTests extends ElasticsearchIntegrationTest {
}
}
+ @Test
+ public void singleValueAggDerivative_invalidPath() throws Exception {
+ try {
+ client().prepareSearch("idx")
+ .addAggregation(
+ histogram("histo")
+ .field(SINGLE_VALUED_FIELD_NAME)
+ .interval(interval)
+ .subAggregation(
+ filters("filters").filter(QueryBuilders.termQuery("tag", "foo")).subAggregation(
+ sum("sum").field(SINGLE_VALUED_FIELD_NAME)))
+ .subAggregation(derivative("deriv").setBucketsPaths("filters>get>sum"))).execute().actionGet();
+ fail("Expected an Exception but didn't get one");
+ } catch (Exception e) {
+ Throwable cause = ExceptionsHelper.unwrapCause(e);
+ if (cause == null) {
+ throw e;
+ } else if (cause instanceof SearchPhaseExecutionException) {
+ ElasticsearchException[] rootCauses = ((SearchPhaseExecutionException) cause).guessRootCauses();
+ // If there is more than one root cause then something
+ // unexpected happened and we should re-throw the original
+ // exception
+ if (rootCauses.length > 1) {
+ throw e;
+ }
+ ElasticsearchException rootCauseWrapper = rootCauses[0];
+ Throwable rootCause = rootCauseWrapper.getCause();
+ if (rootCause == null || !(rootCause instanceof IllegalArgumentException)) {
+ throw e;
+ }
+ } else {
+ throw e;
+ }
+ }
+ }
+
private void checkBucketKeyAndDocCount(final String msg, final Histogram.Bucket bucket, final long expectedKey,
final long expectedDocCount) {
assertThat(msg, bucket, notNullValue());
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java
index 3f12b81325e..bacb6bda9b6 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.InternalBucketMetricValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -48,8 +48,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MaxBucketTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MaxBucketIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java
index e08138fce47..cb83f60f23a 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
import org.elasticsearch.search.aggregations.pipeline.bucketmetrics.InternalBucketMetricValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -45,8 +45,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MinBucketTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MinBucketIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java
index 6105d6da98d..c26ac8db81b 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/PipelineAggregationHelperTests.java
@@ -25,7 +25,7 @@ import org.elasticsearch.search.aggregations.metrics.avg.AvgBuilder;
import org.elasticsearch.search.aggregations.metrics.max.MaxBuilder;
import org.elasticsearch.search.aggregations.metrics.min.MinBuilder;
import org.elasticsearch.search.aggregations.metrics.sum.SumBuilder;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.ArrayList;
@@ -33,7 +33,7 @@ import java.util.ArrayList;
* Provides helper methods and classes for use in PipelineAggregation tests,
* such as creating mock histograms or computing simple metrics
*/
-public class PipelineAggregationHelperTests extends ElasticsearchTestCase {
+public class PipelineAggregationHelperTests extends ESTestCase {
/**
* Generates a mock histogram to use for testing. Each MockBucket holds a doc count, key and document values
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java
index 550625be32e..be11f90fa62 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java
@@ -26,9 +26,8 @@ import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Bucket;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.Terms.Order;
import org.elasticsearch.search.aggregations.metrics.sum.Sum;
-import org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers.GapPolicy;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -46,8 +45,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.core.IsNull.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class SumBucketTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class SumBucketIT extends ESIntegTestCase {
private static final String SINGLE_VALUED_FIELD_NAME = "l_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java
index aa72c06b0f4..d139e38a787 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java
@@ -35,7 +35,7 @@ import org.elasticsearch.search.aggregations.pipeline.PipelineAggregationHelperT
import org.elasticsearch.search.aggregations.pipeline.SimpleValue;
import org.elasticsearch.search.aggregations.pipeline.derivative.Derivative;
import org.elasticsearch.search.aggregations.pipeline.movavg.models.*;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -54,8 +54,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.hamcrest.core.IsNull.nullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class MovAvgTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class MovAvgIT extends ESIntegTestCase {
private static final String INTERVAL_FIELD = "l_value";
private static final String VALUE_FIELD = "v_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgUnitTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgUnitTests.java
index fb9e5fa09aa..65e44b92a92 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgUnitTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.search.aggregations.pipeline.moving.avg;
import com.google.common.collect.EvictingQueue;
import org.elasticsearch.common.ParseFieldMatcher;
import org.elasticsearch.search.aggregations.pipeline.movavg.models.*;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.text.ParseException;
@@ -30,7 +30,7 @@ import java.util.*;
import static org.hamcrest.Matchers.equalTo;
-public class MovAvgUnitTests extends ElasticsearchTestCase {
+public class MovAvgUnitTests extends ESTestCase {
@Test
public void testSimpleMovAvgModel() {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffTests.java
rename to core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.java
index 70aa5669dd4..af686674c75 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.aggregations.metrics.ValuesSourceMetricsAggregat
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers;
import org.elasticsearch.search.aggregations.pipeline.PipelineAggregationHelperTests;
import org.elasticsearch.search.aggregations.pipeline.SimpleValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -44,8 +44,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.core.IsNull.notNullValue;
import static org.hamcrest.core.IsNull.nullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class SerialDiffTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class SerialDiffIT extends ESIntegTestCase {
private static final String INTERVAL_FIELD = "l_value";
private static final String VALUE_FIELD = "v_value";
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/support/MissingValuesTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/support/MissingValuesTests.java
index cd72d7f069b..7a359ceb39d 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/support/MissingValuesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/support/MissingValuesTests.java
@@ -31,13 +31,13 @@ import org.elasticsearch.index.fielddata.AbstractRandomAccessOrds;
import org.elasticsearch.index.fielddata.MultiGeoPointValues;
import org.elasticsearch.index.fielddata.SortedBinaryDocValues;
import org.elasticsearch.index.fielddata.SortedNumericDoubleValues;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
-public class MissingValuesTests extends ElasticsearchTestCase {
+public class MissingValuesTests extends ESTestCase {
public void testMissingBytes() {
final int numDocs = TestUtil.nextInt(random(), 1, 100);
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/support/PathTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/support/PathTests.java
index 98ebe55e7bb..77a3e123629 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/support/PathTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/support/PathTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.search.aggregations.support;
import org.elasticsearch.search.aggregations.AggregationExecutionException;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class PathTests extends ElasticsearchTestCase {
+public class PathTests extends ESTestCase {
@Test
public void testInvalidPaths() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/support/ScriptValuesTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/support/ScriptValuesTests.java
index c9e9d4f078f..d1a97c7616c 100644
--- a/core/src/test/java/org/elasticsearch/search/aggregations/support/ScriptValuesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/aggregations/support/ScriptValuesTests.java
@@ -27,13 +27,13 @@ import org.elasticsearch.script.LeafSearchScript;
import org.elasticsearch.search.aggregations.support.values.ScriptBytesValues;
import org.elasticsearch.search.aggregations.support.values.ScriptDoubleValues;
import org.elasticsearch.search.aggregations.support.values.ScriptLongValues;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Arrays;
import java.util.Map;
-public class ScriptValuesTests extends ElasticsearchTestCase {
+public class ScriptValuesTests extends ESTestCase {
private static class FakeSearchScript implements LeafSearchScript {
diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexTests.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexTests.java
rename to core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java
index 46d1e0440c3..cea6f92f3a6 100644
--- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexTests.java
+++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java
@@ -19,13 +19,12 @@
package org.elasticsearch.search.basic;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
@@ -36,28 +35,24 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
* This test basically verifies that search with a single shard active (cause we indexed to it) and other
* shards possibly not active at all (cause they haven't allocated) will still work.
*/
-public class SearchWhileCreatingIndexTests extends ElasticsearchIntegrationTest {
+public class SearchWhileCreatingIndexIT extends ESIntegTestCase {
@Test
- @Slow
public void testIndexCausesIndexCreation() throws Exception {
searchWhileCreatingIndex(false, 1); // 1 replica in our default...
}
@Test
- @Slow
public void testNoReplicas() throws Exception {
searchWhileCreatingIndex(true, 0);
}
@Test
- @Slow
public void testOneReplica() throws Exception {
searchWhileCreatingIndex(true, 1);
}
@Test
- @Slow
public void testTwoReplicas() throws Exception {
searchWhileCreatingIndex(true, 2);
}
diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingTests.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingTests.java
rename to core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java
index 23b1702a519..86b27f25e7d 100644
--- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Priority;
import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -42,8 +42,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTi
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class SearchWhileRelocatingTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class SearchWhileRelocatingIT extends ESIntegTestCase {
@Test
@Nightly
diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsTests.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsTests.java
rename to core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java
index e720f449f87..93fbd80b52a 100644
--- a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java
@@ -37,7 +37,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.engine.MockEngineSupport;
import org.elasticsearch.test.engine.ThrowingLeafReaderWrapper;
import org.elasticsearch.test.junit.annotations.TestLogging;
@@ -49,12 +49,13 @@ import java.util.Random;
import java.util.concurrent.ExecutionException;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
-public class SearchWithRandomExceptionsTests extends ElasticsearchIntegrationTest {
+public class SearchWithRandomExceptionsIT extends ESIntegTestCase {
@Test
- @Slow // maybe due to all the logging?
@TestLogging("action.search.type:TRACE,index.shard:TRACE")
public void testRandomDirectoryIOExceptions() throws IOException, InterruptedException, ExecutionException {
String mapping = XContentFactory.jsonBuilder().
diff --git a/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresTests.java b/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresTests.java
rename to core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java
index f75301f8bac..5ea8b40958f 100644
--- a/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresTests.java
+++ b/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.client.Client;
import org.elasticsearch.client.Requests;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +42,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-public class TransportSearchFailuresTests extends ElasticsearchIntegrationTest {
+public class TransportSearchFailuresIT extends ESIntegTestCase {
@Override
protected int maximumNumberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchTests.java b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java
index dd2f43f5227..246da2508d8 100644
--- a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java
@@ -44,7 +44,7 @@ import org.elasticsearch.search.aggregations.bucket.filter.Filter;
import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -63,7 +63,7 @@ import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*;
-public class TransportTwoNodesSearchTests extends ElasticsearchIntegrationTest {
+public class TransportTwoNodesSearchIT extends ESIntegTestCase {
@Override
protected int numberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTest.java b/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTest.java
index 378e45058c6..27d81f434c2 100644
--- a/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTest.java
+++ b/core/src/test/java/org/elasticsearch/search/builder/SearchSourceBuilderTest.java
@@ -20,7 +20,7 @@ package org.elasticsearch.search.builder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -29,7 +29,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class SearchSourceBuilderTest extends ElasticsearchTestCase {
+public class SearchSourceBuilderTest extends ESTestCase {
SearchSourceBuilder builder = new SearchSourceBuilder();
diff --git a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcTests.java b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcTests.java
rename to core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java
index 02af90d0845..ff6d7409713 100644
--- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcTests.java
+++ b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.fielddata.FieldDataType;
import org.elasticsearch.index.mapper.MappedFieldType;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.startsWith;
*
*/
@ClusterScope(scope = Scope.SUITE)
-public class ChildQuerySearchBwcTests extends ChildQuerySearchTests {
+public class ChildQuerySearchBwcIT extends ChildQuerySearchIT {
@Override
public Settings indexSettings() {
diff --git a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchTests.java b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchTests.java
rename to core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
index c37565f845f..5f89af38660 100644
--- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
@@ -45,9 +45,9 @@ import org.elasticsearch.search.aggregations.bucket.global.Global;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.*;
*
*/
@ClusterScope(scope = Scope.SUITE)
-public class ChildQuerySearchTests extends ElasticsearchIntegrationTest {
+public class ChildQuerySearchIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcTest.java b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcTest.java
rename to core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java
index f1617e40c5e..feb18286838 100644
--- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcTest.java
+++ b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java
@@ -39,19 +39,19 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
-import static org.elasticsearch.search.child.ChildQuerySearchTests.hasChildQuery;
+import static org.elasticsearch.search.child.ChildQuerySearchIT.hasChildQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-public class ParentFieldLoadingBwcTest extends ElasticsearchIntegrationTest {
+public class ParentFieldLoadingBwcIT extends ESIntegTestCase {
private final Settings indexSettings = Settings.builder()
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
diff --git a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingTest.java b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingTest.java
rename to core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.java
index 7971f76f111..86596648c39 100644
--- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingTest.java
+++ b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.java
@@ -33,8 +33,7 @@ import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.junit.Test;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
@@ -43,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-public class ParentFieldLoadingTest extends ElasticsearchIntegrationTest {
+public class ParentFieldLoadingIT extends ESIntegTestCase {
private final Settings indexSettings = Settings.builder()
.put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1)
diff --git a/core/src/test/java/org/elasticsearch/search/compress/SearchSourceCompressTests.java b/core/src/test/java/org/elasticsearch/search/compress/SearchSourceCompressTests.java
index 5cd5a9acc3b..b6d335318ce 100644
--- a/core/src/test/java/org/elasticsearch/search/compress/SearchSourceCompressTests.java
+++ b/core/src/test/java/org/elasticsearch/search/compress/SearchSourceCompressTests.java
@@ -31,14 +31,14 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import java.io.IOException;
import static org.hamcrest.Matchers.equalTo;
-public class SearchSourceCompressTests extends ElasticsearchSingleNodeTest {
+public class SearchSourceCompressTests extends ESSingleNodeTestCase {
@Test
public void testSourceCompressionLZF() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java
new file mode 100644
index 00000000000..c7d10df57f6
--- /dev/null
+++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.elasticsearch.search.fetch;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.lucene.index.PostingsEnum;
+import org.apache.lucene.index.TermsEnum;
+import org.apache.lucene.util.BytesRef;
+import org.elasticsearch.action.search.SearchResponse;
+import org.elasticsearch.action.termvectors.TermVectorsRequest;
+import org.elasticsearch.action.termvectors.TermVectorsResponse;
+import org.elasticsearch.common.Priority;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.common.xcontent.XContentParser;
+import org.elasticsearch.plugins.AbstractPlugin;
+import org.elasticsearch.search.SearchHitField;
+import org.elasticsearch.search.SearchParseElement;
+import org.elasticsearch.search.internal.InternalSearchHit;
+import org.elasticsearch.search.internal.InternalSearchHitField;
+import org.elasticsearch.search.internal.SearchContext;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.elasticsearch.client.Requests.indexRequest;
+import static org.elasticsearch.common.settings.Settings.settingsBuilder;
+import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
+import static org.hamcrest.Matchers.equalTo;
+
+/**
+ *
+ */
+@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
+public class FetchSubPhasePluginIT extends ESIntegTestCase {
+
+ @Override
+ protected Settings nodeSettings(int nodeOrdinal) {
+ return settingsBuilder()
+ .put(super.nodeSettings(nodeOrdinal))
+ .put("plugin.types", FetchTermVectorsPlugin.class.getName())
+ .build();
+ }
+
+ @Test
+ public void testPlugin() throws Exception {
+ client().admin()
+ .indices()
+ .prepareCreate("test")
+ .addMapping(
+ "type1",
+ jsonBuilder()
+ .startObject().startObject("type1")
+ .startObject("properties")
+ .startObject("test")
+ .field("type", "string").field("term_vector", "yes")
+ .endObject()
+ .endObject()
+ .endObject().endObject()).execute().actionGet();
+ client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForYellowStatus().execute().actionGet();
+
+ client().index(
+ indexRequest("test").type("type1").id("1")
+ .source(jsonBuilder().startObject().field("test", "I am sam i am").endObject())).actionGet();
+
+ client().admin().indices().prepareRefresh().execute().actionGet();
+
+ String searchSource = jsonBuilder().startObject()
+ .field("term_vectors_fetch", "test")
+ .endObject().string();
+ SearchResponse response = client().prepareSearch().setSource(searchSource).get();
+ assertSearchResponse(response);
+ assertThat(((Map) response.getHits().getAt(0).field("term_vectors_fetch").getValues().get(0)).get("i"), equalTo(2));
+ assertThat(((Map) response.getHits().getAt(0).field("term_vectors_fetch").getValues().get(0)).get("am"), equalTo(2));
+ assertThat(((Map) response.getHits().getAt(0).field("term_vectors_fetch").getValues().get(0)).get("sam"), equalTo(1));
+ }
+
+ public static class FetchTermVectorsPlugin extends AbstractPlugin {
+
+ @Override
+ public String name() {
+ return "fetch-term-vectors";
+ }
+
+ @Override
+ public String description() {
+ return "fetch plugin to test if the plugin mechanism works";
+ }
+
+ public void onModule(FetchSubPhaseModule fetchSubPhaseModule) {
+ fetchSubPhaseModule.registerFetchSubPhase(TermVectorsFetchSubPhase.class);
+ }
+ }
+
+ public static class TermVectorsFetchSubPhase implements FetchSubPhase {
+
+ public static final ContextFactory CONTEXT_FACTORY = new ContextFactory() {
+
+ @Override
+ public String getName() {
+ return NAMES[0];
+ }
+
+ @Override
+ public TermVectorsFetchContext newContextInstance() {
+ return new TermVectorsFetchContext();
+ }
+ };
+
+ public TermVectorsFetchSubPhase() {
+ }
+
+ public static final String[] NAMES = {"term_vectors_fetch"};
+
+ @Override
+ public Map parseElements() {
+ return ImmutableMap.of("term_vectors_fetch", new TermVectorsFetchParseElement());
+ }
+
+ @Override
+ public boolean hitsExecutionNeeded(SearchContext context) {
+ return false;
+ }
+
+ @Override
+ public void hitsExecute(SearchContext context, InternalSearchHit[] hits) {
+ }
+
+ @Override
+ public boolean hitExecutionNeeded(SearchContext context) {
+ return context.getFetchSubPhaseContext(CONTEXT_FACTORY).hitExecutionNeeded();
+ }
+
+ @Override
+ public void hitExecute(SearchContext context, HitContext hitContext) {
+ String field = context.getFetchSubPhaseContext(CONTEXT_FACTORY).getField();
+
+ if (hitContext.hit().fieldsOrNull() == null) {
+ hitContext.hit().fields(new HashMap());
+ }
+ SearchHitField hitField = hitContext.hit().fields().get(NAMES[0]);
+ if (hitField == null) {
+ hitField = new InternalSearchHitField(NAMES[0], new ArrayList<>(1));
+ hitContext.hit().fields().put(NAMES[0], hitField);
+ }
+ TermVectorsResponse termVector = context.indexShard().termVectorsService().getTermVectors(new TermVectorsRequest(context.indexShard().indexService().index().getName(), hitContext.hit().type(), hitContext.hit().id()), context.indexShard().indexService().index().getName());
+ try {
+ Map tv = new HashMap<>();
+ TermsEnum terms = termVector.getFields().terms(field).iterator();
+ BytesRef term;
+ while ((term = terms.next()) != null) {
+ tv.put(term.utf8ToString(), terms.postings(null, null, PostingsEnum.ALL).freq());
+ }
+ hitField.values().add(tv);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public static class TermVectorsFetchParseElement extends FetchSubPhaseParseElement {
+
+ @Override
+ protected void innerParse(XContentParser parser, TermVectorsFetchContext termVectorsFetchContext, SearchContext searchContext) throws Exception {
+ XContentParser.Token token = parser.currentToken();
+ if (token == XContentParser.Token.VALUE_STRING) {
+ String fieldName = parser.text();
+ termVectorsFetchContext.setField(fieldName);
+ } else {
+ throw new IllegalStateException("Expected a VALUE_STRING but got " + token);
+ }
+ }
+
+ @Override
+ protected FetchSubPhase.ContextFactory getContextFactory() {
+ return TermVectorsFetchSubPhase.CONTEXT_FACTORY;
+ }
+ }
+
+ public static class TermVectorsFetchContext extends FetchSubPhaseContext {
+
+ private String field = null;
+
+ public TermVectorsFetchContext() {
+ }
+
+ public void setField(String field) {
+ this.field = field;
+ }
+
+ public String getField() {
+ return field;
+ }
+ }
+}
diff --git a/core/src/test/java/org/elasticsearch/search/fetch/innerhits/NestedChildrenFilterTest.java b/core/src/test/java/org/elasticsearch/search/fetch/innerhits/NestedChildrenFilterTest.java
index 87e43db68e5..977ce01b3cc 100644
--- a/core/src/test/java/org/elasticsearch/search/fetch/innerhits/NestedChildrenFilterTest.java
+++ b/core/src/test/java/org/elasticsearch/search/fetch/innerhits/NestedChildrenFilterTest.java
@@ -39,7 +39,7 @@ import org.apache.lucene.search.join.BitDocIdSetFilter;
import org.apache.lucene.store.Directory;
import org.elasticsearch.search.fetch.FetchSubPhase;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext.NestedInnerHits.NestedChildrenQuery;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class NestedChildrenFilterTest extends ElasticsearchTestCase {
+public class NestedChildrenFilterTest extends ESTestCase {
@Test
public void testNestedChildrenFilter() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsTests.java b/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/fields/SearchFieldsTests.java
rename to core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java
index 9955e67db24..15abcc9ef5b 100644
--- a/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java
@@ -41,7 +41,7 @@ import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.Test;
@@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class SearchFieldsTests extends ElasticsearchIntegrationTest {
+public class SearchFieldsIT extends ESIntegTestCase {
@Test
public void testStoredFields() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java
index 4d4c9c71f0c..0848c89ac3e 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.functionscore.DecayFunctionBuilder;
import org.elasticsearch.index.query.functionscore.gauss.GaussDecayFunctionBuilder;
import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.junit.Test;
@@ -53,7 +53,7 @@ import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
-public class DecayFunctionScoreTests extends ElasticsearchIntegrationTest {
+public class DecayFunctionScoreIT extends ESIntegTestCase {
@Test
public void testDistanceScoreGeoLinGaussExp() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java
index 3f10ce389af..3fbc9b6ba4b 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java
@@ -34,9 +34,9 @@ import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.Test;
@@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class ExplainableScriptTests extends ElasticsearchIntegrationTest {
+public class ExplainableScriptIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java
index 806f1642b49..d30c9453ec3 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptPlugin.java
@@ -36,6 +36,6 @@ public class ExplainableScriptPlugin extends AbstractPlugin {
}
public void onModule(ScriptModule module) {
- module.registerScript("native_explainable_script", ExplainableScriptTests.MyNativeScriptFactory.class);
+ module.registerScript("native_explainable_script", ExplainableScriptIT.MyNativeScriptFactory.class);
}
}
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java
index e3be92890d2..80c4968fda8 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java
@@ -20,11 +20,10 @@ package org.elasticsearch.search.functionscore;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.common.geo.GeoPoint;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.Script;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +41,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
/**
*/
-public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest {
+public class FunctionScoreBackwardCompatibilityIT extends ESBackcompatTestCase {
/**
* Simple upgrade test for function score
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java
index 2a780fd9fec..577b3eaea31 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java
@@ -22,7 +22,7 @@ package org.elasticsearch.search.functionscore;
import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.lucene.search.function.FieldValueFactorFunction;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -35,7 +35,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
/**
* Tests for the {@code field_value_factor} function in a function_score query.
*/
-public class FunctionScoreFieldValueTests extends ElasticsearchIntegrationTest {
+public class FunctionScoreFieldValueIT extends ESIntegTestCase {
@Test
public void testFieldValueFactor() throws IOException {
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java
index a4f5449bf23..7e138162aa6 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java
@@ -19,7 +19,6 @@
package org.elasticsearch.search.functionscore;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
@@ -32,7 +31,7 @@ import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder;
import org.elasticsearch.index.query.functionscore.weight.WeightBuilder;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -61,8 +60,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;
-@Slow
-public class FunctionScoreTests extends ElasticsearchIntegrationTest {
+public class FunctionScoreIT extends ESIntegTestCase {
static final String TYPE = "type";
static final String INDEX = "index";
@@ -133,7 +131,7 @@ public class FunctionScoreTests extends ElasticsearchIntegrationTest {
.field(DOUBLE_FIELD, Math.E)
.endObject();
} catch (IOException e) {
- throw new ElasticsearchException("Exception while initializing FunctionScoreTests", e);
+ throw new ElasticsearchException("Exception while initializing FunctionScoreIT", e);
}
SIMPLE_DOC = simpleDoc;
try {
@@ -154,7 +152,7 @@ public class FunctionScoreTests extends ElasticsearchIntegrationTest {
.endObject()
.endObject();
} catch (IOException e) {
- throw new ElasticsearchException("Exception while initializing FunctionScoreTests", e);
+ throw new ElasticsearchException("Exception while initializing FunctionScoreIT", e);
}
MAPPING_WITH_DOUBLE_AND_GEO_POINT_AND_TEXT_FIELD = mappingWithDoubleAndGeoPointAndTestField;
}
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java
index 05551cf4932..e78befd1791 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java
@@ -31,9 +31,9 @@ import org.elasticsearch.index.query.functionscore.DecayFunctionParser;
import org.elasticsearch.index.query.functionscore.FunctionScoreModule;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.search.SearchHits;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.Test;
@@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo;
*
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class FunctionScorePluginTests extends ElasticsearchIntegrationTest {
+public class FunctionScorePluginIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
@@ -108,7 +108,7 @@ public class FunctionScorePluginTests extends ElasticsearchIntegrationTest {
}
public void onModule(FunctionScoreModule scoreModule) {
- scoreModule.registerParser(FunctionScorePluginTests.CustomDistanceScoreParser.class);
+ scoreModule.registerParser(FunctionScorePluginIT.CustomDistanceScoreParser.class);
}
}
diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionTests.java
rename to core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java
index 0008c94e762..f00e95d6e44 100644
--- a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionTests.java
+++ b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java
@@ -24,11 +24,14 @@ import org.elasticsearch.index.query.functionscore.random.RandomScoreFunctionBui
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.CoreMatchers;
import org.junit.Ignore;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
import static com.google.common.collect.Lists.newArrayList;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -48,9 +51,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.nullValue;
-public class RandomScoreFunctionTests extends ElasticsearchIntegrationTest {
+public class RandomScoreFunctionIT extends ESIntegTestCase {
- @Slow
public void testConsistentHitsWithSameSeed() throws Exception {
createIndex("test");
ensureGreen(); // make sure we are done otherwise preference could change?
@@ -263,7 +265,6 @@ public class RandomScoreFunctionTests extends ElasticsearchIntegrationTest {
.execute().actionGet());
}
- @Ignore
public void checkDistribution() throws Exception {
int count = 10000;
diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxTests.java b/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxTests.java
rename to core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java
index b83cc33693c..cc8471519db 100644
--- a/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxTests.java
+++ b/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class GeoBoundingBoxTests extends ElasticsearchIntegrationTest {
+public class GeoBoundingBoxIT extends ESIntegTestCase {
@Test
public void simpleBoundingBoxTest() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceTests.java b/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/geo/GeoDistanceTests.java
rename to core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java
index 79ae781997f..b1e959a5821 100644
--- a/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.script.Script;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class GeoDistanceTests extends ElasticsearchIntegrationTest {
+public class GeoDistanceIT extends ESIntegTestCase {
@Test
public void simpleDistanceTests() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterTests.java b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/geo/GeoFilterTests.java
rename to core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java
index 5895b94fc01..325fcde4c01 100644
--- a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterTests.java
+++ b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java
@@ -45,9 +45,8 @@ import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.GeohashCellQuery;
-import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -60,14 +59,13 @@ import java.util.zip.GZIPInputStream;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.*;
-import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
/**
*
*/
-public class GeoFilterTests extends ElasticsearchIntegrationTest {
+public class GeoFilterIT extends ESIntegTestCase {
private static boolean intersectSupport;
private static boolean disjointSupport;
@@ -388,7 +386,6 @@ public class GeoFilterTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void bulktest() throws Exception {
byte[] bulkAction = unZipData("/org/elasticsearch/search/geo/gzippedmap.gz");
diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonTests.java b/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/geo/GeoPolygonTests.java
rename to core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java
index 014143a2be9..d8417014210 100644
--- a/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonTests.java
+++ b/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -34,8 +34,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.equalTo;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class GeoPolygonTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class GeoPolygonIT extends ESIntegTestCase {
@Override
protected void setupSuiteScopeCluster() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationTests.java b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java
index 4ddf393b4a7..59282e971df 100644
--- a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java
@@ -30,13 +30,12 @@ import org.elasticsearch.common.geo.builders.ShapeBuilder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.geo.GeoShapeFieldMapper;
import org.elasticsearch.index.query.GeoShapeQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.geo.RandomShapeGenerator;
import org.junit.Test;
@@ -56,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.nullValue;
-public class GeoShapeIntegrationTests extends ElasticsearchIntegrationTest {
+public class GeoShapeIntegrationIT extends ESIntegTestCase {
@Test
public void testNullShape() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchTests.java b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java
index 8aaff21dc8e..e254b4a0808 100644
--- a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java
@@ -22,9 +22,9 @@ import com.google.common.collect.Maps;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
*
*/
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
-public class CustomHighlighterSearchTests extends ElasticsearchIntegrationTest {
+public class CustomHighlighterSearchIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java
index 7f498e6a127..2509c32f92b 100644
--- a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java
@@ -21,7 +21,6 @@ package org.elasticsearch.search.highlight;
import com.carrotsearch.randomizedtesting.generators.RandomPicks;
import com.google.common.base.Joiner;
import com.google.common.collect.Iterables;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
@@ -29,12 +28,17 @@ import org.elasticsearch.common.settings.Settings.Builder;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.*;
+import org.elasticsearch.index.query.IdsQueryBuilder;
+import org.elasticsearch.index.query.MatchQueryBuilder;
import org.elasticsearch.index.query.MatchQueryBuilder.Type;
+import org.elasticsearch.index.query.MultiMatchQueryBuilder;
+import org.elasticsearch.index.query.QueryBuilder;
+import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.highlight.HighlightBuilder.Field;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -46,15 +50,36 @@ import java.util.Map;
import static org.elasticsearch.client.Requests.searchRequest;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.index.query.QueryBuilders.*;
+import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
+import static org.elasticsearch.index.query.QueryBuilders.boostingQuery;
+import static org.elasticsearch.index.query.QueryBuilders.commonTermsQuery;
+import static org.elasticsearch.index.query.QueryBuilders.constantScoreQuery;
+import static org.elasticsearch.index.query.QueryBuilders.filteredQuery;
+import static org.elasticsearch.index.query.QueryBuilders.fuzzyQuery;
+import static org.elasticsearch.index.query.QueryBuilders.matchPhrasePrefixQuery;
+import static org.elasticsearch.index.query.QueryBuilders.matchPhraseQuery;
+import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
+import static org.elasticsearch.index.query.QueryBuilders.missingQuery;
+import static org.elasticsearch.index.query.QueryBuilders.multiMatchQuery;
+import static org.elasticsearch.index.query.QueryBuilders.prefixQuery;
+import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery;
+import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
+import static org.elasticsearch.index.query.QueryBuilders.regexpQuery;
+import static org.elasticsearch.index.query.QueryBuilders.termQuery;
+import static org.elasticsearch.index.query.QueryBuilders.typeQuery;
+import static org.elasticsearch.index.query.QueryBuilders.wildcardQuery;
import static org.elasticsearch.search.builder.SearchSourceBuilder.highlight;
import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.elasticsearch.test.hamcrest.RegexMatcher.matches;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.anyOf;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.hasKey;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
-@Slow
-public class HighlighterSearchTests extends ElasticsearchIntegrationTest {
+public class HighlighterSearchIT extends ESIntegTestCase {
@Test
public void testHighlightingWithWildcardName() throws IOException {
@@ -988,7 +1013,6 @@ public class HighlighterSearchTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testFastVectorHighlighterManyDocs() throws Exception {
assertAcked(prepareCreate("test").addMapping("type1", type1TermVectorMapping()));
ensureGreen();
@@ -2496,7 +2520,6 @@ public class HighlighterSearchTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testPostingsHighlighterManyDocs() throws Exception {
assertAcked(prepareCreate("test").addMapping("type1", type1PostingsffsetsMapping()));
ensureGreen();
diff --git a/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchTests.java b/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java
index 9b121c7947e..589f79a876b 100644
--- a/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.search.indicesboost;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.client.Requests.indexRequest;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class SimpleIndicesBoostSearchTests extends ElasticsearchIntegrationTest {
+public class SimpleIndicesBoostSearchIT extends ESIntegTestCase {
@Test
public void testIndicesBoost() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsTests.java b/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsTests.java
rename to core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java
index 7c34b343487..1384b33bff2 100644
--- a/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.fetch.innerhits.InnerHitsBuilder;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class InnerHitsTests extends ElasticsearchIntegrationTest {
+public class InnerHitsIT extends ESIntegTestCase {
@Test
public void testSimpleNested() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java b/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java
rename to core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java
index 6b0a7a74ee6..c64e840bd4d 100644
--- a/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.*;
@@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.hasItemInArray;
/**
*
*/
-public class MatchedQueriesTests extends ElasticsearchIntegrationTest {
+public class MatchedQueriesIT extends ESIntegTestCase {
@Test
public void simpleMatchedQueryFromFilteredQuery() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/morelikethis/ItemSerializationTests.java b/core/src/test/java/org/elasticsearch/search/morelikethis/ItemSerializationTests.java
index d1fbb9cf546..91a1731feda 100644
--- a/core/src/test/java/org/elasticsearch/search/morelikethis/ItemSerializationTests.java
+++ b/core/src/test/java/org/elasticsearch/search/morelikethis/ItemSerializationTests.java
@@ -30,7 +30,7 @@ import org.elasticsearch.index.VersionType;
import org.elasticsearch.index.query.MoreLikeThisQueryBuilder;
import org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -40,7 +40,7 @@ import java.util.Random;
import static org.elasticsearch.common.io.Streams.copyToStringFromClasspath;
import static org.hamcrest.Matchers.is;
-public class ItemSerializationTests extends ElasticsearchTestCase {
+public class ItemSerializationTests extends ESTestCase {
private Item generateRandomItem(int arraySize, int stringSize) {
String index = randomAsciiOfLength(stringSize);
diff --git a/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisTests.java b/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisTests.java
rename to core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java
index 85c52a36d34..52df8932291 100644
--- a/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisTests.java
+++ b/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.MoreLikeThisQueryBuilder;
import org.elasticsearch.index.query.MoreLikeThisQueryBuilder.Item;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class MoreLikeThisTests extends ElasticsearchIntegrationTest {
+public class MoreLikeThisIT extends ESIntegTestCase {
@Test
public void testSimpleMoreLikeThis() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchTests.java b/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java
index dc3b1dfe66a..53f7e615adf 100644
--- a/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.search.msearch;
import org.elasticsearch.action.search.MultiSearchResponse;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
@@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class SimpleMultiSearchTests extends ElasticsearchIntegrationTest {
+public class SimpleMultiSearchIT extends ESIntegTestCase {
@Test
public void simpleMultiSearch() {
diff --git a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java
rename to core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java
index dc125558209..a9cd6de06ae 100644
--- a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java
+++ b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java
@@ -23,7 +23,7 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.rest.RestStatus;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -34,8 +34,8 @@ import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class SearchPreferenceTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class SearchPreferenceIT extends ESIntegTestCase {
@Test // see #2896
public void testStopOneNodePreferenceWithRedState() throws InterruptedException, IOException {
@@ -49,6 +49,7 @@ public class SearchPreferenceTests extends ElasticsearchIntegrationTest {
client().admin().cluster().prepareHealth().setWaitForStatus(ClusterHealthStatus.RED).execute().actionGet();
String[] preferences = new String[] {"_primary", "_local", "_primary_first", "_prefer_node:somenode", "_prefer_node:server2"};
for (String pref : preferences) {
+ logger.info("--> Testing out preference={}", pref);
SearchResponse searchResponse = client().prepareSearch().setSize(0).setPreference(pref).execute().actionGet();
assertThat(RestStatus.OK, equalTo(searchResponse.status()));
assertThat(pref, searchResponse.getFailedShards(), greaterThanOrEqualTo(0));
diff --git a/core/src/test/java/org/elasticsearch/search/query/ExistsMissingTests.java b/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/query/ExistsMissingTests.java
rename to core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java
index 3a2c2fcefcc..c232a7c4a13 100644
--- a/core/src/test/java/org/elasticsearch/search/query/ExistsMissingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java
@@ -30,7 +30,7 @@ import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.mapper.internal.FieldNamesFieldMapper;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@@ -43,7 +43,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse;
-public class ExistsMissingTests extends ElasticsearchIntegrationTest {
+public class ExistsMissingIT extends ESIntegTestCase {
// TODO: move this to a unit test somewhere...
public void testEmptyIndex() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryTests.java b/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryTests.java
rename to core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java
index 6baa2c67e48..793d365c388 100644
--- a/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -52,7 +52,7 @@ import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
-public class MultiMatchQueryTests extends ElasticsearchIntegrationTest {
+public class MultiMatchQueryIT extends ESIntegTestCase {
@Before
public void init() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/query/SearchQueryTests.java b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/query/SearchQueryTests.java
rename to core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java
index 21de612a0f4..4fbff911762 100644
--- a/core/src/test/java/org/elasticsearch/search/query/SearchQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java
@@ -20,7 +20,6 @@
package org.elasticsearch.search.query;
import org.apache.lucene.util.English;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder;
import org.elasticsearch.action.index.IndexRequestBuilder;
@@ -39,7 +38,7 @@ import org.elasticsearch.script.Script;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.aggregations.AggregationBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.ISODateTimeFormat;
@@ -60,8 +59,7 @@ import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
-@Slow
-public class SearchQueryTests extends ElasticsearchIntegrationTest {
+public class SearchQueryIT extends ESIntegTestCase {
@Override
protected int maximumNumberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringTests.java b/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringTests.java
rename to core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java
index 7b064e12640..2225a91fad1 100644
--- a/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringTests.java
+++ b/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.Operator;
import org.elasticsearch.index.query.SimpleQueryStringBuilder;
import org.elasticsearch.index.query.SimpleQueryStringFlag;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -44,7 +44,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Tests for the {@code simple_query_string} query
*/
-public class SimpleQueryStringTests extends ElasticsearchIntegrationTest {
+public class SimpleQueryStringIT extends ESIntegTestCase {
@Test
public void testSimpleQueryString() throws ExecutionException, InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerTests.java b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerTests.java
rename to core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java
index 8a5cc99ce0d..5b559dab666 100644
--- a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerTests.java
+++ b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java
@@ -40,7 +40,7 @@ import org.elasticsearch.script.Script;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.rescore.RescoreBuilder.QueryRescorer;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -66,7 +66,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*
*/
-public class QueryRescorerTests extends ElasticsearchIntegrationTest {
+public class QueryRescorerIT extends ESIntegTestCase {
@Test
public void testEnforceWindowSize() {
@@ -583,7 +583,7 @@ public class QueryRescorerTests extends ElasticsearchIntegrationTest {
}
}
- @Test @Slow
+ @Test
public void testScoring() throws Exception {
int numDocs = indexRandomNumbers("keyword");
diff --git a/core/src/test/java/org/elasticsearch/search/scan/ScanContextTests.java b/core/src/test/java/org/elasticsearch/search/scan/ScanContextTests.java
index 4a43b867ba7..918bdd696c8 100644
--- a/core/src/test/java/org/elasticsearch/search/scan/ScanContextTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scan/ScanContextTests.java
@@ -33,14 +33,14 @@ import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.store.Directory;
import org.elasticsearch.search.scan.ScanContext.MinDocQuery;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-public class ScanContextTests extends ElasticsearchTestCase {
+public class ScanContextTests extends ESTestCase {
public void testMinDocQueryBasics() {
MinDocQuery query1 = new MinDocQuery(42);
diff --git a/core/src/test/java/org/elasticsearch/search/scan/SearchScanTests.java b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/scan/SearchScanTests.java
rename to core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java
index 31fd0ae1e98..e98a3c4d80d 100644
--- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java
@@ -20,13 +20,12 @@
package org.elasticsearch.search.scan;
import com.google.common.collect.Sets;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Set;
@@ -35,10 +34,9 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.hamcrest.Matchers.equalTo;
-public class SearchScanTests extends ElasticsearchIntegrationTest {
+public class SearchScanIT extends ESIntegTestCase {
@Test
- @Slow
public void testNarrowingQuery() throws Exception {
createIndex("test");
ensureGreen();
diff --git a/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingTests.java b/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingTests.java
rename to core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java
index 5a11bd3a042..8c7a31140bb 100644
--- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Set;
@@ -34,7 +34,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-public class SearchScanScrollingTests extends ElasticsearchIntegrationTest {
+public class SearchScanScrollingIT extends ESIntegTestCase {
@Test
public void testRandomized() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchTests.java b/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchTests.java
rename to core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java
index 17a9c0f491c..d82e12ecc1b 100644
--- a/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java
@@ -27,10 +27,9 @@ import org.elasticsearch.index.cache.query.index.IndexQueryCache;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@@ -44,8 +43,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE)
-public class ScriptQuerySearchTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE)
+public class ScriptQuerySearchIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollTests.java b/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/scroll/DuelScrollTests.java
rename to core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java
index 0dc085dd0a6..d4e354a108b 100644
--- a/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java
@@ -29,7 +29,7 @@ import org.elasticsearch.search.SearchHits;
import org.elasticsearch.search.sort.SortBuilder;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Arrays;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-public class DuelScrollTests extends ElasticsearchIntegrationTest {
+public class DuelScrollIT extends ESIntegTestCase {
@Test
public void testDuel_queryThenFetch() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollTests.java b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/scroll/SearchScrollTests.java
rename to core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java
index fdff3509109..54f6f14e514 100644
--- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.rest.action.search.RestSearchScrollAction;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.sort.FieldSortBuilder;
import org.elasticsearch.search.sort.SortOrder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.Test;
@@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class SearchScrollTests extends ElasticsearchIntegrationTest {
+public class SearchScrollIT extends ESIntegTestCase {
@Test
public void testSimpleScrollQueryThenFetch() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesTests.java b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java
similarity index 93%
rename from core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesTests.java
rename to core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java
index 836d76b5a94..a037a6d9aeb 100644
--- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesTests.java
+++ b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java
@@ -24,7 +24,7 @@ import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -38,8 +38,8 @@ import static org.hamcrest.Matchers.*;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
-public class SearchScrollWithFailingNodesTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, numClientNodes = 0)
+public class SearchScrollWithFailingNodesIT extends ESIntegTestCase {
@Override
protected int numberOfShards() {
diff --git a/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchTests.java b/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/simple/SimpleSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java
index 57964e950b1..ebf8b756e88 100644
--- a/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.search.SearchPhaseExecutionException;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -41,7 +41,7 @@ import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.containsString;
-public class SimpleSearchTests extends ElasticsearchIntegrationTest {
+public class SimpleSearchIT extends ESIntegTestCase {
@Test
public void testSearchNullIndex() {
diff --git a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortTests.java b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/sort/SimpleSortTests.java
rename to core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java
index d6a9cc8dd5d..b2cdbfab588 100644
--- a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortTests.java
+++ b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java
@@ -43,7 +43,7 @@ import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
import org.elasticsearch.script.Script;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHitField;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -92,7 +92,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class SimpleSortTests extends ElasticsearchIntegrationTest {
+public class SimpleSortIT extends ESIntegTestCase {
@TestLogging("action.search.type:TRACE")
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elasticsearch/elasticsearch/issues/9421")
@@ -1023,7 +1023,7 @@ public class SimpleSortTests extends ElasticsearchIntegrationTest {
assertThat(searchResponse.getHits().getAt(2).id(), equalTo("3"));
}
- @Test @Slow
+ @Test
public void testSortMissingStrings() throws IOException {
assertAcked(prepareCreate("test").addMapping("type1",
XContentFactory.jsonBuilder()
diff --git a/core/src/test/java/org/elasticsearch/search/sort/SortParserTests.java b/core/src/test/java/org/elasticsearch/search/sort/SortParserTests.java
index cad9db70852..84295b7b198 100644
--- a/core/src/test/java/org/elasticsearch/search/sort/SortParserTests.java
+++ b/core/src/test/java/org/elasticsearch/search/sort/SortParserTests.java
@@ -27,13 +27,13 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.IndexService;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.TestSearchContext;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-public class SortParserTests extends ElasticsearchSingleNodeTest {
+public class SortParserTests extends ESSingleNodeTestCase {
@Test
public void testGeoDistanceSortParserManyPointsNoException() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/source/SourceFetchingTests.java b/core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/search/source/SourceFetchingTests.java
rename to core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java
index ce8b3a534b7..d6a8e860329 100644
--- a/core/src/test/java/org/elasticsearch/search/source/SourceFetchingTests.java
+++ b/core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java
@@ -20,14 +20,14 @@
package org.elasticsearch.search.source;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.IsEqual.equalTo;
-public class SourceFetchingTests extends ElasticsearchIntegrationTest {
+public class SourceFetchingIT extends ESIntegTestCase {
@Test
public void testSourceDefaultBehavior() {
diff --git a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsTests.java b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/search/stats/SearchStatsTests.java
rename to core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java
index 1d8c2e44190..3a6af88a683 100644
--- a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.search.stats.SearchStats.Stats;
import org.elasticsearch.script.Script;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashSet;
@@ -55,8 +55,8 @@ import static org.hamcrest.Matchers.nullValue;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class SearchStatsTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class SearchStatsIT extends ESIntegTestCase {
@Override
protected int numberOfReplicas() {
diff --git a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsUnitTests.java b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsUnitTests.java
index 7128991b24f..7c1b443a0db 100644
--- a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsUnitTests.java
@@ -21,13 +21,13 @@ package org.elasticsearch.search.stats;
import org.elasticsearch.index.search.stats.SearchStats;
import org.elasticsearch.index.search.stats.SearchStats.Stats;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
-public class SearchStatsUnitTests extends ElasticsearchTestCase {
+public class SearchStatsUnitTests extends ESTestCase {
@Test
// https://github.com/elasticsearch/elasticsearch/issues/7644
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchTests.java b/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java
index a87c66aa67b..672dc5e081f 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java
@@ -47,7 +47,7 @@ import org.elasticsearch.search.suggest.completion.CompletionStats;
import org.elasticsearch.search.suggest.completion.CompletionSuggestion;
import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder;
import org.elasticsearch.search.suggest.completion.CompletionSuggestionFuzzyBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -67,7 +67,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllS
import static org.hamcrest.Matchers.*;
@SuppressCodecs("*") // requires custom completion format
-public class CompletionSuggestSearchTests extends ElasticsearchIntegrationTest {
+public class CompletionSuggestSearchIT extends ESIntegTestCase {
private final String INDEX = RandomStrings.randomAsciiOfLength(getRandom(), 10).toLowerCase(Locale.ROOT);
private final String TYPE = RandomStrings.randomAsciiOfLength(getRandom(), 10).toLowerCase(Locale.ROOT);
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/CompletionTokenStreamTest.java b/core/src/test/java/org/elasticsearch/search/suggest/CompletionTokenStreamTest.java
index af36c5739f2..53e17966968 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/CompletionTokenStreamTest.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/CompletionTokenStreamTest.java
@@ -33,7 +33,7 @@ import org.apache.lucene.util.CharsRef;
import org.apache.lucene.util.IntsRef;
import org.elasticsearch.search.suggest.completion.CompletionTokenStream;
import org.elasticsearch.search.suggest.completion.CompletionTokenStream.ByteTermAttribute;
-import org.elasticsearch.test.ElasticsearchTokenStreamTestCase;
+import org.elasticsearch.test.ESTokenStreamTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -42,7 +42,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.equalTo;
-public class CompletionTokenStreamTest extends ElasticsearchTokenStreamTestCase {
+public class CompletionTokenStreamTest extends ESTokenStreamTestCase {
final XAnalyzingSuggester suggester = new XAnalyzingSuggester(new SimpleAnalyzer());
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchTests.java b/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.java
index 95bbcbba03f..83c8b362d8b 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.java
@@ -37,7 +37,7 @@ import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder;
import org.elasticsearch.search.suggest.completion.CompletionSuggestionFuzzyBuilder;
import org.elasticsearch.search.suggest.context.ContextBuilder;
import org.elasticsearch.search.suggest.context.ContextMapping;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -51,7 +51,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchGeoAssertions.assertD
import static org.hamcrest.Matchers.containsString;
@SuppressCodecs("*") // requires custom completion format
-public class ContextSuggestSearchTests extends ElasticsearchIntegrationTest {
+public class ContextSuggestSearchIT extends ESIntegTestCase {
private static final String INDEX = "test";
private static final String TYPE = "testType";
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchTests.java b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.java
index c6f48e7600b..1d7ad858321 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.java
@@ -23,15 +23,15 @@ import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.List;
import java.util.Locale;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
+import static org.elasticsearch.test.ESIntegTestCase.*;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.is;
*
*/
@ClusterScope(scope= Scope.SUITE, numDataNodes =1)
-public class CustomSuggesterSearchTests extends ElasticsearchIntegrationTest {
+public class CustomSuggesterSearchIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchTests.java b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchTests.java
rename to core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java
index b5c114ab380..d00658709bb 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchTests.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java
@@ -34,7 +34,7 @@ import org.elasticsearch.search.suggest.SuggestBuilder.SuggestionBuilder;
import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder;
import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder.DirectCandidateGenerator;
import org.elasticsearch.search.suggest.term.TermSuggestionBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.junit.Test;
@@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.*;
* possible these tests should declare for the first request, make the request, modify the configuration for the next request, make that
* request, modify again, request again, etc. This makes it very obvious what changes between requests.
*/
-public class SuggestSearchTests extends ElasticsearchIntegrationTest {
+public class SuggestSearchIT extends ESIntegTestCase {
@Test // see #3196
public void testSuggestAcrossMultipleIndices() throws IOException {
@@ -470,7 +470,6 @@ public class SuggestSearchTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
@Nightly
public void testMarvelHerosPhraseSuggest() throws IOException {
CreateIndexRequestBuilder builder = prepareCreate("test").setSettings(settingsBuilder()
@@ -508,7 +507,7 @@ public class SuggestSearchTests extends ElasticsearchIntegrationTest {
assertAcked(builder.addMapping("type1", mapping));
ensureGreen();
- for (String line: Resources.readLines(SuggestSearchTests.class.getResource("/config/names.txt"), Charsets.UTF_8)) {
+ for (String line: Resources.readLines(SuggestSearchIT.class.getResource("/config/names.txt"), Charsets.UTF_8)) {
index("test", "type1", line, "body", line, "body_reverse", line, "bigram", line);
}
refresh();
@@ -700,7 +699,7 @@ public class SuggestSearchTests extends ElasticsearchIntegrationTest {
assertAcked(builder.addMapping("type1", mapping));
ensureGreen();
- for (String line: Resources.readLines(SuggestSearchTests.class.getResource("/config/names.txt"), Charsets.UTF_8)) {
+ for (String line: Resources.readLines(SuggestSearchIT.class.getResource("/config/names.txt"), Charsets.UTF_8)) {
index("test", "type1", line, "body", line, "bigram", line, "ngram", line);
}
refresh();
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/completion/CompletionPostingsFormatTest.java b/core/src/test/java/org/elasticsearch/search/suggest/completion/CompletionPostingsFormatTest.java
index 1cd9745c49d..1b29173973b 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/completion/CompletionPostingsFormatTest.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/completion/CompletionPostingsFormatTest.java
@@ -59,7 +59,7 @@ import org.elasticsearch.index.mapper.core.CompletionFieldMapper;
import org.elasticsearch.search.suggest.SuggestUtils;
import org.elasticsearch.search.suggest.completion.Completion090PostingsFormat.LookupFactory;
import org.elasticsearch.search.suggest.context.ContextMapping;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -73,7 +73,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
-public class CompletionPostingsFormatTest extends ElasticsearchTestCase {
+public class CompletionPostingsFormatTest extends ESTestCase {
Settings indexSettings = Settings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT.id).build();
static final CompletionFieldMapper.CompletionFieldType FIELD_TYPE = CompletionFieldMapper.Defaults.FIELD_TYPE.clone();
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/context/GeoLocationContextMappingTest.java b/core/src/test/java/org/elasticsearch/search/suggest/context/GeoLocationContextMappingTest.java
index 1f6bd5eea7c..f1c17618556 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/context/GeoLocationContextMappingTest.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/context/GeoLocationContextMappingTest.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.search.suggest.context.ContextMapping.ContextConfig;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -36,7 +36,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
/**
*
*/
-public class GeoLocationContextMappingTest extends ElasticsearchTestCase {
+public class GeoLocationContextMappingTest extends ESTestCase {
@Test
public void testThatParsingGeoPointsWorksWithCoercion() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/search/suggest/phrase/NoisyChannelSpellCheckerTests.java b/core/src/test/java/org/elasticsearch/search/suggest/phrase/NoisyChannelSpellCheckerTests.java
index c4d4b48e28c..574e1635ab6 100644
--- a/core/src/test/java/org/elasticsearch/search/suggest/phrase/NoisyChannelSpellCheckerTests.java
+++ b/core/src/test/java/org/elasticsearch/search/suggest/phrase/NoisyChannelSpellCheckerTests.java
@@ -41,9 +41,8 @@ import org.apache.lucene.search.spell.DirectSpellChecker;
import org.apache.lucene.search.spell.SuggestMode;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.util.BytesRef;
-import org.apache.lucene.util.Version;
import org.elasticsearch.search.suggest.phrase.NoisyChannelSpellChecker.Result;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.*;
@@ -53,7 +52,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-public class NoisyChannelSpellCheckerTests extends ElasticsearchTestCase{
+public class NoisyChannelSpellCheckerTests extends ESTestCase {
private final BytesRef space = new BytesRef(" ");
private final BytesRef preTag = new BytesRef("");
private final BytesRef postTag = new BytesRef(" ");
diff --git a/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutTests.java b/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java
similarity index 89%
rename from core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutTests.java
rename to core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java
index 3025752f468..f0cbfd65c02 100644
--- a/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutTests.java
+++ b/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java
@@ -22,7 +22,7 @@ package org.elasticsearch.search.timeout;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.Script;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.filteredQuery;
@@ -32,8 +32,8 @@ import static org.hamcrest.Matchers.equalTo;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE)
-public class SearchTimeoutTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope= ESIntegTestCase.Scope.SUITE)
+public class SearchTimeoutIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/similarity/SimilarityTests.java b/core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/similarity/SimilarityTests.java
rename to core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java
index 8dd58e2307a..229f2a8ed61 100644
--- a/core/src/test/java/org/elasticsearch/similarity/SimilarityTests.java
+++ b/core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.similarity;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
@@ -29,7 +29,7 @@ import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
-public class SimilarityTests extends ElasticsearchIntegrationTest {
+public class SimilarityIT extends ESIntegTestCase {
@Test
diff --git a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java b/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java
rename to core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java
index fad99f0f7bd..7aedb958630 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java
@@ -19,20 +19,22 @@
package org.elasticsearch.snapshots;
import com.google.common.base.Predicate;
-
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksResponse;
-import org.elasticsearch.cluster.*;
-import org.elasticsearch.cluster.metadata.SnapshotId;
+import org.elasticsearch.cluster.ClusterChangedEvent;
+import org.elasticsearch.cluster.ClusterService;
+import org.elasticsearch.cluster.ClusterState;
+import org.elasticsearch.cluster.ClusterStateListener;
+import org.elasticsearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.SnapshotsInProgress;
+import org.elasticsearch.cluster.metadata.SnapshotId;
import org.elasticsearch.cluster.service.PendingClusterTask;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.repositories.RepositoriesService;
import org.elasticsearch.snapshots.mockstore.MockRepository;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.junit.Ignore;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.IOException;
import java.nio.file.FileVisitResult;
@@ -48,10 +50,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-/**
- */
-@Ignore
-public abstract class AbstractSnapshotTests extends ElasticsearchIntegrationTest {
+public abstract class AbstractSnapshotIntegTestCase extends ESIntegTestCase {
public static long getFailureCount(String repository) {
long failureCount = 0;
diff --git a/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.java b/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.java
rename to core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatIT.java
index 4ddeb2bd782..a805aa34bd3 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatIT.java
@@ -49,7 +49,7 @@ import java.util.concurrent.*;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.greaterThan;
-public class BlobStoreFormatTests extends AbstractSnapshotTests {
+public class BlobStoreFormatIT extends AbstractSnapshotIntegTestCase {
private static final ParseFieldMatcher parseFieldMatcher = new ParseFieldMatcher(Settings.EMPTY);
diff --git a/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java b/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java
rename to core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
index b5550b04e05..6f4e4e217d8 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
@@ -45,7 +45,6 @@ import org.elasticsearch.cluster.metadata.MetaData.Custom;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.metadata.MetaDataIndexStateService;
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
-import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.io.stream.StreamInput;
@@ -84,8 +83,8 @@ import java.util.concurrent.atomic.AtomicReference;
import static com.google.common.collect.Lists.newArrayList;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThrows;
@@ -94,7 +93,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0)
-public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
+public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase {
@Test
public void restorePersistentSettingsTest() throws Exception {
@@ -692,7 +691,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
}
@Test
- @Ignore
+ @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/12621")
public void chaosSnapshotTest() throws Exception {
final List indices = new CopyOnWriteArrayList<>();
Settings settings = settingsBuilder().put("action.write_consistency", "one").build();
diff --git a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java
rename to core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java
index a6432e5cda5..1ea8c68f778 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.repositories.RepositoryException;
import org.elasticsearch.repositories.RepositoryVerificationException;
import org.elasticsearch.snapshots.mockstore.MockRepositoryModule;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.nio.file.Path;
@@ -47,8 +47,8 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2)
-public class RepositoriesTests extends AbstractSnapshotTests {
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 2)
+public class RepositoriesIT extends AbstractSnapshotIntegTestCase {
@Test
public void testRepositoryCreation() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java
rename to core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java
index bf2e3aa98f7..85fd0c7c2f5 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java
@@ -23,7 +23,6 @@ import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.Version;
import org.elasticsearch.action.ListenableActionFuture;
@@ -32,7 +31,11 @@ import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRes
import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;
-import org.elasticsearch.action.admin.cluster.snapshots.status.*;
+import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotIndexShardStage;
+import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotIndexShardStatus;
+import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotIndexStatus;
+import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotStatus;
+import org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse;
@@ -40,11 +43,17 @@ import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResp
import org.elasticsearch.action.count.CountResponse;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.client.Client;
-import org.elasticsearch.cluster.*;
-import org.elasticsearch.cluster.metadata.*;
+import org.elasticsearch.cluster.ClusterService;
+import org.elasticsearch.cluster.ClusterState;
+import org.elasticsearch.cluster.ProcessedClusterStateUpdateTask;
+import org.elasticsearch.cluster.SnapshotsInProgress;
import org.elasticsearch.cluster.SnapshotsInProgress.Entry;
import org.elasticsearch.cluster.SnapshotsInProgress.ShardSnapshotStatus;
import org.elasticsearch.cluster.SnapshotsInProgress.State;
+import org.elasticsearch.cluster.metadata.IndexMetaData;
+import org.elasticsearch.cluster.metadata.MappingMetaData;
+import org.elasticsearch.cluster.metadata.MetaDataIndexStateService;
+import org.elasticsearch.cluster.metadata.SnapshotId;
import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.collect.ImmutableOpenMap;
@@ -76,11 +85,26 @@ import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.elasticsearch.index.shard.IndexShard.INDEX_REFRESH_INTERVAL;
-import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
-import static org.hamcrest.Matchers.*;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAliasesExist;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAliasesMissing;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateExists;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertIndexTemplateMissing;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
+import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThrows;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.lessThan;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.Matchers.startsWith;
-@Slow
-public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
+public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase {
@Test
public void basicWorkFlowTest() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityTest.java b/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityTest.java
rename to core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java
index d545e1076d0..21401d091f0 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityTest.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java
@@ -29,11 +29,10 @@ import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.metadata.IndexMetaData;
-import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
import org.elasticsearch.common.io.FileSystemUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
-import org.elasticsearch.test.ElasticsearchBackwardsCompatIntegrationTest;
+import org.elasticsearch.test.ESBackcompatTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -50,7 +49,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
-public class SnapshotBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest {
+public class SnapshotBackwardsCompatibilityIT extends ESBackcompatTestCase {
@Test
public void testSnapshotAndRestore() throws ExecutionException, InterruptedException, IOException {
diff --git a/core/src/test/java/org/elasticsearch/snapshots/SnapshotUtilsTests.java b/core/src/test/java/org/elasticsearch/snapshots/SnapshotUtilsTests.java
index 71957c5cc26..76f057a60ff 100644
--- a/core/src/test/java/org/elasticsearch/snapshots/SnapshotUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/snapshots/SnapshotUtilsTests.java
@@ -20,7 +20,7 @@ package org.elasticsearch.snapshots;
import com.google.common.collect.ImmutableList;
import org.elasticsearch.action.support.IndicesOptions;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.List;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.containsInAnyOrder;
/**
*/
-public class SnapshotUtilsTests extends ElasticsearchTestCase {
+public class SnapshotUtilsTests extends ESTestCase {
@Test
public void testIndexNameFiltering() {
assertIndexNameFiltering(new String[]{"foo", "bar", "baz"}, new String[]{}, new String[]{"foo", "bar", "baz"});
diff --git a/core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationTests.java b/core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationBenchmark.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationTests.java
rename to core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationBenchmark.java
index 75109210ed3..a0f883bd768 100644
--- a/core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationTests.java
+++ b/core/src/test/java/org/elasticsearch/stresstest/search1/ConcurrentSearchSerializationBenchmark.java
@@ -38,8 +38,7 @@ import java.util.concurrent.ThreadLocalRandom;
*
* See: https://github.com/elasticsearch/elasticsearch/issues/1686.
*/
-@Ignore("Stress Test")
-public class ConcurrentSearchSerializationTests {
+public class ConcurrentSearchSerializationBenchmark {
public static void main(String[] args) throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressTest.java b/core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressBenchmark.java
similarity index 91%
rename from core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressTest.java
rename to core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressBenchmark.java
index 0963717e991..001c234ec69 100644
--- a/core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressTest.java
+++ b/core/src/test/java/org/elasticsearch/stresstest/search1/Search1StressBenchmark.java
@@ -41,11 +41,7 @@ import java.util.concurrent.atomic.AtomicLong;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
-/**
- *
- */
-@Ignore("Stress Test")
-public class Search1StressTest {
+public class Search1StressBenchmark {
private final ESLogger logger = Loggers.getLogger(getClass());
@@ -73,67 +69,67 @@ public class Search1StressTest {
private Node client;
- public Search1StressTest setNumberOfNodes(int numberOfNodes) {
+ public Search1StressBenchmark setNumberOfNodes(int numberOfNodes) {
this.numberOfNodes = numberOfNodes;
return this;
}
- public Search1StressTest setPreIndexDocs(SizeValue preIndexDocs) {
+ public Search1StressBenchmark setPreIndexDocs(SizeValue preIndexDocs) {
this.preIndexDocs = preIndexDocs;
return this;
}
- public Search1StressTest setIndexers(int indexers) {
+ public Search1StressBenchmark setIndexers(int indexers) {
this.indexers = indexers;
return this;
}
- public Search1StressTest setIndexerThrottle(TimeValue indexerThrottle) {
+ public Search1StressBenchmark setIndexerThrottle(TimeValue indexerThrottle) {
this.indexerThrottle = indexerThrottle;
return this;
}
- public Search1StressTest setSearchers(int searchers) {
+ public Search1StressBenchmark setSearchers(int searchers) {
this.searchers = searchers;
return this;
}
- public Search1StressTest setSearcherThrottle(TimeValue searcherThrottle) {
+ public Search1StressBenchmark setSearcherThrottle(TimeValue searcherThrottle) {
this.searcherThrottle = searcherThrottle;
return this;
}
- public Search1StressTest setNumberOfIndices(int numberOfIndices) {
+ public Search1StressBenchmark setNumberOfIndices(int numberOfIndices) {
this.numberOfIndices = numberOfIndices;
return this;
}
- public Search1StressTest setNumberOfTypes(int numberOfTypes) {
+ public Search1StressBenchmark setNumberOfTypes(int numberOfTypes) {
this.numberOfTypes = numberOfTypes;
return this;
}
- public Search1StressTest setNumberOfValues(int numberOfValues) {
+ public Search1StressBenchmark setNumberOfValues(int numberOfValues) {
this.numberOfValues = numberOfValues;
return this;
}
- public Search1StressTest setNumberOfHits(int numberOfHits) {
+ public Search1StressBenchmark setNumberOfHits(int numberOfHits) {
this.numberOfHits = numberOfHits;
return this;
}
- public Search1StressTest setFlusherThrottle(TimeValue flusherThrottle) {
+ public Search1StressBenchmark setFlusherThrottle(TimeValue flusherThrottle) {
this.flusherThrottle = flusherThrottle;
return this;
}
- public Search1StressTest setSettings(Settings settings) {
+ public Search1StressBenchmark setSettings(Settings settings) {
this.settings = settings;
return this;
}
- public Search1StressTest setPeriod(TimeValue period) {
+ public Search1StressBenchmark setPeriod(TimeValue period) {
this.period = period;
return this;
}
@@ -359,7 +355,7 @@ public class Search1StressTest {
}
public static void main(String[] args) throws Exception {
- Search1StressTest test = new Search1StressTest()
+ Search1StressBenchmark test = new Search1StressBenchmark()
.setPeriod(TimeValue.timeValueMinutes(10))
.setNumberOfNodes(2)
.setPreIndexDocs(SizeValue.parseSizeValue("100"))
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchAllocationTestCase.java b/core/src/test/java/org/elasticsearch/test/ESAllocationTestCase.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchAllocationTestCase.java
rename to core/src/test/java/org/elasticsearch/test/ESAllocationTestCase.java
index 7692d4d932f..533dfd80eaa 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchAllocationTestCase.java
+++ b/core/src/test/java/org/elasticsearch/test/ESAllocationTestCase.java
@@ -49,7 +49,7 @@ import static org.hamcrest.CoreMatchers.is;
/**
*/
-public abstract class ElasticsearchAllocationTestCase extends ElasticsearchTestCase {
+public abstract class ESAllocationTestCase extends ESTestCase {
public static AllocationService createAllocationService() {
return createAllocationService(Settings.Builder.EMPTY_SETTINGS);
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchBackwardsCompatIntegrationTest.java b/core/src/test/java/org/elasticsearch/test/ESBackcompatTestCase.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchBackwardsCompatIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/test/ESBackcompatTestCase.java
index 082d756d9ad..1468efed8bc 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchBackwardsCompatIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/test/ESBackcompatTestCase.java
@@ -86,10 +86,9 @@ import static org.hamcrest.Matchers.is;
*
*/
// the transportClientRatio is tricky here since we don't fully control the cluster nodes
-@ElasticsearchBackwardsCompatIntegrationTest.Backwards
-@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 0, maxNumDataNodes = 2, scope = ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
-@Ignore
-public abstract class ElasticsearchBackwardsCompatIntegrationTest extends ElasticsearchIntegrationTest {
+@ESBackcompatTestCase.Backwards
+@ESIntegTestCase.ClusterScope(minNumDataNodes = 0, maxNumDataNodes = 2, scope = ESIntegTestCase.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0)
+public abstract class ESBackcompatTestCase extends ESIntegTestCase {
/**
* Key used to set the path for the elasticsearch executable used to run backwards compatibility tests from
@@ -150,7 +149,7 @@ public abstract class ElasticsearchBackwardsCompatIntegrationTest extends Elasti
}
private Version compatibilityVersion(Class> clazz) {
- if (clazz == Object.class || clazz == ElasticsearchIntegrationTest.class) {
+ if (clazz == Object.class || clazz == ESIntegTestCase.class) {
return globalCompatibilityVersion();
}
CompatibilityVersion annotation = clazz.getAnnotation(CompatibilityVersion.class);
@@ -270,7 +269,7 @@ public abstract class ElasticsearchBackwardsCompatIntegrationTest extends Elasti
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
- @TestGroup(enabled = false, sysProperty = ElasticsearchBackwardsCompatIntegrationTest.TESTS_BACKWARDS_COMPATIBILITY)
+ @TestGroup(enabled = false, sysProperty = ESBackcompatTestCase.TESTS_BACKWARDS_COMPATIBILITY)
public @interface Backwards {
}
@@ -280,7 +279,6 @@ public abstract class ElasticsearchBackwardsCompatIntegrationTest extends Elasti
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
- @Ignore
public @interface CompatibilityVersion {
int version();
}
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java b/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java
rename to core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java
index 790c088cc02..b83d7a24a9d 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java
+++ b/core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java
@@ -146,7 +146,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
/**
- * {@link ElasticsearchIntegrationTest} is an abstract base class to run integration
+ * {@link ESIntegTestCase} is an abstract base class to run integration
* tests against a JVM private Elasticsearch Cluster. The test class supports 2 different
* cluster scopes.
*
@@ -161,7 +161,7 @@ import static org.hamcrest.Matchers.*;
* should be used, here is an example:
*
*
- * @ClusterScope(scope=Scope.TEST) public class SomeIntegrationTest extends ElasticsearchIntegrationTest {
+ * @ClusterScope(scope=Scope.TEST) public class SomeIntegrationTest extends ESIntegTestCase {
* @Test public void testMethod() {}
* }
*
@@ -174,12 +174,12 @@ import static org.hamcrest.Matchers.*;
*
*
* @ClusterScope(scope=Scope.SUITE, numDataNodes=3)
- * public class SomeIntegrationTest extends ElasticsearchIntegrationTest {
+ * public class SomeIntegrationTest extends ESIntegTestCase {
* @Test public void testMethod() {}
* }
*
*
- * Note, the {@link ElasticsearchIntegrationTest} uses randomized settings on a cluster and index level. For instance
+ * Note, the {@link ESIntegTestCase} uses randomized settings on a cluster and index level. For instance
* each test might use different directory implementation for each test or will return a random client to one of the
* nodes in the cluster for each call to {@link #client()}. Test failures might only be reproducible if the correct
* system properties are passed to the test execution environment.
@@ -194,25 +194,8 @@ import static org.hamcrest.Matchers.*;
*
*
*/
-@Ignore
-@ElasticsearchIntegrationTest.Integration
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet
-public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase {
-
- /**
- * Property that allows to control whether the Integration tests are run (default) or not
- */
- public static final String SYSPROP_INTEGRATION = "tests.integration";
-
- /**
- * Annotation for integration tests
- */
- @Inherited
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.TYPE)
- @TestGroup(enabled = true, sysProperty = ElasticsearchIntegrationTest.SYSPROP_INTEGRATION)
- public @interface Integration {
- }
+public abstract class ESIntegTestCase extends ESTestCase {
/**
* Property that controls whether ThirdParty Integration tests are run (not the default).
@@ -230,7 +213,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
- @TestGroup(enabled = false, sysProperty = ElasticsearchIntegrationTest.SYSPROP_THIRDPARTY)
+ @TestGroup(enabled = false, sysProperty = ESIntegTestCase.SYSPROP_THIRDPARTY)
public @interface ThirdParty {
}
@@ -295,7 +278,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
private static final Map, TestCluster> clusters = new IdentityHashMap<>();
- private static ElasticsearchIntegrationTest INSTANCE = null; // see @SuiteScope
+ private static ESIntegTestCase INSTANCE = null; // see @SuiteScope
private static Long SUITE_SEED = null;
@BeforeClass
@@ -325,7 +308,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
printTestMessage("before");
} catch (OutOfMemoryError e) {
if (e.getMessage().contains("unable to create new native thread")) {
- ElasticsearchTestCase.printStackDump(logger);
+ ESTestCase.printStackDump(logger);
}
throw e;
}
@@ -1462,7 +1445,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
/**
* The scope of a test cluster used together with
- * {@link org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope} annotations on {@link org.elasticsearch.test.ElasticsearchIntegrationTest} subclasses.
+ * {@link ESIntegTestCase.ClusterScope} annotations on {@link ESIntegTestCase} subclasses.
*/
public enum Scope {
/**
@@ -1476,15 +1459,15 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
}
/**
- * Defines a cluster scope for a {@link org.elasticsearch.test.ElasticsearchIntegrationTest} subclass.
- * By default if no {@link ClusterScope} annotation is present {@link org.elasticsearch.test.ElasticsearchIntegrationTest.Scope#SUITE} is used
+ * Defines a cluster scope for a {@link ESIntegTestCase} subclass.
+ * By default if no {@link ClusterScope} annotation is present {@link ESIntegTestCase.Scope#SUITE} is used
* together with randomly chosen settings like number of nodes etc.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface ClusterScope {
/**
- * Returns the scope. {@link org.elasticsearch.test.ElasticsearchIntegrationTest.Scope#SUITE} is default.
+ * Returns the scope. {@link ESIntegTestCase.Scope#SUITE} is default.
*/
Scope scope() default Scope.SUITE;
@@ -1579,7 +1562,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
}
private static ClusterScope getAnnotation(Class> clazz) {
- if (clazz == Object.class || clazz == ElasticsearchIntegrationTest.class) {
+ if (clazz == Object.class || clazz == ESIntegTestCase.class) {
return null;
}
ClusterScope annotation = clazz.getAnnotation(ClusterScope.class);
@@ -1927,7 +1910,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
assert INSTANCE == null;
if (isSuiteScopedTest(targetClass)) {
// note we need to do this this way to make sure this is reproducible
- INSTANCE = (ElasticsearchIntegrationTest) targetClass.newInstance();
+ INSTANCE = (ESIntegTestCase) targetClass.newInstance();
boolean success = false;
try {
INSTANCE.beforeInternal();
@@ -2005,27 +1988,26 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
}
/**
- * This method is executed iff the test is annotated with {@link SuiteScopeTest}
+ * This method is executed iff the test is annotated with {@link SuiteScopeTestCase}
* before the first test of this class is executed.
*
- * @see SuiteScopeTest
+ * @see SuiteScopeTestCase
*/
protected void setupSuiteScopeCluster() throws Exception {
}
private static boolean isSuiteScopedTest(Class> clazz) {
- return clazz.getAnnotation(SuiteScopeTest.class) != null;
+ return clazz.getAnnotation(SuiteScopeTestCase.class) != null;
}
/**
- * If a test is annotated with {@link org.elasticsearch.test.ElasticsearchIntegrationTest.SuiteScopeTest}
+ * If a test is annotated with {@link SuiteScopeTestCase}
* the checks and modifications that are applied to the used test cluster are only done after all tests
* of this class are executed. This also has the side-effect of a suite level setup method {@link #setupSuiteScopeCluster()}
* that is executed in a separate test instance. Variables that need to be accessible across test instances must be static.
*/
@Retention(RetentionPolicy.RUNTIME)
@Inherited
- @Ignore
- public @interface SuiteScopeTest {
+ public @interface SuiteScopeTestCase {
}
}
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchSingleNodeTest.java b/core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchSingleNodeTest.java
rename to core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java
index 28f99c45e5c..7f83f41cbff 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchSingleNodeTest.java
+++ b/core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java
@@ -56,8 +56,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
* A test that keep a singleton node started for all tests that can be used to get
* references to Guice injectors in unit tests.
*/
-@Ignore
-public abstract class ElasticsearchSingleNodeTest extends ElasticsearchTestCase {
+public abstract class ESSingleNodeTestCase extends ESTestCase {
private static Node NODE = null;
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java b/core/src/test/java/org/elasticsearch/test/ESTestCase.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java
rename to core/src/test/java/org/elasticsearch/test/ESTestCase.java
index a25ca6f26cb..462a98b03e4 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java
+++ b/core/src/test/java/org/elasticsearch/test/ESTestCase.java
@@ -98,7 +98,7 @@ import static com.google.common.collect.Lists.newArrayList;
"LuceneVarGapFixedInterval", "LuceneVarGapDocFreqInterval", "Lucene50"
})
@LuceneTestCase.SuppressReproduceLine
-public abstract class ElasticsearchTestCase extends LuceneTestCase {
+public abstract class ESTestCase extends LuceneTestCase {
static {
BootstrapForTesting.ensureInitialized();
@@ -114,13 +114,13 @@ public abstract class ElasticsearchTestCase extends LuceneTestCase {
public RuleChain failureAndSuccessEvents = RuleChain.outerRule(new TestRuleAdapter() {
@Override
protected void afterIfSuccessful() throws Throwable {
- ElasticsearchTestCase.this.afterIfSuccessful();
+ ESTestCase.this.afterIfSuccessful();
}
@Override
protected void afterAlways(List errors) throws Throwable {
if (errors != null && errors.isEmpty() == false) {
- ElasticsearchTestCase.this.afterIfFailed(errors);
+ ESTestCase.this.afterIfFailed(errors);
}
super.afterAlways(errors);
}
diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchTokenStreamTestCase.java b/core/src/test/java/org/elasticsearch/test/ESTokenStreamTestCase.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/test/ElasticsearchTokenStreamTestCase.java
rename to core/src/test/java/org/elasticsearch/test/ESTokenStreamTestCase.java
index 68d44ec4ac6..685b158862f 100644
--- a/core/src/test/java/org/elasticsearch/test/ElasticsearchTokenStreamTestCase.java
+++ b/core/src/test/java/org/elasticsearch/test/ESTokenStreamTestCase.java
@@ -46,7 +46,7 @@ import org.elasticsearch.test.junit.listeners.ReproduceInfoPrinter;
* Basic test case for token streams. the assertion methods in this class will
* run basic checks to enforce correct behavior of the token streams.
*/
-public abstract class ElasticsearchTokenStreamTestCase extends BaseTokenStreamTestCase {
+public abstract class ESTokenStreamTestCase extends BaseTokenStreamTestCase {
static {
BootstrapForTesting.ensureInitialized();
diff --git a/core/src/test/java/org/elasticsearch/test/ExternalNode.java b/core/src/test/java/org/elasticsearch/test/ExternalNode.java
index 4116632fd27..0d969db234b 100644
--- a/core/src/test/java/org/elasticsearch/test/ExternalNode.java
+++ b/core/src/test/java/org/elasticsearch/test/ExternalNode.java
@@ -155,7 +155,7 @@ final class ExternalNode implements Closeable {
}
static boolean waitForNode(final Client client, final String name) throws InterruptedException {
- return ElasticsearchTestCase.awaitBusy(new Predicate() {
+ return ESTestCase.awaitBusy(new Predicate() {
@Override
public boolean apply(java.lang.Object input) {
final NodesInfoResponse nodeInfos = client.admin().cluster().prepareNodesInfo().get();
diff --git a/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java b/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java
index 938a080f43a..ee3071cce66 100644
--- a/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java
+++ b/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java
@@ -94,7 +94,6 @@ import org.elasticsearch.indices.store.IndicesStore;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
import org.elasticsearch.node.service.NodeService;
-import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.search.SearchService;
import org.elasticsearch.search.SearchServiceModule;
@@ -127,7 +126,7 @@ import static junit.framework.Assert.fail;
import static org.apache.lucene.util.LuceneTestCase.*;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.node.NodeBuilder.nodeBuilder;
-import static org.elasticsearch.test.ElasticsearchTestCase.assertBusy;
+import static org.elasticsearch.test.ESTestCase.assertBusy;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertFalse;
@@ -141,7 +140,7 @@ import static org.junit.Assert.assertThat;
* The Cluster is bound to a test lifecycle where tests must call {@link #beforeTest(java.util.Random, double)} and
* {@link #afterTest()} to initialize and reset the cluster in order to be more reproducible. The term "more" relates
* to the async nature of Elasticsearch in combination with randomized testing. Once Threads and asynchronous calls
- * are involved reproducibility is very limited. This class should only be used through {@link ElasticsearchIntegrationTest}.
+ * are involved reproducibility is very limited. This class should only be used through {@link ESIntegTestCase}.
*
*/
public final class InternalTestCluster extends TestCluster {
@@ -155,7 +154,7 @@ public final class InternalTestCluster extends TestCluster {
* system without asserting modules that to make sure they don't hide any bugs in
* production.
*
- * @see ElasticsearchIntegrationTest
+ * @see ESIntegTestCase
*/
public static final String TESTS_ENABLE_MOCK_MODULES = "tests.enable_mock_modules";
diff --git a/core/src/test/java/org/elasticsearch/test/TestCluster.java b/core/src/test/java/org/elasticsearch/test/TestCluster.java
index 322ed74197e..593ceee9bb4 100644
--- a/core/src/test/java/org/elasticsearch/test/TestCluster.java
+++ b/core/src/test/java/org/elasticsearch/test/TestCluster.java
@@ -153,7 +153,7 @@ public abstract class TestCluster implements Iterable, Closeable {
} catch (AssertionError ae) {
// Try to see what threads are doing when we hit the "Delete index failed - not acked":
logger.info("dump all threads on AssertionError");
- ElasticsearchTestCase.printStackDump(logger);
+ ESTestCase.printStackDump(logger);
logger.info("done dump all threads on AssertionError");
throw ae;
}
diff --git a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java
index a186bf43edf..44004fe6f48 100644
--- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java
+++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java
@@ -48,7 +48,8 @@ import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.aggregations.SearchContextAggregations;
import org.elasticsearch.search.dfs.DfsSearchResult;
import org.elasticsearch.search.fetch.FetchSearchResult;
-import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext;
+import org.elasticsearch.search.fetch.FetchSubPhase;
+import org.elasticsearch.search.fetch.FetchSubPhaseContext;
import org.elasticsearch.search.fetch.innerhits.InnerHitsContext;
import org.elasticsearch.search.fetch.script.ScriptFieldsContext;
import org.elasticsearch.search.fetch.source.FetchSourceContext;
@@ -63,9 +64,7 @@ import org.elasticsearch.search.scan.ScanContext;
import org.elasticsearch.search.suggest.SuggestionSearchContext;
import org.elasticsearch.threadpool.ThreadPool;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
public class TestSearchContext extends SearchContext {
@@ -83,6 +82,7 @@ public class TestSearchContext extends SearchContext {
private SearchContextAggregations aggregations;
private final long originNanoTime = System.nanoTime();
+ private final Map subPhaseContexts = new HashMap<>();
public TestSearchContext(ThreadPool threadPool,PageCacheRecycler pageCacheRecycler, BigArrays bigArrays, IndexService indexService, QueryCache filterCache, IndexFieldDataService indexFieldDataService) {
super(ParseFieldMatcher.STRICT);
@@ -203,6 +203,15 @@ public class TestSearchContext extends SearchContext {
return this;
}
+ @Override
+ public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) {
+ String subPhaseName = contextFactory.getName();
+ if (subPhaseContexts.get(subPhaseName) == null) {
+ subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance());
+ }
+ return (SubPhaseContext) subPhaseContexts.get(subPhaseName);
+ }
+
@Override
public SearchContextHighlight highlight() {
return null;
@@ -230,16 +239,6 @@ public class TestSearchContext extends SearchContext {
public void addRescore(RescoreSearchContext rescore) {
}
- @Override
- public boolean hasFieldDataFields() {
- return false;
- }
-
- @Override
- public FieldDataFieldsContext fieldDataFields() {
- return null;
- }
-
@Override
public boolean hasScriptFields() {
return false;
diff --git a/core/src/test/java/org/elasticsearch/test/cache/recycler/MockBigArrays.java b/core/src/test/java/org/elasticsearch/test/cache/recycler/MockBigArrays.java
index 08f86a7004e..4c67fbcd08b 100644
--- a/core/src/test/java/org/elasticsearch/test/cache/recycler/MockBigArrays.java
+++ b/core/src/test/java/org/elasticsearch/test/cache/recycler/MockBigArrays.java
@@ -39,7 +39,7 @@ import org.elasticsearch.common.util.IntArray;
import org.elasticsearch.common.util.LongArray;
import org.elasticsearch.common.util.ObjectArray;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import java.util.Collection;
import java.util.Collections;
@@ -68,7 +68,7 @@ public class MockBigArrays extends BigArrays {
// not empty, we might be executing on a shared cluster that keeps on obtaining
// and releasing arrays, lets make sure that after a reasonable timeout, all master
// copy (snapshot) have been released
- boolean success = ElasticsearchTestCase.awaitBusy(new Predicate() {
+ boolean success = ESTestCase.awaitBusy(new Predicate() {
@Override
public boolean apply(Object input) {
return Sets.intersection(masterCopy.keySet(), ACQUIRED_ARRAYS.keySet()).isEmpty();
diff --git a/core/src/test/java/org/elasticsearch/test/cache/recycler/MockPageCacheRecycler.java b/core/src/test/java/org/elasticsearch/test/cache/recycler/MockPageCacheRecycler.java
index eea29f82302..482575d7a23 100644
--- a/core/src/test/java/org/elasticsearch/test/cache/recycler/MockPageCacheRecycler.java
+++ b/core/src/test/java/org/elasticsearch/test/cache/recycler/MockPageCacheRecycler.java
@@ -26,7 +26,7 @@ import org.elasticsearch.cache.recycler.PageCacheRecycler;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.recycler.Recycler.V;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.threadpool.ThreadPool;
@@ -46,7 +46,7 @@ public class MockPageCacheRecycler extends PageCacheRecycler {
// not empty, we might be executing on a shared cluster that keeps on obtaining
// and releasing pages, lets make sure that after a reasonable timeout, all master
// copy (snapshot) have been released
- boolean success = ElasticsearchTestCase.awaitBusy(new Predicate() {
+ boolean success = ESTestCase.awaitBusy(new Predicate() {
@Override
public boolean apply(Object input) {
return Sets.intersection(masterCopy.keySet(), ACQUIRED_PAGES.keySet()).isEmpty();
diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java
rename to core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java
index a6e522aeaa2..84aa300fb84 100644
--- a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java
+++ b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java
@@ -21,9 +21,8 @@
package org.elasticsearch.test.disruption;
-import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.transport.TransportModule;
@@ -31,8 +30,7 @@ import org.junit.Test;
import java.io.IOException;
-@LuceneTestCase.Slow
-public class NetworkPartitionTests extends ElasticsearchIntegrationTest {
+public class NetworkPartitionIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java b/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java
index 9ebecc68c46..e448bfa070f 100644
--- a/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java
+++ b/core/src/test/java/org/elasticsearch/test/engine/MockEngineSupport.java
@@ -36,7 +36,7 @@ import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.engine.EngineConfig;
import org.elasticsearch.index.engine.EngineException;
import org.elasticsearch.index.shard.ShardId;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.io.Closeable;
import java.io.IOException;
@@ -84,7 +84,7 @@ public final class MockEngineSupport {
shardId = config.getShardId();
filterCache = config.getQueryCache();
filterCachingPolicy = config.getQueryCachingPolicy();
- final long seed = indexSettings.getAsLong(ElasticsearchIntegrationTest.SETTING_INDEX_SEED, 0l);
+ final long seed = indexSettings.getAsLong(ESIntegTestCase.SETTING_INDEX_SEED, 0l);
Random random = new Random(seed);
final double ratio = indexSettings.getAsDouble(WRAP_READER_RATIO, 0.0d); // DISABLED by default - AssertingDR is crazy slow
Class extends AssertingDirectoryReader> wrapper = indexSettings.getAsClass(READER_WRAPPER_TYPE, AssertingDirectoryReader.class);
diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java
index 076297c3920..8678f20ac12 100644
--- a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java
+++ b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java
@@ -79,7 +79,7 @@ import java.nio.file.Path;
import java.util.*;
import static com.google.common.base.Predicates.isNull;
-import static org.elasticsearch.test.ElasticsearchTestCase.*;
+import static org.elasticsearch.test.ESTestCase.*;
import static org.elasticsearch.test.VersionUtils.randomVersion;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
diff --git a/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java b/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java
index d63a0797f26..8d2caadbcd7 100644
--- a/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java
+++ b/core/src/test/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java
@@ -25,7 +25,7 @@ import com.carrotsearch.randomizedtesting.TraceFormatting;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.junit.internal.AssumptionViolatedException;
import org.junit.runner.Description;
@@ -38,11 +38,11 @@ import java.util.TimeZone;
import static com.carrotsearch.randomizedtesting.SysGlobals.SYSPROP_ITERATIONS;
import static com.carrotsearch.randomizedtesting.SysGlobals.SYSPROP_PREFIX;
import static com.carrotsearch.randomizedtesting.SysGlobals.SYSPROP_TESTMETHOD;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.TESTS_CLUSTER;
-import static org.elasticsearch.test.rest.ElasticsearchRestTestCase.REST_TESTS_BLACKLIST;
-import static org.elasticsearch.test.rest.ElasticsearchRestTestCase.REST_TESTS_SPEC;
-import static org.elasticsearch.test.rest.ElasticsearchRestTestCase.REST_TESTS_SUITE;
-import static org.elasticsearch.test.rest.ElasticsearchRestTestCase.Rest;
+import static org.elasticsearch.test.ESIntegTestCase.TESTS_CLUSTER;
+import static org.elasticsearch.test.rest.ESRestTestCase.REST_TESTS_BLACKLIST;
+import static org.elasticsearch.test.rest.ESRestTestCase.REST_TESTS_SPEC;
+import static org.elasticsearch.test.rest.ESRestTestCase.REST_TESTS_SUITE;
+import static org.elasticsearch.test.rest.ESRestTestCase.Rest;
/**
* A {@link RunListener} that emits to {@link System#err} a string with command
@@ -50,7 +50,7 @@ import static org.elasticsearch.test.rest.ElasticsearchRestTestCase.Rest;
*/
public class ReproduceInfoPrinter extends RunListener {
- protected final ESLogger logger = Loggers.getLogger(ElasticsearchTestCase.class);
+ protected final ESLogger logger = Loggers.getLogger(ESTestCase.class);
@Override
public void testStarted(Description description) throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java b/core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java
rename to core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java
index b9449d03db3..9315fff0a20 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java
@@ -23,9 +23,7 @@ import com.carrotsearch.randomizedtesting.RandomizedTest;
import com.carrotsearch.randomizedtesting.annotations.TestGroup;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import com.google.common.collect.Lists;
-
import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
import org.apache.lucene.util.LuceneTestCase.SuppressFsync;
import org.apache.lucene.util.TimeUnits;
@@ -36,8 +34,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.node.Node;
import org.elasticsearch.repositories.uri.URLRepository;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.rest.client.RestException;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import org.elasticsearch.test.rest.parser.RestTestSuiteParser;
@@ -79,13 +77,12 @@ import java.util.Set;
/**
* Runs the clients test suite against an elasticsearch cluster.
*/
-@ElasticsearchRestTestCase.Rest
-@Slow
+@ESRestTestCase.Rest
@SuppressFsync // we aren't trying to test this here, and it can make the test slow
@SuppressCodecs("*") // requires custom completion postings format
@ClusterScope(randomDynamicTemplates = false)
@TimeoutSuite(millis = 40 * TimeUnits.MINUTE) // timeout the suite after 40min and fail the test.
-public abstract class ElasticsearchRestTestCase extends ElasticsearchIntegrationTest {
+public abstract class ESRestTestCase extends ESIntegTestCase {
/**
* Property that allows to control whether the REST tests are run (default) or not
@@ -98,7 +95,7 @@ public abstract class ElasticsearchRestTestCase extends ElasticsearchIntegration
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
- @TestGroup(enabled = true, sysProperty = ElasticsearchRestTestCase.TESTS_REST)
+ @TestGroup(enabled = true, sysProperty = ESRestTestCase.TESTS_REST)
public @interface Rest {
}
@@ -133,7 +130,7 @@ public abstract class ElasticsearchRestTestCase extends ElasticsearchIntegration
private final RestTestCandidate testCandidate;
- public ElasticsearchRestTestCase(RestTestCandidate testCandidate) {
+ public ESRestTestCase(RestTestCandidate testCandidate) {
this.testCandidate = testCandidate;
String[] blacklist = resolvePathsProperty(REST_TESTS_BLACKLIST, null);
if (blacklist != null) {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest0Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest0Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java
index f86836876c5..e73bf347093 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest0Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 0 */
-public class Rest0Tests extends ElasticsearchRestTestCase {
- public Rest0Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest0IT extends ESRestTestCase {
+ public Rest0IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest1Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest1Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java
index d75444fe005..bc80123debc 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest1Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 1 */
-public class Rest1Tests extends ElasticsearchRestTestCase {
- public Rest1Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest1IT extends ESRestTestCase {
+ public Rest1IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest2Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest2Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java
index 1d01ecc58ec..a2fb5ad9226 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest2Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 2 */
-public class Rest2Tests extends ElasticsearchRestTestCase {
- public Rest2Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest2IT extends ESRestTestCase {
+ public Rest2IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest3Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest3Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java
index 044e182e7a6..7cbc974de0d 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest3Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 3 */
-public class Rest3Tests extends ElasticsearchRestTestCase {
- public Rest3Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest3IT extends ESRestTestCase {
+ public Rest3IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest4Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest4Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java
index 75213143b9c..3910167702a 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest4Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 4 */
-public class Rest4Tests extends ElasticsearchRestTestCase {
- public Rest4Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest4IT extends ESRestTestCase {
+ public Rest4IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest5Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest5Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java
index a2c1af46dd0..748b06c2c2a 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest5Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 5 */
-public class Rest5Tests extends ElasticsearchRestTestCase {
- public Rest5Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest5IT extends ESRestTestCase {
+ public Rest5IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest6Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest6Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java
index bb7ccd10035..e8fbcd4826c 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest6Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 6 */
-public class Rest6Tests extends ElasticsearchRestTestCase {
- public Rest6Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest6IT extends ESRestTestCase {
+ public Rest6IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest7Tests.java b/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/Rest7Tests.java
rename to core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java
index aba7c03136b..cf68bdb5606 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/Rest7Tests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java
@@ -27,8 +27,8 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest API tests subset 7 */
-public class Rest7Tests extends ElasticsearchRestTestCase {
- public Rest7Tests(@Name("yaml") RestTestCandidate testCandidate) {
+public class Rest7IT extends ESRestTestCase {
+ public Rest7IT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
}
@ParametersFactory
diff --git a/core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java b/core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java
index 3c7fcfdc640..cdcd6a21a52 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/client/RestResponse.java
@@ -33,7 +33,7 @@ public class RestResponse {
private final HttpResponse response;
private JsonPath parsedResponse;
- RestResponse(HttpResponse response) {
+ public RestResponse(HttpResponse response) {
this.response = response;
}
diff --git a/core/src/test/java/org/elasticsearch/test/rest/support/Features.java b/core/src/test/java/org/elasticsearch/test/rest/support/Features.java
index 68e0848a1a8..3b867262685 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/support/Features.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/support/Features.java
@@ -20,7 +20,7 @@
package org.elasticsearch.test.rest.support;
import com.google.common.collect.Lists;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import java.util.List;
@@ -45,7 +45,7 @@ public final class Features {
*/
public static boolean areAllSupported(List features) {
for (String feature : features) {
- if ("requires_replica".equals(feature) && ElasticsearchIntegrationTest.cluster().numDataNodes() >= 2) {
+ if ("requires_replica".equals(feature) && ESIntegTestCase.cluster().numDataNodes() >= 2) {
continue;
}
if (!SUPPORTED.contains(feature)) {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTests.java
rename to core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java
index 1a84178e3c8..cbe14f8e9cc 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/AbstractParserTestCase.java
@@ -20,14 +20,13 @@
package org.elasticsearch.test.rest.test;
import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Ignore;
import static org.hamcrest.Matchers.nullValue;
-@Ignore
-public abstract class AbstractParserTests extends ElasticsearchTestCase {
+public abstract class AbstractParserTestCase extends ESTestCase {
protected XContentParser parser;
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java
index ac1090e01d4..b316ae0face 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/AssertionParsersTests.java
@@ -28,7 +28,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class AssertionParsersTests extends AbstractParserTests {
+public class AssertionParsersTests extends AbstractParserTestCase {
@Test
public void testParseIsTrue() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java
index e48dd5e908e..c3aba8114a9 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/DoSectionParserTests.java
@@ -36,7 +36,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-public class DoSectionParserTests extends AbstractParserTests {
+public class DoSectionParserTests extends AbstractParserTestCase {
@Test
public void testParseDoSectionNoBody() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java
index 10db051e2b1..2aad874774f 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/FileUtilsTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.test.rest.test;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.support.FileUtils;
import org.junit.Test;
@@ -31,7 +31,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.greaterThan;
-public class FileUtilsTests extends ElasticsearchTestCase {
+public class FileUtilsTests extends ESTestCase {
@Test
public void testLoadSingleYamlSuite() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java
index 73892ee4c79..dfc12253ed1 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/JsonPathTests.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.test.rest.test;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.Stash;
import org.elasticsearch.test.rest.json.JsonPath;
import org.junit.Test;
@@ -29,7 +29,7 @@ import java.util.Set;
import static org.hamcrest.Matchers.*;
-public class JsonPathTests extends ElasticsearchTestCase {
+public class JsonPathTests extends ESTestCase {
@Test
public void testEvaluateObjectPathEscape() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java
index c86660f5c81..c25ebd42ffd 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserFailingTests.java
@@ -20,7 +20,7 @@ package org.elasticsearch.test.rest.test;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.spec.RestApiParser;
import org.junit.Test;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.containsString;
/**
*
*/
-public class RestApiParserFailingTests extends ElasticsearchTestCase {
+public class RestApiParserFailingTests extends ESTestCase {
@Test
public void brokenSpecShouldThrowUsefulExceptionWhenParsingFailsOnParams() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java
index 55580415055..7f4cdf10abc 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/RestApiParserTests.java
@@ -27,7 +27,7 @@ import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class RestApiParserTests extends AbstractParserTests {
+public class RestApiParserTests extends AbstractParserTestCase {
@Test
public void testParseRestSpecIndexApi() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java
index 34b2e9462f7..5a31bfb0ba8 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/RestTestParserTests.java
@@ -21,8 +21,7 @@ package org.elasticsearch.test.rest.test;
import org.elasticsearch.Version;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.yaml.YamlXContent;
-import org.elasticsearch.test.ElasticsearchTestCase;
-import org.elasticsearch.test.VersionUtils;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import org.elasticsearch.test.rest.parser.RestTestSuiteParseContext;
import org.elasticsearch.test.rest.parser.RestTestSuiteParser;
@@ -37,7 +36,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class RestTestParserTests extends ElasticsearchTestCase {
+public class RestTestParserTests extends ESTestCase {
private XContentParser parser;
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java
index 7e2724a1671..ba28a486632 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/SetSectionParserTests.java
@@ -28,7 +28,7 @@ import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class SetSectionParserTests extends AbstractParserTests {
+public class SetSectionParserTests extends AbstractParserTestCase {
@Test
public void testParseSetSectionSingleValue() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java
index d2427e0bb45..beb7449d830 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/SetupSectionParserTests.java
@@ -28,7 +28,7 @@ import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-public class SetupSectionParserTests extends AbstractParserTests {
+public class SetupSectionParserTests extends AbstractParserTestCase {
@Test
public void testParseSetupSection() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java
index 1e71ae9181c..a697427f853 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/SkipSectionParserTests.java
@@ -29,7 +29,7 @@ import org.junit.Test;
import static org.hamcrest.Matchers.*;
-public class SkipSectionParserTests extends AbstractParserTests {
+public class SkipSectionParserTests extends AbstractParserTestCase {
@Test
public void testParseSkipSectionVersionNoFeature() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java b/core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java
index 374ade56c9a..ac6a3c129fa 100644
--- a/core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java
+++ b/core/src/test/java/org/elasticsearch/test/rest/test/TestSectionParserTests.java
@@ -29,7 +29,7 @@ import java.util.Map;
import static org.hamcrest.Matchers.*;
-public class TestSectionParserTests extends AbstractParserTests {
+public class TestSectionParserTests extends AbstractParserTestCase {
@Test
public void testParseTestSectionWithDoSection() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java b/core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java
index 5be741b9dce..3e1415b8590 100644
--- a/core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java
+++ b/core/src/test/java/org/elasticsearch/test/store/MockFSDirectoryService.java
@@ -42,8 +42,8 @@ import org.elasticsearch.index.store.IndexStoreModule;
import org.elasticsearch.index.store.Store;
import org.elasticsearch.indices.IndicesLifecycle;
import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Assert;
import java.io.Closeable;
@@ -79,7 +79,7 @@ public class MockFSDirectoryService extends FsDirectoryService {
@Inject
public MockFSDirectoryService(@IndexSettings Settings indexSettings, IndexStore indexStore, final IndicesService service, final ShardPath path) {
super(indexSettings, indexStore, path);
- final long seed = indexSettings.getAsLong(ElasticsearchIntegrationTest.SETTING_INDEX_SEED, 0l);
+ final long seed = indexSettings.getAsLong(ESIntegTestCase.SETTING_INDEX_SEED, 0l);
this.random = new Random(seed);
checkIndexOnClose = indexSettings.getAsBoolean(CHECK_INDEX_ON_CLOSE, true);
randomIOExceptionRate = indexSettings.getAsDouble(RANDOM_IO_EXCEPTION_RATE, 0.0d);
@@ -145,7 +145,7 @@ public class MockFSDirectoryService extends FsDirectoryService {
return;
}
if (IndexWriter.isLocked(dir)) {
- ElasticsearchTestCase.checkIndexFailed = true;
+ ESTestCase.checkIndexFailed = true;
throw new IllegalStateException("IndexWriter is still open on shard " + shardId);
}
try (CheckIndex checkIndex = new CheckIndex(dir)) {
@@ -155,7 +155,7 @@ public class MockFSDirectoryService extends FsDirectoryService {
out.flush();
CheckIndex.Status status = checkIndex.checkIndex();
if (!status.clean) {
- ElasticsearchTestCase.checkIndexFailed = true;
+ ESTestCase.checkIndexFailed = true;
logger.warn("check index [failure] index files={}\n{}",
Arrays.toString(dir.listAll()),
new String(os.bytes().toBytes(), Charsets.UTF_8));
diff --git a/core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java b/core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java
index d7ffab93115..97854f408c4 100644
--- a/core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java
+++ b/core/src/test/java/org/elasticsearch/test/test/InternalTestClusterTests.java
@@ -24,7 +24,7 @@ import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.SettingsSource;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.hasEntry;
* configuration given the same seed / input.
*/
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet
-public class InternalTestClusterTests extends ElasticsearchTestCase {
+public class InternalTestClusterTests extends ESTestCase {
public void testInitializiationIsConsistent() {
long clusterSeed = randomLong();
diff --git a/core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java b/core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java
index 70de553c766..e4c5f2edaf3 100644
--- a/core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java
+++ b/core/src/test/java/org/elasticsearch/test/test/LoggingListenerTests.java
@@ -21,7 +21,7 @@ package org.elasticsearch.test.test;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.junit.listeners.LoggingListener;
import org.junit.Test;
@@ -33,7 +33,7 @@ import java.lang.reflect.Method;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.nullValue;
-public class LoggingListenerTests extends ElasticsearchTestCase {
+public class LoggingListenerTests extends ESTestCase {
@Test
public void testCustomLevelPerMethod() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterTests.java b/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterTests.java
rename to core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java
index 58956aace52..55d86aa4c9a 100644
--- a/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterTests.java
+++ b/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.test.test;
import com.carrotsearch.randomizedtesting.annotations.Repeat;
import org.elasticsearch.common.SuppressForbidden;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.TestCluster;
import org.junit.Test;
@@ -33,8 +33,8 @@ import static org.hamcrest.Matchers.equalTo;
* This test ensures that the cluster initializion for suite scope is not influencing
* the tests random sequence due to initializtion using the same random instance.
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE)
-public class SuiteScopeClusterTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE)
+public class SuiteScopeClusterIT extends ESIntegTestCase {
private static int ITER = 0;
private static long[] SEQUENCE = new long[100];
private static Long CLUSTER_SEED = null;
diff --git a/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterTests.java b/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java
similarity index 90%
rename from core/src/test/java/org/elasticsearch/test/test/TestScopeClusterTests.java
rename to core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java
index 310be735bde..5233bae7c7f 100644
--- a/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterTests.java
+++ b/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java
@@ -18,7 +18,7 @@
*/
package org.elasticsearch.test.test;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.TestCluster;
import org.junit.Test;
@@ -30,8 +30,8 @@ import static org.hamcrest.Matchers.equalTo;
* This test ensures that the cluster initializion for TEST scope is not influencing
* the tests random sequence due to initializtion using the same random instance.
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST)
-public class TestScopeClusterTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST)
+public class TestScopeClusterIT extends ESIntegTestCase {
private static int ITER = 0;
private static long[] SEQUENCE = new long[100];
private static Long CLUSTER_SEED = null;
diff --git a/core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java b/core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java
index e368a063b6b..cc2f613eb27 100644
--- a/core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java
+++ b/core/src/test/java/org/elasticsearch/test/test/VersionUtilsTests.java
@@ -19,12 +19,12 @@
package org.elasticsearch.test.test;
import org.elasticsearch.Version;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import java.util.List;
-public class VersionUtilsTests extends ElasticsearchTestCase {
+public class VersionUtilsTests extends ESTestCase {
public void testAllVersionsSorted() {
List allVersions = VersionUtils.allVersions();
diff --git a/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java b/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java
index ab775bff878..f02c925630d 100644
--- a/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java
+++ b/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java
@@ -24,7 +24,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.VersionUtils;
import org.elasticsearch.test.hamcrest.ElasticsearchAssertions;
import org.elasticsearch.threadpool.ThreadPool;
@@ -48,7 +48,7 @@ public class AssertingLocalTransport extends LocalTransport {
@Inject
public AssertingLocalTransport(Settings settings, ThreadPool threadPool, Version version, NamedWriteableRegistry namedWriteableRegistry) {
super(settings, threadPool, version, namedWriteableRegistry);
- final long seed = settings.getAsLong(ElasticsearchIntegrationTest.SETTING_INDEX_SEED, 0l);
+ final long seed = settings.getAsLong(ESIntegTestCase.SETTING_INDEX_SEED, 0l);
random = new Random(seed);
minVersion = settings.getAsVersion(ASSERTING_TRANSPORT_MIN_VERSION_KEY, Version.V_0_18_0);
maxVersion = settings.getAsVersion(ASSERTING_TRANSPORT_MAX_VERSION_KEY, Version.CURRENT);
@@ -59,7 +59,7 @@ public class AssertingLocalTransport extends LocalTransport {
ElasticsearchAssertions.assertVersionSerializable(VersionUtils.randomVersionBetween(random, minVersion, maxVersion), response);
super.handleParsedResponse(response, handler);
}
-
+
@Override
public void sendRequest(final DiscoveryNode node, final long requestId, final String action, final TransportRequest request, TransportRequestOptions options) throws IOException, TransportException {
ElasticsearchAssertions.assertVersionSerializable(VersionUtils.randomVersionBetween(random, minVersion, maxVersion), request);
diff --git a/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java
rename to core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java
index dc223deba0f..d0f1fa2027a 100644
--- a/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java
+++ b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java
@@ -32,13 +32,13 @@ import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.node.NodeBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.hamcrest.RegexMatcher;
import org.elasticsearch.threadpool.ThreadPool.Names;
-import org.elasticsearch.tribe.TribeTests;
+import org.elasticsearch.tribe.TribeIT;
import org.junit.Test;
import java.io.IOException;
@@ -52,14 +52,14 @@ import java.util.regex.Pattern;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures;
import static org.hamcrest.Matchers.*;
/**
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0)
-public class SimpleThreadPoolTests extends ElasticsearchIntegrationTest {
+public class SimpleThreadPoolIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
@@ -111,16 +111,16 @@ public class SimpleThreadPoolTests extends ElasticsearchIntegrationTest {
logger.info("post node *new* threads are {}", threadNames);
for (String threadName : threadNames) {
// ignore some shared threads we know that are created within the same VM, like the shared discovery one
- // or the ones that are occasionally come up from ElasticsearchSingleNodeTest
+ // or the ones that are occasionally come up from ESSingleNodeTestCase
if (threadName.contains("[" + MulticastChannel.SHARED_CHANNEL_NAME + "]")
- || threadName.contains("[" + ElasticsearchSingleNodeTest.nodeName() + "]")
+ || threadName.contains("[" + ESSingleNodeTestCase.nodeName() + "]")
|| threadName.contains("Keep-Alive-Timer")) {
continue;
}
String nodePrefix = "(" + Pattern.quote(InternalTestCluster.TRANSPORT_CLIENT_PREFIX) + ")?(" +
- Pattern.quote(ElasticsearchIntegrationTest.SUITE_CLUSTER_NODE_PREFIX) + "|" +
- Pattern.quote(ElasticsearchIntegrationTest.TEST_CLUSTER_NODE_PREFIX) + "|" +
- Pattern.quote(TribeTests.SECOND_CLUSTER_NODE_PREFIX) + ")";
+ Pattern.quote(ESIntegTestCase.SUITE_CLUSTER_NODE_PREFIX) + "|" +
+ Pattern.quote(ESIntegTestCase.TEST_CLUSTER_NODE_PREFIX) + "|" +
+ Pattern.quote(TribeIT.SECOND_CLUSTER_NODE_PREFIX) + ")";
assertThat(threadName, RegexMatcher.matches("\\[" + nodePrefix + "\\d+\\]"));
}
}
diff --git a/core/src/test/java/org/elasticsearch/threadpool/ThreadPoolSerializationTests.java b/core/src/test/java/org/elasticsearch/threadpool/ThreadPoolSerializationTests.java
index 632f37eff65..3226662f686 100644
--- a/core/src/test/java/org/elasticsearch/threadpool/ThreadPoolSerializationTests.java
+++ b/core/src/test/java/org/elasticsearch/threadpool/ThreadPoolSerializationTests.java
@@ -29,7 +29,7 @@ import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.Map;
@@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class ThreadPoolSerializationTests extends ElasticsearchTestCase {
+public class ThreadPoolSerializationTests extends ESTestCase {
BytesStreamOutput output = new BytesStreamOutput();
diff --git a/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java b/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java
index 27a379e5de5..9330f71996d 100644
--- a/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java
+++ b/core/src/test/java/org/elasticsearch/threadpool/UpdateThreadPoolSettingsTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.threadpool;
import com.google.common.util.concurrent.MoreExecutors;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool.Names;
import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class UpdateThreadPoolSettingsTests extends ElasticsearchTestCase {
+public class UpdateThreadPoolSettingsTests extends ESTestCase {
private ThreadPool.Info info(ThreadPool threadPool, String name) {
for (ThreadPool.Info info : threadPool.info()) {
diff --git a/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java b/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java
rename to core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java
index 90365f68c15..3cfbd42e2e8 100644
--- a/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java
+++ b/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.common.Priority;
import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Locale;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
*/
-public class SimpleTimestampTests extends ElasticsearchIntegrationTest {
+public class SimpleTimestampIT extends ESIntegTestCase {
@Test
public void testSimpleTimestamp() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java b/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java
index 8af8cab2a88..fbef650f8c1 100644
--- a/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.threadpool.ThreadPool;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public abstract class AbstractSimpleTransportTests extends ElasticsearchTestCase {
+public abstract class AbstractSimpleTransportTests extends ESTestCase {
protected ThreadPool threadPool;
diff --git a/core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java b/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java
rename to core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java
index 69be9f8fdf2..d3b8533d554 100644
--- a/core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java
@@ -19,7 +19,7 @@
package org.elasticsearch.transport;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.either;
@@ -41,7 +41,7 @@ import static org.hamcrest.CoreMatchers.startsWith;
* When an api exposes multiple transport handlers, some of which are invoked internally during the execution of the api,
* we use the `[n]` suffix to identify node actions and the `[s]` suffix to identify shard actions.
*/
-public class ActionNamesTests extends ElasticsearchIntegrationTest {
+public class ActionNamesIT extends ESIntegTestCase {
@Test
@SuppressWarnings("unchecked")
diff --git a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportTests.java b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportTests.java
rename to core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java
index 499cab72764..0aac3245cc0 100644
--- a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java
@@ -47,8 +47,8 @@ import org.elasticsearch.rest.RestController;
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.script.groovy.GroovyScriptEngineService;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.After;
@@ -63,12 +63,12 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.node.Node.HTTP_ENABLED;
import static org.elasticsearch.rest.RestStatus.OK;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = SUITE)
-public class ContextAndHeaderTransportTests extends ElasticsearchIntegrationTest {
+public class ContextAndHeaderTransportIT extends ESIntegTestCase {
private static final List requests = new CopyOnWriteArrayList<>();
private String randomHeaderKey = randomAsciiOfLength(10);
diff --git a/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java b/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java
index 6aed835c443..1c5f34b8ce2 100644
--- a/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.node.settings.NodeSettingsService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cache.recycler.MockBigArrays;
import org.elasticsearch.test.cache.recycler.MockPageCacheRecycler;
import org.elasticsearch.threadpool.ThreadPool;
@@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.is;
* This test checks, if a HTTP look-alike request (starting with a HTTP method and a space)
* actually returns text response instead of just dropping the connection
*/
-public class NettySizeHeaderFrameDecoderTests extends ElasticsearchTestCase {
+public class NettySizeHeaderFrameDecoderTests extends ESTestCase {
private final Settings settings = settingsBuilder().put("name", "foo").put("transport.host", "127.0.0.1").build();
diff --git a/core/src/test/java/org/elasticsearch/transport/TransportMessageTests.java b/core/src/test/java/org/elasticsearch/transport/TransportMessageTests.java
index 4fdd076f7c1..bb907e5fb26 100644
--- a/core/src/test/java/org/elasticsearch/transport/TransportMessageTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/TransportMessageTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.transport;
import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
@@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.is;
/**
*
*/
-public class TransportMessageTests extends ElasticsearchTestCase {
+public class TransportMessageTests extends ESTestCase {
@Test
public void testSerialization() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/KeyedLockTests.java b/core/src/test/java/org/elasticsearch/transport/netty/KeyedLockTests.java
index 592c9127246..43d03729bf4 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/KeyedLockTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/KeyedLockTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.transport.netty;
import org.elasticsearch.common.util.concurrent.KeyedLock;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -33,7 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
-public class KeyedLockTests extends ElasticsearchTestCase {
+public class KeyedLockTests extends ESTestCase {
@Test
public void checkIfMapEmptyAfterLotsOfAcquireAndReleases() throws InterruptedException {
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java
index 0f2552b24b5..d5371999c1e 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java
@@ -26,7 +26,7 @@ import org.elasticsearch.common.lease.Releasables;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.BigArrays;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.transport.MockTransportService;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.*;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.greaterThan;
/**
*/
-public class NettyScheduledPingTests extends ElasticsearchTestCase {
+public class NettyScheduledPingTests extends ESTestCase {
@Test
public void testScheduledPing() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportTests.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java
similarity index 96%
rename from core/src/test/java/org/elasticsearch/transport/netty/NettyTransportTests.java
rename to core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java
index 36cd8ab1e01..8fd2d3038e5 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java
@@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.*;
import org.jboss.netty.channel.Channel;
@@ -45,8 +45,8 @@ import java.io.IOException;
import java.net.InetSocketAddress;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
@@ -54,7 +54,7 @@ import static org.hamcrest.Matchers.is;
*
*/
@ClusterScope(scope = Scope.TEST, numDataNodes = 1)
-public class NettyTransportTests extends ElasticsearchIntegrationTest {
+public class NettyTransportIT extends ESIntegTestCase {
// static so we can use it in anonymous classes
private static String channelProfileName = null;
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationTests.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.java
similarity index 94%
rename from core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationTests.java
rename to core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.java
index 637a65f1df3..7e883c9fb09 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.java
@@ -25,7 +25,7 @@ import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.junit.annotations.Network;
import org.elasticsearch.transport.TransportModule;
import org.junit.Test;
@@ -33,12 +33,12 @@ import org.junit.Test;
import java.util.Locale;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1, numClientNodes = 0)
-public class NettyTransportMultiPortIntegrationTests extends ElasticsearchIntegrationTest {
+public class NettyTransportMultiPortIntegrationIT extends ESIntegTestCase {
private static int randomPort = -1;
private static String randomPortRange;
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java
index 6cc49175f8f..26d02c60d2c 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java
@@ -31,7 +31,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.cache.recycler.MockBigArrays;
import org.elasticsearch.test.junit.rule.RepeatOnExceptionRule;
import org.elasticsearch.threadpool.ThreadPool;
@@ -50,7 +50,7 @@ import java.net.Socket;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.is;
-public class NettyTransportMultiPortTests extends ElasticsearchTestCase {
+public class NettyTransportMultiPortTests extends ESTestCase {
private static final int MAX_RETRIES = 10;
diff --git a/core/src/test/java/org/elasticsearch/transport/netty/SimpleNettyTransportTests.java b/core/src/test/java/org/elasticsearch/transport/netty/SimpleNettyTransportTests.java
index 99a1d2bbd7e..a0b6ddbdbb5 100644
--- a/core/src/test/java/org/elasticsearch/transport/netty/SimpleNettyTransportTests.java
+++ b/core/src/test/java/org/elasticsearch/transport/netty/SimpleNettyTransportTests.java
@@ -19,7 +19,6 @@
package org.elasticsearch.transport.netty;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
@@ -32,7 +31,6 @@ import org.elasticsearch.transport.AbstractSimpleTransportTests;
import org.elasticsearch.transport.ConnectTransportException;
import org.junit.Test;
-@Slow
public class SimpleNettyTransportTests extends AbstractSimpleTransportTests {
@Override
diff --git a/core/src/test/java/org/elasticsearch/tribe/TribeTests.java b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/tribe/TribeTests.java
rename to core/src/test/java/org/elasticsearch/tribe/TribeIT.java
index 7a0a8f769b9..5b8d8f32d97 100644
--- a/core/src/test/java/org/elasticsearch/tribe/TribeTests.java
+++ b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java
@@ -35,10 +35,9 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.MasterNotDiscoveredException;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.TestCluster;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -57,9 +56,8 @@ import static org.hamcrest.Matchers.notNullValue;
* Note, when talking to tribe client, no need to set the local flag on master read operations, it
* does it by default.
*/
-@Slow
@LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet
-public class TribeTests extends ElasticsearchIntegrationTest {
+public class TribeIT extends ESIntegTestCase {
public static final String SECOND_CLUSTER_NODE_PREFIX = "node_tribe2";
@@ -70,7 +68,7 @@ public class TribeTests extends ElasticsearchIntegrationTest {
@BeforeClass
public static void setupSecondCluster() throws Exception {
- ElasticsearchIntegrationTest.beforeClass();
+ ESIntegTestCase.beforeClass();
// create another cluster
cluster2 = new InternalTestCluster(randomLong(), createTempDir(), 2, 2, Strings.randomBase64UUID(getRandom()), 0, false, SECOND_CLUSTER_NODE_PREFIX);
cluster2.beforeTest(getRandom(), 0.1);
diff --git a/core/src/test/java/org/elasticsearch/tribe/TribeUnitTests.java b/core/src/test/java/org/elasticsearch/tribe/TribeUnitTests.java
index 1eb962bb86f..7bcbd996a54 100644
--- a/core/src/test/java/org/elasticsearch/tribe/TribeUnitTests.java
+++ b/core/src/test/java/org/elasticsearch/tribe/TribeUnitTests.java
@@ -26,7 +26,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
import org.elasticsearch.node.internal.InternalSettingsPreparer;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -38,11 +39,11 @@ import static org.hamcrest.CoreMatchers.either;
import static org.hamcrest.CoreMatchers.equalTo;
/**
- * This test doesn't extend {@link org.elasticsearch.test.ElasticsearchIntegrationTest} as the internal cluster ignores system properties
+ * This test doesn't extend {@link ESIntegTestCase} as the internal cluster ignores system properties
* all the time, while we need to make the tribe node accept them in this case, so that we can verify that they are not read again as part
* of the tribe client nodes initialization. Note that the started nodes will obey to the 'node.mode' settings as the internal cluster does.
*/
-public class TribeUnitTests extends ElasticsearchTestCase {
+public class TribeUnitTests extends ESTestCase {
private static Node tribe1;
private static Node tribe2;
diff --git a/core/src/test/java/org/elasticsearch/ttl/SimpleTTLTests.java b/core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/ttl/SimpleTTLTests.java
rename to core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java
index e945769275a..6c4bd969955 100644
--- a/core/src/test/java/org/elasticsearch/ttl/SimpleTTLTests.java
+++ b/core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java
@@ -28,8 +28,8 @@ import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.io.IOException;
@@ -39,12 +39,12 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.*;
@ClusterScope(scope= Scope.SUITE, numDataNodes = 1)
-public class SimpleTTLTests extends ElasticsearchIntegrationTest {
+public class SimpleTTLIT extends ESIntegTestCase {
static private final long PURGE_INTERVAL = 200;
diff --git a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptTests.java b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java
similarity index 92%
rename from core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptTests.java
rename to core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java
index 30ad56b2dd4..0c3e7de3a61 100644
--- a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptTests.java
+++ b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java
@@ -28,9 +28,9 @@ import org.elasticsearch.script.NativeScriptEngineService;
import org.elasticsearch.script.NativeScriptFactory;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import java.util.Map;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.is;
*
*/
@ClusterScope(scope= Scope.SUITE, numDataNodes =1)
-public class UpdateByNativeScriptTests extends ElasticsearchIntegrationTest {
+public class UpdateByNativeScriptIT extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/core/src/test/java/org/elasticsearch/update/UpdateTests.java b/core/src/test/java/org/elasticsearch/update/UpdateIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/update/UpdateTests.java
rename to core/src/test/java/org/elasticsearch/update/UpdateIT.java
index d38f28b208c..da988b8c338 100644
--- a/core/src/test/java/org/elasticsearch/update/UpdateTests.java
+++ b/core/src/test/java/org/elasticsearch/update/UpdateIT.java
@@ -39,7 +39,7 @@ import org.elasticsearch.index.engine.VersionConflictEngineException;
import org.elasticsearch.index.shard.MergePolicyConfig;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.ArrayList;
@@ -61,7 +61,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
-public class UpdateTests extends ElasticsearchIntegrationTest {
+public class UpdateIT extends ESIntegTestCase {
private void createTestIndex() throws Exception {
logger.info("--> creating index test");
@@ -568,7 +568,6 @@ public class UpdateTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testConcurrentUpdateWithRetryOnConflict() throws Exception {
final boolean useBulkApi = randomBoolean();
createTestIndex();
@@ -627,7 +626,6 @@ public class UpdateTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void stressUpdateDeleteConcurrency() throws Exception {
//We create an index with merging disabled so that deletes don't get merged away
assertAcked(prepareCreate("test")
diff --git a/core/src/test/java/org/elasticsearch/update/UpdateNoopTests.java b/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/update/UpdateNoopTests.java
rename to core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java
index 9f4f203b299..3f0b1bcc1ec 100644
--- a/core/src/test/java/org/elasticsearch/update/UpdateNoopTests.java
+++ b/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java
@@ -22,7 +22,7 @@ package org.elasticsearch.update;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Before;
import org.junit.Test;
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.notNullValue;
/**
* Tests for noop updates.
*/
-public class UpdateNoopTests extends ElasticsearchIntegrationTest {
+public class UpdateNoopIT extends ESIntegTestCase {
@Test
public void singleField() throws Exception {
updateAndCheckSource(1, fields("bar", "baz"));
diff --git a/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateTests.java b/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java
similarity index 97%
rename from core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateTests.java
rename to core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java
index 9ed0e59206b..b22dff7c761 100644
--- a/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateTests.java
+++ b/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java
@@ -28,7 +28,7 @@ import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.script.ScriptService.ScriptType;
import org.elasticsearch.script.Template;
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -38,8 +38,8 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.SuiteScopeTest
-public class RenderSearchTemplateTests extends ElasticsearchIntegrationTest {
+@ESIntegTestCase.SuiteScopeTestCase
+public class RenderSearchTemplateIT extends ESIntegTestCase {
private static final String TEMPLATE_CONTENTS = "{\"size\":\"{{size}}\",\"query\":{\"match\":{\"foo\":\"{{value}}\"}},\"aggs\":{\"objects\":{\"terms\":{\"field\":\"{{value}}\",\"size\":\"{{size}}\"}}}}";
diff --git a/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryTests.java b/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java
similarity index 98%
rename from core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryTests.java
rename to core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java
index 0026957fe79..be493cd242d 100644
--- a/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryTests.java
+++ b/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java
@@ -30,9 +30,9 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.hamcrest.Matcher;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
@@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.nullValue;
*
*/
@ClusterScope(randomDynamicTemplates = false, scope = Scope.SUITE)
-public class SimpleValidateQueryTests extends ElasticsearchIntegrationTest {
+public class SimpleValidateQueryIT extends ESIntegTestCase {
@Test
public void simpleValidateQuery() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationTests.java b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java
similarity index 95%
rename from core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationTests.java
rename to core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java
index 11d49cef827..402ec0d8dc6 100644
--- a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationTests.java
+++ b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java
@@ -21,7 +21,7 @@ package org.elasticsearch.versioning;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.index.IndexResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import java.util.Map;
@@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.nullValue;
/**
*
*/
-public class ConcurrentDocumentOperationTests extends ElasticsearchIntegrationTest {
+public class ConcurrentDocumentOperationIT extends ESIntegTestCase {
@Test
public void concurrentOperationOnSameDocTest() throws Exception {
diff --git a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningTests.java b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java
similarity index 99%
rename from core/src/test/java/org/elasticsearch/versioning/SimpleVersioningTests.java
rename to core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java
index d857163e761..5296e763cc3 100644
--- a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningTests.java
+++ b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java
@@ -40,7 +40,7 @@ import org.elasticsearch.index.VersionType;
import org.elasticsearch.index.engine.DocumentAlreadyExistsException;
import org.elasticsearch.index.engine.FlushNotAllowedEngineException;
import org.elasticsearch.index.engine.VersionConflictEngineException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
@@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
*
*/
-public class SimpleVersioningTests extends ElasticsearchIntegrationTest {
+public class SimpleVersioningIT extends ESIntegTestCase {
@Test
public void testExternalVersioningInitialDelete() throws Exception {
@@ -537,7 +537,6 @@ public class SimpleVersioningTests extends ElasticsearchIntegrationTest {
@Test
- @Slow
public void testRandomIDsAndVersions() throws Exception {
createIndex("test");
ensureGreen();
@@ -757,7 +756,6 @@ public class SimpleVersioningTests extends ElasticsearchIntegrationTest {
}
@Test
- @Slow
public void testDeleteNotLost() throws Exception {
// We require only one shard for this test, so that the 2nd delete provokes pruning the deletes map:
diff --git a/core/src/test/java/org/elasticsearch/watcher/FileWatcherTest.java b/core/src/test/java/org/elasticsearch/watcher/FileWatcherTest.java
index c5c2856f3ec..457f7578f9b 100644
--- a/core/src/test/java/org/elasticsearch/watcher/FileWatcherTest.java
+++ b/core/src/test/java/org/elasticsearch/watcher/FileWatcherTest.java
@@ -20,7 +20,7 @@ package org.elasticsearch.watcher;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.LuceneTestCase;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.BufferedWriter;
@@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
@LuceneTestCase.SuppressFileSystems("ExtrasFS")
-public class FileWatcherTest extends ElasticsearchTestCase {
+public class FileWatcherTest extends ESTestCase {
private class RecordingChangeListener extends FileChangesListener {
diff --git a/core/src/test/java/org/elasticsearch/watcher/ResourceWatcherServiceTests.java b/core/src/test/java/org/elasticsearch/watcher/ResourceWatcherServiceTests.java
index ebb4cdaf768..b503436addd 100644
--- a/core/src/test/java/org/elasticsearch/watcher/ResourceWatcherServiceTests.java
+++ b/core/src/test/java/org/elasticsearch/watcher/ResourceWatcherServiceTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.watcher;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.threadpool.ThreadPool;
import org.junit.Test;
@@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.*;
/**
*
*/
-public class ResourceWatcherServiceTests extends ElasticsearchTestCase {
+public class ResourceWatcherServiceTests extends ESTestCase {
@Test
public void testSettings() throws Exception {
diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml
index a8cb9912dd3..fa454983130 100644
--- a/dev-tools/src/main/resources/ant/integration-tests.xml
+++ b/dev-tools/src/main/resources/ant/integration-tests.xml
@@ -154,11 +154,6 @@
-
-
-
-
-
@@ -185,6 +180,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -266,4 +276,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev-tools/src/main/resources/forbidden/test-signatures.txt b/dev-tools/src/main/resources/forbidden/test-signatures.txt
index 7289edcd755..3cde7352618 100644
--- a/dev-tools/src/main/resources/forbidden/test-signatures.txt
+++ b/dev-tools/src/main/resources/forbidden/test-signatures.txt
@@ -19,3 +19,5 @@ com.carrotsearch.randomizedtesting.annotations.Seed @ Don't commit hardcoded see
com.carrotsearch.randomizedtesting.annotations.Repeat @ Don't commit hardcoded repeats
org.apache.lucene.codecs.Codec#setDefault(org.apache.lucene.codecs.Codec) @ Use the SuppressCodecs("*") annotation instead
+org.apache.lucene.util.LuceneTestCase$Slow @ Don't write slow tests
+org.junit.Ignore @ Use AwaitsFix instead
diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml
index 226d955b761..6ccb9045d72 100644
--- a/distribution/deb/pom.xml
+++ b/distribution/deb/pom.xml
@@ -17,6 +17,15 @@
dpkg-sig
+
+
+ org.elasticsearch.distribution
+ elasticsearch-fully-loaded
+ ${elasticsearch.version}
+ pom
+
+
+
diff --git a/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java
index 167a5f04f92..fd12fd2e519 100644
--- a/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java
+++ b/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest integration test. runs against external cluster in 'mvn verify' */
-public class RestIT extends ElasticsearchRestTestCase {
+public class RestIT extends ESRestTestCase {
public RestIT(RestTestCandidate testCandidate) {
super(testCandidate);
}
diff --git a/distribution/fully-loaded/pom.xml b/distribution/fully-loaded/pom.xml
new file mode 100644
index 00000000000..babca43359e
--- /dev/null
+++ b/distribution/fully-loaded/pom.xml
@@ -0,0 +1,72 @@
+
+
+ 4.0.0
+
+ org.elasticsearch.distribution
+ elasticsearch-distribution
+ 2.0.0-beta1-SNAPSHOT
+
+
+ elasticsearch-fully-loaded
+ Elasticsearch with all optional dependencies
+ pom
+
+
+
+ org.elasticsearch
+ elasticsearch
+
+
+
+ org.apache.lucene
+ lucene-expressions
+
+
+
+ com.spatial4j
+ spatial4j
+
+
+
+ com.vividsolutions
+ jts
+
+
+
+
+ com.github.spullara.mustache.java
+ compiler
+
+
+
+ org.codehaus.groovy
+ groovy-all
+ indy
+
+
+
+ log4j
+ log4j
+
+
+
+ log4j
+ apache-log4j-extras
+
+
+
+
+
+ net.java.dev.jna
+ jna
+
+
+
+
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 2c68cee7946..6e3ae4e78c7 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -36,56 +36,8 @@
true
+
-
- org.elasticsearch
- elasticsearch
-
-
-
-
- org.apache.lucene
- lucene-expressions
-
-
- com.spatial4j
- spatial4j
-
-
- com.vividsolutions
- jts
-
-
-
- com.github.spullara.mustache.java
- compiler
-
-
- org.codehaus.groovy
- groovy-all
- indy
-
-
-
- log4j
- log4j
-
-
-
- log4j
- apache-log4j-extras
-
-
-
- org.slf4j
- slf4j-api
-
-
-
- net.java.dev.jna
- jna
-
-
com.carrotsearch.randomizedtesting
randomizedtesting-runner
@@ -180,11 +132,30 @@
+
+ com.carrotsearch.randomizedtesting
+ junit4-maven-plugin
+
+
+ integ-tests
+
+
+ 1
+
+
+ 127.0.0.1:9300
+
+
+
+
+
+ fully-loaded
+ shaded
tar
zip
deb
diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml
index 61c97082211..d596dbfcab8 100644
--- a/distribution/rpm/pom.xml
+++ b/distribution/rpm/pom.xml
@@ -13,6 +13,15 @@
Elasticsearch RPM Distribution
rpm
+
+
+ org.elasticsearch.distribution
+ elasticsearch-fully-loaded
+ ${elasticsearch.version}
+ pom
+
+
+
diff --git a/distribution/rpm/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/rpm/src/test/java/org/elasticsearch/test/rest/RestIT.java
index 167a5f04f92..fd12fd2e519 100644
--- a/distribution/rpm/src/test/java/org/elasticsearch/test/rest/RestIT.java
+++ b/distribution/rpm/src/test/java/org/elasticsearch/test/rest/RestIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest integration test. runs against external cluster in 'mvn verify' */
-public class RestIT extends ElasticsearchRestTestCase {
+public class RestIT extends ESRestTestCase {
public RestIT(RestTestCandidate testCandidate) {
super(testCandidate);
}
diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml
new file mode 100644
index 00000000000..f7704f94e9a
--- /dev/null
+++ b/distribution/shaded/pom.xml
@@ -0,0 +1,172 @@
+
+
+ 4.0.0
+
+ org.elasticsearch.distribution
+ elasticsearch-distribution
+ 2.0.0-beta1-SNAPSHOT
+
+
+ elasticsearch-shaded
+ Elasticsearch Shaded Distribution
+
+
+
+ org.elasticsearch
+ elasticsearch
+ ${elasticsearch.version}
+
+
+
+
+ ${project.artifactId}-${project.version}
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-antrun-plugin
+
+
+ check-for-jar-hell
+ integration-test
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+
+
+ package
+
+ shade
+
+
+
+
+ false
+ false
+ true
+ true
+ ${build.directory}/dependency-reduced-pom.xml
+
+
+ org.apache.lucene:*
+ com.spatial4j:*
+
+
+
+
+
+
+ true
+
+
+
+
+
+ com.google.common
+ org.elasticsearch.common
+
+
+ com.google.thirdparty
+ org.elasticsearch.common.thirdparty
+
+
+ com.carrotsearch.hppc
+ org.elasticsearch.common.hppc
+
+
+ org.HdrHistogram
+ org.elasticsearch.common.HdrHistogram
+
+
+ org.yaml
+ org.elasticsearch.common.yaml
+
+
+ com.twitter.jsr166e
+ org.elasticsearch.common.util.concurrent.jsr166e
+
+
+ com.fasterxml.jackson
+ org.elasticsearch.common.jackson
+
+
+ org.joda.time
+ org.elasticsearch.common.joda.time
+
+
+ org.joda.convert
+ org.elasticsearch.common.joda.convert
+
+
+ org.jboss.netty
+ org.elasticsearch.common.netty
+
+
+ com.ning.compress
+ org.elasticsearch.common.compress
+
+
+ com.github.mustachejava
+ org.elasticsearch.common.mustache
+
+
+ com.tdunning.math.stats
+ org.elasticsearch.common.stats
+
+
+ org.apache.commons.lang
+ org.elasticsearch.common.lang
+
+
+ org.apache.commons.cli
+ org.elasticsearch.common.cli.commons
+
+
+
+
+ *:*
+
+ META-INF/license/**
+ META-INF/*
+ META-INF/maven/**
+ LICENSE
+ NOTICE
+ /*.txt
+ build.properties
+
+
+
+
+
+
+
+
+
diff --git a/distribution/src/main/assemblies/common-bin.xml b/distribution/src/main/assemblies/common-bin.xml
index eed959a0e10..868521b28eb 100644
--- a/distribution/src/main/assemblies/common-bin.xml
+++ b/distribution/src/main/assemblies/common-bin.xml
@@ -2,39 +2,13 @@
/lib
- true
-
- org.apache.lucene:lucene*
- log4j:log4j
- log4j:apache-log4j-extras
- net.java.dev.jna:jna
- com.spatial4j:spatial4j
- com.vividsolutions:jts
- org.codehaus.groovy:groovy-all
- com.google.guava:guava
- com.carrotsearch:hppc
- com.fasterxml.jackson.core:jackson-core
- com.fasterxml.jackson.dataformat:jackson-dataformat-smile
- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor
- joda-time:joda-time
- org.joda:joda-convert
- io.netty:netty
- com.ning:compress-lzf
- com.github.spullara.mustache.java:compiler
- com.tdunning:t-digest
- org.apache.commons:commons-lang3
- commons-cli:commons-cli
- com.twitter:jsr166e
- org.hdrhistogram:HdrHistogram
-
-
-
- /lib
- false
-
- org.elasticsearch:elasticsearch
-
+ true
+ false
+
+
+
+ org.elasticsearch.distribution:*
+
diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml
index a6ace25c466..f62803ce499 100644
--- a/distribution/tar/pom.xml
+++ b/distribution/tar/pom.xml
@@ -12,6 +12,15 @@
elasticsearch-tar
Elasticsearch TAR Distribution
+
+
+ org.elasticsearch.distribution
+ elasticsearch-fully-loaded
+ ${elasticsearch.version}
+ pom
+
+
+
${project.basedir}/../src/main/packaging/packaging.properties
diff --git a/distribution/tar/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/tar/src/test/java/org/elasticsearch/test/rest/RestIT.java
index 167a5f04f92..fd12fd2e519 100644
--- a/distribution/tar/src/test/java/org/elasticsearch/test/rest/RestIT.java
+++ b/distribution/tar/src/test/java/org/elasticsearch/test/rest/RestIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest integration test. runs against external cluster in 'mvn verify' */
-public class RestIT extends ElasticsearchRestTestCase {
+public class RestIT extends ESRestTestCase {
public RestIT(RestTestCandidate testCandidate) {
super(testCandidate);
}
diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml
index dd0621b2e04..4d3f19d93e1 100644
--- a/distribution/zip/pom.xml
+++ b/distribution/zip/pom.xml
@@ -12,6 +12,15 @@
elasticsearch-zip
Elasticsearch ZIP Distribution
+
+
+ org.elasticsearch.distribution
+ elasticsearch-fully-loaded
+ ${elasticsearch.version}
+ pom
+
+
+
${project.basedir}/../src/main/packaging/packaging.properties
@@ -88,7 +97,7 @@
${skip.integ.tests}
-
+
diff --git a/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java
index 167a5f04f92..fd12fd2e519 100644
--- a/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java
+++ b/distribution/zip/src/test/java/org/elasticsearch/test/rest/RestIT.java
@@ -26,7 +26,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
/** Rest integration test. runs against external cluster in 'mvn verify' */
-public class RestIT extends ElasticsearchRestTestCase {
+public class RestIT extends ESRestTestCase {
public RestIT(RestTestCandidate testCandidate) {
super(testCandidate);
}
diff --git a/docs/reference/modules/plugins.asciidoc b/docs/reference/modules/plugins.asciidoc
index 7d278173f81..5846a534b26 100644
--- a/docs/reference/modules/plugins.asciidoc
+++ b/docs/reference/modules/plugins.asciidoc
@@ -97,7 +97,7 @@ will not start.
==== Installed Plugins
A list of the currently loaded plugins can be retrieved using the
-<>.
+<>.
[float]
==== Removing plugins
diff --git a/docs/reference/setup/repositories.asciidoc b/docs/reference/setup/repositories.asciidoc
index ed65b929cda..79b8959c249 100644
--- a/docs/reference/setup/repositories.asciidoc
+++ b/docs/reference/setup/repositories.asciidoc
@@ -8,12 +8,12 @@ build.
We have split the major versions in separate urls to avoid accidental upgrades across major version.
For all 0.90.x releases use 0.90 as version number, for 1.0.x use 1.0, for 1.1.x use 1.1 etc.
-We use the PGP key http://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4],
+We use the PGP key https://pgp.mit.edu/pks/lookup?op=vindex&search=0xD27D666CD88E42B4[D88E42B4],
Elasticsearch Signing Key, with fingerprint
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4
-to sign all our packages. It is available from http://pgp.mit.edu.
+to sign all our packages. It is available from https://pgp.mit.edu.
[float]
=== APT
diff --git a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/AnalysisICURestIT.java b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/AnalysisICURestIT.java
index 481d6c3f3a0..8da56d5a72b 100644
--- a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/AnalysisICURestIT.java
+++ b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/AnalysisICURestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class AnalysisICURestIT extends ElasticsearchRestTestCase {
+public class AnalysisICURestIT extends ESRestTestCase {
public AnalysisICURestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class AnalysisICURestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java
index 672cf7c651d..3516a1342d9 100644
--- a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java
+++ b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuAnalysisTests.java
@@ -20,7 +20,7 @@
package org.elasticsearch.index.analysis;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
@@ -28,7 +28,7 @@ import static org.elasticsearch.index.analysis.AnalysisTestUtils.createAnalysisS
import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class SimpleIcuAnalysisTests extends ElasticsearchTestCase {
+public class SimpleIcuAnalysisTests extends ESTestCase {
@Test
public void testDefaultsIcuAnalysis() {
diff --git a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java
index 9f2d3fbf65e..6be0b2f23af 100644
--- a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java
+++ b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuCollationTokenFilterTests.java
@@ -27,7 +27,7 @@ import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.KeywordTokenizer;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -37,7 +37,7 @@ import static org.elasticsearch.index.analysis.AnalysisTestUtils.createAnalysisS
import static org.hamcrest.Matchers.equalTo;
// Tests borrowed from Solr's Icu collation key filter factory test.
-public class SimpleIcuCollationTokenFilterTests extends ElasticsearchTestCase {
+public class SimpleIcuCollationTokenFilterTests extends ESTestCase {
/*
* Turkish has some funny casing.
diff --git a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuNormalizerCharFilterTests.java b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuNormalizerCharFilterTests.java
index ef747e6f56e..748b439a9ec 100644
--- a/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuNormalizerCharFilterTests.java
+++ b/plugins/analysis-icu/src/test/java/org/elasticsearch/index/analysis/SimpleIcuNormalizerCharFilterTests.java
@@ -22,7 +22,7 @@ package org.elasticsearch.index.analysis;
import com.ibm.icu.text.Normalizer2;
import org.apache.lucene.analysis.CharFilter;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.StringReader;
@@ -32,7 +32,7 @@ import static org.elasticsearch.index.analysis.AnalysisTestUtils.createAnalysisS
/**
* Test
*/
-public class SimpleIcuNormalizerCharFilterTests extends ElasticsearchTestCase {
+public class SimpleIcuNormalizerCharFilterTests extends ESTestCase {
@Test
public void testDefaultSetting() throws Exception {
diff --git a/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/AnalysisKuromojiRestIT.java b/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/AnalysisKuromojiRestIT.java
index 857e66fef39..ae51e491d6b 100644
--- a/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/AnalysisKuromojiRestIT.java
+++ b/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/AnalysisKuromojiRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class AnalysisKuromojiRestIT extends ElasticsearchRestTestCase {
+public class AnalysisKuromojiRestIT extends ESRestTestCase {
public AnalysisKuromojiRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class AnalysisKuromojiRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/KuromojiAnalysisTests.java b/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/KuromojiAnalysisTests.java
index 0f6b5095e2d..3468a8e2bdc 100644
--- a/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/KuromojiAnalysisTests.java
+++ b/plugins/analysis-kuromoji/src/test/java/org/elasticsearch/index/analysis/KuromojiAnalysisTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
import org.elasticsearch.plugin.analysis.kuromoji.AnalysisKuromojiPlugin;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.*;
/**
*/
-public class KuromojiAnalysisTests extends ElasticsearchTestCase {
+public class KuromojiAnalysisTests extends ESTestCase {
@Test
public void testDefaultsKuromojiAnalysis() throws IOException {
diff --git a/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/AnalysisPhoneticRestIT.java b/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/AnalysisPhoneticRestIT.java
index f211e23c597..9d66bf24357 100644
--- a/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/AnalysisPhoneticRestIT.java
+++ b/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/AnalysisPhoneticRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class AnalysisPhoneticRestIT extends ElasticsearchRestTestCase {
+public class AnalysisPhoneticRestIT extends ESRestTestCase {
public AnalysisPhoneticRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class AnalysisPhoneticRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java b/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java
index 45c3d7cf0ec..ed3da957571 100644
--- a/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java
+++ b/plugins/analysis-phonetic/src/test/java/org/elasticsearch/index/analysis/SimplePhoneticAnalysisTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class SimplePhoneticAnalysisTests extends ElasticsearchTestCase {
+public class SimplePhoneticAnalysisTests extends ESTestCase {
@Test
public void testPhoneticTokenFilterFactory() {
diff --git a/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/AnalysisSmartChineseRestIT.java b/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/AnalysisSmartChineseRestIT.java
index bd46d53659b..16113b2b7ac 100644
--- a/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/AnalysisSmartChineseRestIT.java
+++ b/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/AnalysisSmartChineseRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class AnalysisSmartChineseRestIT extends ElasticsearchRestTestCase {
+public class AnalysisSmartChineseRestIT extends ESRestTestCase {
public AnalysisSmartChineseRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class AnalysisSmartChineseRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/SimpleSmartChineseAnalysisTests.java b/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/SimpleSmartChineseAnalysisTests.java
index 859cd403670..70656159682 100644
--- a/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/SimpleSmartChineseAnalysisTests.java
+++ b/plugins/analysis-smartcn/src/test/java/org/elasticsearch/index/analysis/SimpleSmartChineseAnalysisTests.java
@@ -32,7 +32,7 @@ import org.elasticsearch.index.IndexNameModule;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class SimpleSmartChineseAnalysisTests extends ElasticsearchTestCase {
+public class SimpleSmartChineseAnalysisTests extends ESTestCase {
@Test
public void testDefaultsIcuAnalysis() {
diff --git a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/AnalysisPolishRestIT.java b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/AnalysisPolishRestIT.java
index c9bee3127e7..330ad87af74 100644
--- a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/AnalysisPolishRestIT.java
+++ b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/AnalysisPolishRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.index.analysis;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class AnalysisPolishRestIT extends ElasticsearchRestTestCase {
+public class AnalysisPolishRestIT extends ESRestTestCase {
public AnalysisPolishRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class AnalysisPolishRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/PolishAnalysisTests.java b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/PolishAnalysisTests.java
index 56276721d00..a6a60d59a7d 100644
--- a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/PolishAnalysisTests.java
+++ b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/PolishAnalysisTests.java
@@ -36,7 +36,7 @@ import org.elasticsearch.index.analysis.pl.PolishStemTokenFilterFactory;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
@@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*/
-public class PolishAnalysisTests extends ElasticsearchTestCase {
+public class PolishAnalysisTests extends ESTestCase {
@Test
public void testDefaultsPolishAnalysis() {
diff --git a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/SimplePolishTokenFilterTests.java b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/SimplePolishTokenFilterTests.java
index 192eeb9b0df..2e1638836af 100644
--- a/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/SimplePolishTokenFilterTests.java
+++ b/plugins/analysis-stempel/src/test/java/org/elasticsearch/index/analysis/SimplePolishTokenFilterTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.index.analysis.pl.PolishAnalysisBinderProcessor;
import org.elasticsearch.index.settings.IndexSettingsModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisModule;
import org.elasticsearch.indices.analysis.IndicesAnalysisService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.IOException;
@@ -46,7 +46,7 @@ import java.io.StringReader;
import static org.hamcrest.Matchers.equalTo;
-public class SimplePolishTokenFilterTests extends ElasticsearchTestCase {
+public class SimplePolishTokenFilterTests extends ESTestCase {
@Test
public void testBasicUsage() throws Exception {
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTest.java
index 4cad35a28cd..f0a10c06042 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AWSSignersTest.java
@@ -20,12 +20,12 @@
package org.elasticsearch.cloud.aws;
import com.amazonaws.ClientConfiguration;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
-public class AWSSignersTest extends ElasticsearchTestCase {
+public class AWSSignersTest extends ESTestCase {
@Test
public void testSigners() {
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AbstractAwsTest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AbstractAwsTest.java
index a31a6525a7c..12abdbe71bc 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AbstractAwsTest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/AbstractAwsTest.java
@@ -19,23 +19,16 @@
package org.elasticsearch.cloud.aws;
-import com.carrotsearch.randomizedtesting.annotations.TestGroup;
-
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.FailedToResolveConfigException;
import org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ThirdParty;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
import org.junit.After;
import org.junit.Before;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
import java.util.HashMap;
import java.util.Map;
@@ -46,7 +39,7 @@ import java.util.Map;
* in order to run these tests.
*/
@ThirdParty
-public abstract class AbstractAwsTest extends ElasticsearchIntegrationTest {
+public abstract class AbstractAwsTest extends ESIntegTestCase {
/**
* Those properties are set by the AWS SDK v1.9.4 and if not ignored,
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/CloudAWSRestIT.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/CloudAWSRestIT.java
index d4d99218b01..ce47b60bb23 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/CloudAWSRestIT.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/CloudAWSRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.cloud.aws;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class CloudAWSRestIT extends ElasticsearchRestTestCase {
+public class CloudAWSRestIT extends ESRestTestCase {
public CloudAWSRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class CloudAWSRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/blobstore/S3OutputStreamTest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/blobstore/S3OutputStreamTest.java
index 5723f58a4ce..b2dc66b8081 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/blobstore/S3OutputStreamTest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/cloud/aws/blobstore/S3OutputStreamTest.java
@@ -19,7 +19,7 @@
package org.elasticsearch.cloud.aws.blobstore;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
* Unit test for {@link S3OutputStream}.
*/
-public class S3OutputStreamTest extends ElasticsearchTestCase {
+public class S3OutputStreamTest extends ESTestCase {
private static final int BUFFER_SIZE = S3BlobStore.MIN_BUFFER_SIZE.bytesAsInt();
@@ -77,7 +77,7 @@ public class S3OutputStreamTest extends ElasticsearchTestCase {
}
- @Test @Slow
+ @Test
public void testWriteExactlyNTimesMoreDataThanBufferSize() throws IOException {
int n = randomIntBetween(2, 3);
int length = n * BUFFER_SIZE;
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryITest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryITest.java
index c450a5920b2..463131522a2 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryITest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryITest.java
@@ -23,9 +23,8 @@ package org.elasticsearch.discovery.ec2;
import org.elasticsearch.cloud.aws.AbstractAwsTest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryUpdateSettingsITest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryUpdateSettingsITest.java
index 2af8b895314..98576118206 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryUpdateSettingsITest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/discovery/ec2/Ec2DiscoveryUpdateSettingsITest.java
@@ -24,9 +24,8 @@ import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsResp
import org.elasticsearch.cloud.aws.AbstractAwsTest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.junit.Test;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
diff --git a/plugins/cloud-aws/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java b/plugins/cloud-aws/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java
index df619b8af37..25dd8b96def 100644
--- a/plugins/cloud-aws/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java
+++ b/plugins/cloud-aws/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java
@@ -34,13 +34,12 @@ import org.elasticsearch.cloud.aws.AwsS3Service;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.cloud.aws.CloudAwsPlugin;
-import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.repositories.RepositoryMissingException;
import org.elasticsearch.repositories.RepositoryVerificationException;
import org.elasticsearch.snapshots.SnapshotMissingException;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.junit.After;
import org.junit.Before;
diff --git a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/ElasticSearchBaseDirectoryTestCase.java b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/ESBaseDirectoryTestCase.java
similarity index 94%
rename from plugins/cloud-azure/src/test/java/org/apache/lucene/store/ElasticSearchBaseDirectoryTestCase.java
rename to plugins/cloud-azure/src/test/java/org/apache/lucene/store/ESBaseDirectoryTestCase.java
index 32805f4f3aa..4c6c230c5dc 100644
--- a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/ElasticSearchBaseDirectoryTestCase.java
+++ b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/ESBaseDirectoryTestCase.java
@@ -36,7 +36,7 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
@TimeoutSuite(millis = TimeUnits.HOUR)
@LuceneTestCase.SuppressReproduceLine
@LuceneTestCase.SuppressSysoutChecks(bugUrl = "we log a lot on purpose")
-public abstract class ElasticSearchBaseDirectoryTestCase extends BaseDirectoryTestCase {
+public abstract class ESBaseDirectoryTestCase extends BaseDirectoryTestCase {
static {
BootstrapForTesting.ensureInitialized();
}
diff --git a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbMMapDirectoryTest.java b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbMMapDirectoryTest.java
index 2b0124c2fbc..eecaa4c13a2 100644
--- a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbMMapDirectoryTest.java
+++ b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbMMapDirectoryTest.java
@@ -22,7 +22,7 @@ package org.apache.lucene.store;
import java.io.IOException;
import java.nio.file.Path;
-public class SmbMMapDirectoryTest extends ElasticSearchBaseDirectoryTestCase {
+public class SmbMMapDirectoryTest extends ESBaseDirectoryTestCase {
@Override
protected Directory getDirectory(Path file) throws IOException {
diff --git a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbSimpleFSDirectoryTest.java b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbSimpleFSDirectoryTest.java
index ae65cd7447b..58cdb5f8cb6 100644
--- a/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbSimpleFSDirectoryTest.java
+++ b/plugins/cloud-azure/src/test/java/org/apache/lucene/store/SmbSimpleFSDirectoryTest.java
@@ -22,7 +22,7 @@ package org.apache.lucene.store;
import java.io.IOException;
import java.nio.file.Path;
-public class SmbSimpleFSDirectoryTest extends ElasticSearchBaseDirectoryTestCase {
+public class SmbSimpleFSDirectoryTest extends ESBaseDirectoryTestCase {
@Override
protected Directory getDirectory(Path file) throws IOException {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/azure/itest/AzureSimpleITest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/azure/itest/AzureSimpleITest.java
index 2ab09adac95..da916d5b71d 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/azure/itest/AzureSimpleITest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/azure/itest/AzureSimpleITest.java
@@ -22,7 +22,7 @@ package org.elasticsearch.azure.itest;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.cloud.azure.AbstractAzureTest;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -31,8 +31,8 @@ import org.junit.Test;
* and -Des.config=/path/to/elasticsearch.yml
* @see org.elasticsearch.cloud.azure.AbstractAzureTest
*/
-@ElasticsearchIntegrationTest.ClusterScope(
- scope = ElasticsearchIntegrationTest.Scope.TEST,
+@ESIntegTestCase.ClusterScope(
+ scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 1,
numClientNodes = 0,
transportClientRatio = 0.0)
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureTest.java
index c366db9ab19..acd163f96b3 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureTest.java
@@ -24,8 +24,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.FailedToResolveConfigException;
import org.elasticsearch.plugin.cloud.azure.CloudAzurePlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ThirdParty;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
/**
* Base class for Azure tests that require credentials.
@@ -34,7 +34,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest.ThirdParty;
* in order to run these tests.
*/
@ThirdParty
-public abstract class AbstractAzureTest extends ElasticsearchIntegrationTest {
+public abstract class AbstractAzureTest extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/CloudAzureRestIT.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/CloudAzureRestIT.java
index 3a5da94f06d..aac8f9dea21 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/CloudAzureRestIT.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/cloud/azure/CloudAzureRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.cloud.azure;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class CloudAzureRestIT extends ElasticsearchRestTestCase {
+public class CloudAzureRestIT extends ESRestTestCase {
public CloudAzureRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class CloudAzureRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AbstractAzureComputeServiceTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AbstractAzureComputeServiceTest.java
index 106f51383d1..b12b8bf1d49 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AbstractAzureComputeServiceTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AbstractAzureComputeServiceTest.java
@@ -25,9 +25,9 @@ import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery;
import org.elasticsearch.cloud.azure.management.AzureComputeService.Management;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.cloud.azure.CloudAzurePlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
-public abstract class AbstractAzureComputeServiceTest extends ElasticsearchIntegrationTest {
+public abstract class AbstractAzureComputeServiceTest extends ESIntegTestCase {
private Class extends AzureComputeService> mock;
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTest.java
index 6cdbae94fe8..296c3ed44a3 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTest.java
@@ -22,7 +22,7 @@ package org.elasticsearch.discovery.azure;
import org.elasticsearch.cloud.azure.management.AzureComputeServiceTwoNodesMock;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.MasterNotDiscoveredException;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
@@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.nullValue;
* Reported issue in #15
* (https://github.com/elasticsearch/elasticsearch-cloud-azure/issues/15)
*/
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE,
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE,
numDataNodes = 0,
transportClientRatio = 0.0,
numClientNodes = 0)
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTest.java
index d68db9a1c83..b859701b087 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTest.java
@@ -23,17 +23,15 @@ import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery;
import org.elasticsearch.cloud.azure.management.AzureComputeService.Management;
import org.elasticsearch.cloud.azure.management.AzureComputeServiceSimpleMock;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST,
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 0,
transportClientRatio = 0.0,
numClientNodes = 0)
-@Slow
public class AzureSimpleTest extends AbstractAzureComputeServiceTest {
public AzureSimpleTest() {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTest.java
index b65be4c69d0..a80ac5ba445 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTest.java
@@ -23,17 +23,15 @@ import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery;
import org.elasticsearch.cloud.azure.management.AzureComputeService.Management;
import org.elasticsearch.cloud.azure.management.AzureComputeServiceTwoNodesMock;
import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST,
+@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 0,
transportClientRatio = 0.0,
numClientNodes = 0)
-@Slow
public class AzureTwoStartedNodesTest extends AbstractAzureComputeServiceTest {
public AzureTwoStartedNodesTest() {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/index/store/AbstractAzureFsTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/index/store/AbstractAzureFsTest.java
index 497e807d60e..047a0faecf1 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/index/store/AbstractAzureFsTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/index/store/AbstractAzureFsTest.java
@@ -20,12 +20,12 @@
package org.elasticsearch.index.store;
import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
-abstract public class AbstractAzureFsTest extends ElasticsearchIntegrationTest {
+abstract public class AbstractAzureFsTest extends ESIntegTestCase {
@Test
public void testAzureFs() {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreITest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreITest.java
index 876d1202cb2..1326a0e66d8 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreITest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreITest.java
@@ -39,7 +39,7 @@ import org.elasticsearch.repositories.RepositoryVerificationException;
import org.elasticsearch.repositories.azure.AzureRepository.Repository;
import org.elasticsearch.snapshots.SnapshotMissingException;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.store.MockFSDirectoryService;
import org.junit.After;
import org.junit.Before;
@@ -57,8 +57,8 @@ import static org.hamcrest.Matchers.greaterThan;
* and -Dtests.config=/path/to/elasticsearch.yml
* @see org.elasticsearch.cloud.azure.AbstractAzureTest
*/
-@ElasticsearchIntegrationTest.ClusterScope(
- scope = ElasticsearchIntegrationTest.Scope.SUITE,
+@ESIntegTestCase.ClusterScope(
+ scope = ESIntegTestCase.Scope.SUITE,
numDataNodes = 1,
transportClientRatio = 0.0)
public class AzureSnapshotRestoreITest extends AbstractAzureTest {
diff --git a/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTest.java b/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTest.java
index 3c77b0dd4d4..1b8a9083358 100644
--- a/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTest.java
+++ b/plugins/cloud-azure/src/test/java/org/elasticsearch/repositories/azure/AzureSnapshotRestoreTest.java
@@ -29,14 +29,14 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.snapshots.SnapshotState;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
-@ElasticsearchIntegrationTest.ClusterScope(
- scope = ElasticsearchIntegrationTest.Scope.SUITE,
+@ESIntegTestCase.ClusterScope(
+ scope = ESIntegTestCase.Scope.SUITE,
numDataNodes = 1,
numClientNodes = 0,
transportClientRatio = 0.0)
diff --git a/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/AbstractGceTest.java b/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/AbstractGceTest.java
index fe648be5391..1e94d90272e 100644
--- a/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/AbstractGceTest.java
+++ b/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/AbstractGceTest.java
@@ -24,15 +24,14 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.FailedToResolveConfigException;
import org.elasticsearch.plugin.cloud.gce.CloudGcePlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ThirdParty;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ThirdParty;
/**
*
*/
@ThirdParty
-public abstract class AbstractGceTest extends ElasticsearchIntegrationTest {
+public abstract class AbstractGceTest extends ESIntegTestCase {
@Override
protected Settings nodeSettings(int nodeOrdinal) {
diff --git a/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/CloudGCERestIT.java b/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/CloudGCERestIT.java
index 0439e129c18..644a2e4aca3 100644
--- a/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/CloudGCERestIT.java
+++ b/plugins/cloud-gce/src/test/java/org/elasticsearch/cloud/gce/CloudGCERestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.cloud.gce;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class CloudGCERestIT extends ElasticsearchRestTestCase {
+public class CloudGCERestIT extends ESRestTestCase {
public CloudGCERestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class CloudGCERestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/cloud-gce/src/test/java/org/elasticsearch/discovery/gce/GceComputeEngineTest.java b/plugins/cloud-gce/src/test/java/org/elasticsearch/discovery/gce/GceComputeEngineTest.java
index fe231cabd1a..489ae3a4c7c 100644
--- a/plugins/cloud-gce/src/test/java/org/elasticsearch/discovery/gce/GceComputeEngineTest.java
+++ b/plugins/cloud-gce/src/test/java/org/elasticsearch/discovery/gce/GceComputeEngineTest.java
@@ -21,14 +21,14 @@ package org.elasticsearch.discovery.gce;
import com.google.common.collect.Lists;
+import org.apache.lucene.util.LuceneTestCase;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.cloud.gce.GceComputeService;
import org.elasticsearch.cloud.gce.GceComputeService.Fields;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.gce.mock.*;
import org.elasticsearch.plugin.cloud.gce.CloudGcePlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.junit.Ignore;
import org.junit.Test;
@@ -36,12 +36,13 @@ import java.io.IOException;
import static org.hamcrest.Matchers.notNullValue;
-@ElasticsearchIntegrationTest.ClusterScope(
- scope = ElasticsearchIntegrationTest.Scope.TEST,
+@ESIntegTestCase.ClusterScope(
+ scope = ESIntegTestCase.Scope.TEST,
numDataNodes = 0,
numClientNodes = 0,
transportClientRatio = 0.0)
-public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
+@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/12622")
+public class GceComputeEngineTest extends ESIntegTestCase {
public static int getPort(int nodeOrdinal) {
try {
@@ -91,7 +92,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
assertThat(client().admin().cluster().prepareState().setMasterNodeTimeout("1s").execute().actionGet().getState().nodes().masterNodeId(), notNullValue());
}
- @Test @Ignore
+ @Test
public void nodes_with_different_tags_and_no_tag_set() {
startNode(1,
GceComputeServiceTwoNodesDifferentTagsMock.class,
@@ -107,10 +108,10 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
/**
* We need to ignore this test from elasticsearch version 1.2.1 as
* expected nodes running is 2 and this test will create 2 clusters with one node each.
- * @see org.elasticsearch.test.ElasticsearchIntegrationTest#ensureClusterSizeConsistency()
+ * @see ESIntegTestCase#ensureClusterSizeConsistency()
* TODO Reactivate when it will be possible to set the number of running nodes
*/
- @Test @Ignore
+ @Test
public void nodes_with_different_tags_and_one_tag_set() {
startNode(1,
GceComputeServiceTwoNodesDifferentTagsMock.class,
@@ -126,10 +127,10 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
/**
* We need to ignore this test from elasticsearch version 1.2.1 as
* expected nodes running is 2 and this test will create 2 clusters with one node each.
- * @see org.elasticsearch.test.ElasticsearchIntegrationTest#ensureClusterSizeConsistency()
+ * @see ESIntegTestCase#ensureClusterSizeConsistency()
* TODO Reactivate when it will be possible to set the number of running nodes
*/
- @Test @Ignore
+ @Test
public void nodes_with_different_tags_and_two_tag_set() {
startNode(1,
GceComputeServiceTwoNodesDifferentTagsMock.class,
@@ -142,7 +143,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
checkNumberOfNodes(1);
}
- @Test @Ignore
+ @Test
public void nodes_with_same_tags_and_no_tag_set() {
startNode(1,
GceComputeServiceTwoNodesSameTagsMock.class,
@@ -155,7 +156,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
checkNumberOfNodes(2);
}
- @Test @Ignore
+ @Test
public void nodes_with_same_tags_and_one_tag_set() {
startNode(1,
GceComputeServiceTwoNodesSameTagsMock.class,
@@ -168,7 +169,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
checkNumberOfNodes(2);
}
- @Test @Ignore
+ @Test
public void nodes_with_same_tags_and_two_tags_set() {
startNode(1,
GceComputeServiceTwoNodesSameTagsMock.class,
@@ -181,7 +182,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
checkNumberOfNodes(2);
}
- @Test @Ignore
+ @Test
public void multiple_zones_and_two_nodes_in_same_zone() {
startNode(1,
GceComputeServiceTwoNodesOneZoneMock.class,
@@ -196,7 +197,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
checkNumberOfNodes(2);
}
- @Test @Ignore
+ @Test
public void multiple_zones_and_two_nodes_in_different_zones() {
startNode(1,
GceComputeServiceTwoNodesTwoZonesMock.class,
@@ -214,7 +215,7 @@ public class GceComputeEngineTest extends ElasticsearchIntegrationTest {
/**
* For issue https://github.com/elastic/elasticsearch-cloud-gce/issues/43
*/
- @Test @Ignore
+ @Test
public void zero_node_43() {
startNode(1,
GceComputeServiceZeroNodeMock.class,
diff --git a/plugins/cloud-gce/src/test/java/org/elasticsearch/gce/itest/GceSimpleITest.java b/plugins/cloud-gce/src/test/java/org/elasticsearch/gce/itest/GceSimpleITest.java
index a6b77538f64..00684ba6b6e 100644
--- a/plugins/cloud-gce/src/test/java/org/elasticsearch/gce/itest/GceSimpleITest.java
+++ b/plugins/cloud-gce/src/test/java/org/elasticsearch/gce/itest/GceSimpleITest.java
@@ -23,8 +23,7 @@ import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.cloud.gce.AbstractGceTest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugin.cloud.gce.CloudGcePlugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
+import org.elasticsearch.test.ESIntegTestCase;
import org.hamcrest.Matchers;
import org.junit.Test;
@@ -35,8 +34,8 @@ import org.junit.Test;
* See https://github.com/elasticsearch/elasticsearch-cloud-gce/issues/10
* @see org.elasticsearch.cloud.gce.AbstractGceTest
*/
-@ElasticsearchIntegrationTest.ClusterScope(
- scope = ElasticsearchIntegrationTest.Scope.SUITE,
+@ESIntegTestCase.ClusterScope(
+ scope = ESIntegTestCase.Scope.SUITE,
numDataNodes = 1,
transportClientRatio = 0.0)
public class GceSimpleITest extends AbstractGceTest {
diff --git a/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/IndexDeleteByQueryResponseTests.java b/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/IndexDeleteByQueryResponseTests.java
index f59a6b51fe5..f11a0043c38 100644
--- a/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/IndexDeleteByQueryResponseTests.java
+++ b/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/IndexDeleteByQueryResponseTests.java
@@ -22,13 +22,13 @@ package org.elasticsearch.action.deletebyquery;
import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
import static org.hamcrest.Matchers.equalTo;
-public class IndexDeleteByQueryResponseTests extends ElasticsearchTestCase {
+public class IndexDeleteByQueryResponseTests extends ESTestCase {
@Test
public void testIncrements() {
diff --git a/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryActionTests.java b/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryActionTests.java
index c7eeea5d98b..f1edc8d8b8a 100644
--- a/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryActionTests.java
+++ b/plugins/delete-by-query/src/test/java/org/elasticsearch/action/deletebyquery/TransportDeleteByQueryActionTests.java
@@ -38,7 +38,7 @@ import org.elasticsearch.common.util.concurrent.CountDown;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.internal.InternalSearchHit;
-import org.elasticsearch.test.ElasticsearchSingleNodeTest;
+import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
@@ -46,7 +46,7 @@ import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
import static org.hamcrest.Matchers.equalTo;
-public class TransportDeleteByQueryActionTests extends ElasticsearchSingleNodeTest {
+public class TransportDeleteByQueryActionTests extends ESSingleNodeTestCase {
@Test
public void testExecuteScanFailsOnMissingIndex() {
diff --git a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/DeleteByQueryTests.java b/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/DeleteByQueryTests.java
index db3f1f8d104..9d79a230b2f 100644
--- a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/DeleteByQueryTests.java
+++ b/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/DeleteByQueryTests.java
@@ -19,7 +19,6 @@
package org.elasticsearch.plugin.deletebyquery;
-import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.admin.cluster.node.stats.NodeStats;
import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse;
@@ -36,8 +35,8 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.index.query.MatchQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
-import org.elasticsearch.test.ElasticsearchIntegrationTest;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.junit.Test;
import java.util.concurrent.CountDownLatch;
@@ -45,15 +44,13 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
+import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;
-
-@Slow
@ClusterScope(scope = SUITE, transportClientRatio = 0)
-public class DeleteByQueryTests extends ElasticsearchIntegrationTest {
+public class DeleteByQueryTests extends ESIntegTestCase {
protected Settings nodeSettings(int nodeOrdinal) {
Settings.Builder settings = Settings.builder()
diff --git a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestIT.java b/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestIT.java
index ec3931fd875..9674d541354 100644
--- a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestIT.java
+++ b/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.plugin.deletebyquery.test.rest;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class DeleteByQueryRestIT extends ElasticsearchRestTestCase {
+public class DeleteByQueryRestIT extends ESRestTestCase {
public DeleteByQueryRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class DeleteByQueryRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestTests.java b/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestTests.java
deleted file mode 100644
index d08e5abaae1..00000000000
--- a/plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestTests.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to Elasticsearch under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.elasticsearch.plugin.deletebyquery.test.rest;
-
-import com.carrotsearch.randomizedtesting.annotations.Name;
-import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-
-import org.apache.lucene.util.LuceneTestCase;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.plugin.deletebyquery.DeleteByQueryPlugin;
-import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase.Rest;
-import org.elasticsearch.test.rest.RestTestCandidate;
-import org.elasticsearch.test.rest.parser.RestTestParseException;
-import org.junit.Ignore;
-
-import java.io.IOException;
-
-import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
-
-
-@Rest
-@ClusterScope(scope = SUITE, randomDynamicTemplates = false)
-public class DeleteByQueryRestTests extends ElasticsearchRestTestCase {
-
- public DeleteByQueryRestTests(@Name("yaml") RestTestCandidate testCandidate) {
- super(testCandidate);
- }
-
- @ParametersFactory
- public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
- }
-
- protected Settings nodeSettings(int nodeOrdinal) {
- Settings.Builder settings = Settings.builder()
- .put(super.nodeSettings(nodeOrdinal))
- .put("plugin.types", DeleteByQueryPlugin.class.getName());
- return settings.build();
- }
-}
-
diff --git a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java
index e596bf8b3ae..13fe23787d7 100644
--- a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java
+++ b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptEngineTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.CompiledScript;
import org.elasticsearch.script.ExecutableScript;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*
*/
-public class JavaScriptScriptEngineTests extends ElasticsearchTestCase {
+public class JavaScriptScriptEngineTests extends ESTestCase {
private JavaScriptScriptEngineService se;
diff --git a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java
index baf10625cdf..e56ff8337ee 100644
--- a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java
+++ b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/JavaScriptScriptMultiThreadedTest.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.CompiledScript;
import org.elasticsearch.script.ExecutableScript;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.Test;
import java.util.HashMap;
@@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class JavaScriptScriptMultiThreadedTest extends ElasticsearchTestCase {
+public class JavaScriptScriptMultiThreadedTest extends ESTestCase {
@Test
public void testExecutableNoRuntimeParams() throws Exception {
diff --git a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/LangJavaScriptRestIT.java b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/LangJavaScriptRestIT.java
index 3bc18af4c77..8039715c3d1 100644
--- a/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/LangJavaScriptRestIT.java
+++ b/plugins/lang-javascript/src/test/java/org/elasticsearch/script/javascript/LangJavaScriptRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.script.javascript;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class LangJavaScriptRestIT extends ElasticsearchRestTestCase {
+public class LangJavaScriptRestIT extends ESRestTestCase {
public LangJavaScriptRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class LangJavaScriptRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/LangPythonScriptRestIT.java b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/LangPythonScriptRestIT.java
index d9a0bdd8abb..ee0a707644f 100644
--- a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/LangPythonScriptRestIT.java
+++ b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/LangPythonScriptRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.script.python;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class LangPythonScriptRestIT extends ElasticsearchRestTestCase {
+public class LangPythonScriptRestIT extends ESRestTestCase {
public LangPythonScriptRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class LangPythonScriptRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptEngineTests.java b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptEngineTests.java
index 94528f2b0e1..5634ec3ef6a 100644
--- a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptEngineTests.java
+++ b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptEngineTests.java
@@ -24,7 +24,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.CompiledScript;
import org.elasticsearch.script.ExecutableScript;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.instanceOf;
/**
*
*/
-public class PythonScriptEngineTests extends ElasticsearchTestCase {
+public class PythonScriptEngineTests extends ESTestCase {
private PythonScriptEngineService se;
diff --git a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptMultiThreadedTest.java b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptMultiThreadedTest.java
index 13d1d2b7a05..c4eb9851d05 100644
--- a/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptMultiThreadedTest.java
+++ b/plugins/lang-python/src/test/java/org/elasticsearch/script/python/PythonScriptMultiThreadedTest.java
@@ -23,7 +23,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.script.CompiledScript;
import org.elasticsearch.script.ExecutableScript;
import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.test.ElasticsearchTestCase;
+import org.elasticsearch.test.ESTestCase;
import org.junit.After;
import org.junit.Test;
@@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo;
/**
*
*/
-public class PythonScriptMultiThreadedTest extends ElasticsearchTestCase {
+public class PythonScriptMultiThreadedTest extends ESTestCase {
@After
public void close() {
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 8c0e845841a..b007dd7c72a 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -371,6 +371,52 @@
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ integ-setup-dependencies
+ pre-integration-test
+
+ copy
+
+
+ ${skip.integ.tests}
+
+
+ org.elasticsearch.distribution
+ elasticsearch-zip
+ ${elasticsearch.version}
+ zip
+ true
+
+ elasticsearch-${elasticsearch.version}.zip
+
+
+ ${integ.deps}
+
+
+
+
+
+ com.carrotsearch.randomizedtesting
+ junit4-maven-plugin
+
+
+ integ-tests
+
+
+ 1
+
+
+ 127.0.0.1:9300
+
+
+
+
+
@@ -384,7 +430,7 @@
cloud-gce
cloud-azure
cloud-aws
- example-site
+ site-example
lang-python
lang-javascript
delete-by-query
diff --git a/plugins/example-site/pom.xml b/plugins/site-example/pom.xml
similarity index 97%
rename from plugins/example-site/pom.xml
rename to plugins/site-example/pom.xml
index b4d9f59762c..15060e0bd52 100644
--- a/plugins/example-site/pom.xml
+++ b/plugins/site-example/pom.xml
@@ -10,7 +10,7 @@
2.0.0-beta1-SNAPSHOT
- elasticsearch-example-site
+ elasticsearch-site-example
Elasticsearch Example site plugin
Demonstrates how to serve resources via elasticsearch.
diff --git a/plugins/example-site/rest-api-spec/test/example/10_basic.yaml b/plugins/site-example/rest-api-spec/test/example/10_basic.yaml
similarity index 83%
rename from plugins/example-site/rest-api-spec/test/example/10_basic.yaml
rename to plugins/site-example/rest-api-spec/test/example/10_basic.yaml
index 91d88f28dd1..a66ce5c9133 100644
--- a/plugins/example-site/rest-api-spec/test/example/10_basic.yaml
+++ b/plugins/site-example/rest-api-spec/test/example/10_basic.yaml
@@ -10,6 +10,6 @@
- do:
nodes.info: {}
- - match: { nodes.$master.plugins.0.name: example-site }
+ - match: { nodes.$master.plugins.0.name: site-example }
- match: { nodes.$master.plugins.0.jvm: false }
- match: { nodes.$master.plugins.0.site: true }
diff --git a/plugins/example-site/src/main/assemblies/plugin-assembly.xml b/plugins/site-example/src/main/assemblies/plugin-assembly.xml
similarity index 100%
rename from plugins/example-site/src/main/assemblies/plugin-assembly.xml
rename to plugins/site-example/src/main/assemblies/plugin-assembly.xml
diff --git a/plugins/example-site/src/site/_site/index.html b/plugins/site-example/src/site/_site/index.html
similarity index 100%
rename from plugins/example-site/src/site/_site/index.html
rename to plugins/site-example/src/site/_site/index.html
diff --git a/plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java
new file mode 100644
index 00000000000..b873e2909b3
--- /dev/null
+++ b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.elasticsearch.example;
+
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.elasticsearch.test.ESIntegTestCase;
+import org.elasticsearch.test.ExternalTestCluster;
+import org.elasticsearch.test.TestCluster;
+import org.elasticsearch.test.rest.client.RestResponse;
+import org.elasticsearch.test.rest.client.http.HttpRequestBuilder;
+
+import java.net.InetSocketAddress;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * verifies content is actually served for the site plugin
+ */
+public class SiteContentsIT extends ESIntegTestCase {
+
+ // TODO: probably a better way to test, but we don't want to really
+ // define a fake rest spec or anything?
+ public void test() throws Exception {
+ TestCluster cluster = cluster();
+ assumeTrue("this test will not work from an IDE unless you pass tests.cluster pointing to a running instance", cluster instanceof ExternalTestCluster);
+ ExternalTestCluster externalCluster = (ExternalTestCluster) cluster;
+ try (CloseableHttpClient httpClient = HttpClients.createMinimal(new PoolingHttpClientConnectionManager(15, TimeUnit.SECONDS))) {
+ for (InetSocketAddress address : externalCluster.httpAddresses()) {
+ RestResponse restResponse = new RestResponse(
+ new HttpRequestBuilder(httpClient)
+ .host(address.getHostName()).port(address.getPort())
+ .path("/_plugin/site-example/")
+ .method("GET").execute());
+ assertEquals(200, restResponse.getStatusCode());
+ String body = restResponse.getBodyAsString();
+ assertTrue("unexpected body contents: " + body, body.contains("Page body"));
+ }
+ }
+ }
+}
diff --git a/plugins/example-site/src/test/java/org/elasticsearch/example/SiteRestIT.java b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java
similarity index 87%
rename from plugins/example-site/src/test/java/org/elasticsearch/example/SiteRestIT.java
rename to plugins/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java
index 5e6184670c3..e3df9ce92d9 100644
--- a/plugins/example-site/src/test/java/org/elasticsearch/example/SiteRestIT.java
+++ b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java
@@ -21,13 +21,13 @@ package org.elasticsearch.example;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
+import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.test.rest.parser.RestTestParseException;
import java.io.IOException;
-public class SiteRestIT extends ElasticsearchRestTestCase {
+public class SiteRestIT extends ESRestTestCase {
public SiteRestIT(@Name("yaml") RestTestCandidate testCandidate) {
super(testCandidate);
@@ -35,7 +35,7 @@ public class SiteRestIT extends ElasticsearchRestTestCase {
@ParametersFactory
public static Iterable parameters() throws IOException, RestTestParseException {
- return ElasticsearchRestTestCase.createParameters(0, 1);
+ return ESRestTestCase.createParameters(0, 1);
}
}
diff --git a/pom.xml b/pom.xml
index 416f8a5e2ca..501f5a457c0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,6 +47,7 @@
2.5.3
1.6.2
1.2.17
+ 0.7.2.201409121644
${project.build.directory}/dev-tools
@@ -64,12 +65,12 @@
${project.basedir}/backwards
random
random
- false
ERROR
512m
${basedir}/logs/
5
.local-${elasticsearch.version}-execution-hints.log
+ .local-${elasticsearch.version}-integ-execution-hints.log
false
false
@@ -88,7 +89,6 @@
-
@@ -452,14 +452,6 @@
true
-
-
- org.jacoco
- org.jacoco.agent
- runtime
- 0.6.4.201312101107
-
-
@@ -597,11 +589,6 @@
-
-
-
-
-
-Xmx${tests.heap.size}
-Xms${tests.heap.size}
@@ -637,10 +624,8 @@
${tests.weekly}
${tests.failfast}
${tests.awaitsfix}
- ${tests.slow}
${tests.timeoutSuite}
${tests.showSuccess}
- ${tests.integration}
${tests.thirdparty}
${tests.config}
${tests.client.ratio}
@@ -690,7 +675,6 @@
-
@@ -706,7 +690,14 @@
+
+
+
+
+
+
**/*Tests.class
**/*Test.class
@@ -732,17 +723,18 @@
mavenExtensions="true"
summaryFile="${project.build.directory}/failsafe-reports/failsafe-summary.xml"
dir="${project.build.directory}/failsafe-reports"/>
+
-
- 1
+
+
+
+
+
**/*IT.class
-
- true
-
- 127.0.0.1:9300
true
@@ -908,36 +900,6 @@
false
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.10
-
-
- integ-setup-dependencies
- pre-integration-test
-
- copy
-
-
- ${skip.integ.tests}
-
-
- org.elasticsearch.distribution
- elasticsearch-zip
- ${elasticsearch.version}
- zip
- true
-
- elasticsearch-${elasticsearch.version}.zip
-
-
- ${integ.deps}
-
-
-
-
@@ -1104,7 +1066,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=
org.jacoco
jacoco-maven-plugin
- 0.7.2.201409121644
+ ${jacoco.version}
default-prepare-agent
@@ -1211,6 +1173,22 @@ org.eclipse.jdt.ui.text.custom_code_templates=run
+
+ integ-tests-top-hints
+ integration-test
+
+ ${skip.integ.tests}
+
+
+
+
+
+
+
+
+ run
+
+
@@ -1415,15 +1393,6 @@ org.eclipse.jdt.ui.text.custom_code_templates=true
-
-
-
- org.jacoco
- org.jacoco.agent
- runtime
- test
-
-
false
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yaml b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yaml
index 6699fe0c382..0d955852c07 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yaml
+++ b/rest-api-spec/src/main/resources/rest-api-spec/test/cat.indices/10_basic.yaml
@@ -36,3 +36,18 @@
(\d+|\d+[.]\d+)(kb|b) \s*
)
$/
+
+ - do:
+ cat.indices:
+ v: false
+ h: i,cd,cds,creation.date,creation.date.string
+ - match:
+ $body: |
+ /^(
+ index1 \s+
+ (\d+) \s+
+ (\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d[+-]\d\d:\d\d) \s+
+ (\d+) \s+
+ (\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d[+-]\d\d:\d\d) \s*
+ )
+ $/