From 052cf1446f9caea16454e0db5860e8e694c61119 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 20 Jul 2015 20:27:36 -0400 Subject: [PATCH 01/49] Remove Environment.homeFile() Today we grant read+write+delete access to any files underneath the home. But we have to remove this, if we want to have improved security of files underneath elasticsearch. --- .../org/elasticsearch/bootstrap/Security.java | 6 ++--- .../org/elasticsearch/env/Environment.java | 27 ++++++++++++------- .../java/org/elasticsearch/node/Node.java | 4 +-- .../elasticsearch/plugins/PluginManager.java | 2 +- .../bootstrap/SecurityTests.java | 7 +++-- .../plugins/PluginManagerTests.java | 4 +-- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java index 4d91341296a..13bada820c1 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java @@ -117,11 +117,11 @@ 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.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"); 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/plugins/PluginManager.java b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java index 53eca549034..bfd05f76832 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java @@ -733,7 +733,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/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java index 3c3db267292..3f72caaa539 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -53,7 +53,7 @@ public class SecurityTests extends ElasticsearchTestCase { } // the fake es home - assertTrue(permissions.implies(new FilePermission(esHome.toString(), "read"))); + assertFalse(permissions.implies(new FilePermission(esHome.toString(), "read"))); // its parent assertFalse(permissions.implies(new FilePermission(path.toString(), "read"))); // some other sibling @@ -88,9 +88,8 @@ public class SecurityTests extends ElasticsearchTestCase { } // 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"))); + assertTrue(permissions.implies(new FilePermission(environment.binFile().toString(), "read"))); + assertTrue(permissions.implies(new FilePermission(environment.libFile().toString(), "read"))); // config file // TODO: make read-only assertTrue(permissions.implies(new FilePermission(environment.configFile().toString(), "read,readlink,write,delete"))); diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java index 3d771c70ce0..687a7d14dfb 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java @@ -85,7 +85,7 @@ public class PluginManagerTests extends ElasticsearchIntegrationTest { String pluginName = "plugin-test"; Tuple initialSettings = buildInitialSettings(); Environment env = initialSettings.v2(); - Path binDir = env.homeFile().resolve("bin"); + Path binDir = env.binFile(); if (!Files.exists(binDir)) { Files.createDirectories(binDir); } @@ -212,7 +212,7 @@ public class PluginManagerTests extends ElasticsearchIntegrationTest { String pluginName = "plugin-test"; Tuple initialSettings = buildInitialSettings(); Environment env = initialSettings.v2(); - Path binDir = env.homeFile().resolve("bin"); + Path binDir = env.binFile(); if (!Files.exists(binDir)) { Files.createDirectories(binDir); } From bcebb61f259a1d4361a415e7802647bcdd9b2859 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 22 Jul 2015 17:16:15 +0200 Subject: [PATCH 02/49] make fetch sub phases pluggable --- .../percolator/PercolateContext.java | 17 ++ .../elasticsearch/search/SearchModule.java | 12 +- .../search/fetch/FetchPhase.java | 15 +- .../search/fetch/FetchSubPhase.java | 7 + .../search/fetch/FetchSubPhaseContext.java | 24 ++ .../search/fetch/FetchSubPhaseModule.java | 64 ++++++ .../search/internal/DefaultSearchContext.java | 18 ++ .../internal/FilteredSearchContext.java | 12 + .../search/internal/SearchContext.java | 6 + .../fetch/FetchSubPhasePluginTests.java | 215 ++++++++++++++++++ .../elasticsearch/test/TestSearchContext.java | 21 +- 11 files changed, 393 insertions(+), 18 deletions(-) create mode 100644 core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java create mode 100644 core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java create mode 100644 core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java index e7d5c3fcb07..1fbcc0b9c0f 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,6 +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.FetchSubPhaseContext; import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.fetch.script.ScriptFieldsContext; @@ -116,6 +118,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 +285,20 @@ public class PercolateContext extends SearchContext { return this; } + @Override + public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + String subPhaseName = contextFactory.getName(); + if (subPhaseContexts.get(subPhaseName) == null) { + subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); + } + return subPhaseContexts.get(subPhaseName); + } + + @Override + public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + return subPhaseContexts.get(contextFactory.getName()) != null; + } + // Unused: @Override public void preProcess() { 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/fetch/FetchPhase.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java index 8e9782c3547..aad04fbfe5c 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,15 @@ 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 = new FetchSubPhase[fetchSubPhases.size() + 1]; + int counter = 0; + for (FetchSubPhase phase : fetchSubPhases) { + this.fetchSubPhases[counter] = phase; + counter++; + } + this.fetchSubPhases[counter] = 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..f841d2be3f2 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,11 @@ public interface FetchSubPhase { boolean hitsExecutionNeeded(SearchContext context); void hitsExecute(SearchContext context, InternalSearchHit[] hits); + + public interface ContextFactory { + + public String getName(); + + public FetchSubPhaseContext 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..907d20c52ee --- /dev/null +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java @@ -0,0 +1,24 @@ +/* + * 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; + +public interface FetchSubPhaseContext { + +} 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..ac89ad9d253 --- /dev/null +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java @@ -0,0 +1,64 @@ +/* + * 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; + +/** + * + */ +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 subPhase) { + fetchSubPhases.add(subPhase); + } + + @Override + protected void configure() { + Multibinder parserMapBinder = Multibinder.newSetBinder(binder(), FetchSubPhase.class); + for (Class clazz : fetchSubPhases) { + parserMapBinder.addBinding().to(clazz); + } + bind(InnerHitsFetchSubPhase.class).asEagerSingleton(); + } +} 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..f22c889f254 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java @@ -53,6 +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.FetchSubPhase; +import org.elasticsearch.search.fetch.FetchSubPhaseContext; import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.fetch.script.ScriptFieldsContext; @@ -126,6 +128,8 @@ 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, @@ -302,6 +306,15 @@ public class DefaultSearchContext extends SearchContext { return this; } + @Override + public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + String subPhaseName = contextFactory.getName(); + if (subPhaseContexts.get(subPhaseName) == null) { + subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); + } + return subPhaseContexts.get(subPhaseName); + } + @Override public SearchContextHighlight highlight() { return highlight; @@ -727,6 +740,11 @@ public class DefaultSearchContext extends SearchContext { return timeEstimateCounter; } + @Override + public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + return subPhaseContexts.get(contextFactory.getName()) != null; + } + @Override public void innerHits(InnerHitsContext innerHitsContext) { this.innerHitsContext = innerHitsContext; 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..12ed9f41342 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java @@ -45,6 +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.FetchSubPhase; +import org.elasticsearch.search.fetch.FetchSubPhaseContext; import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.fetch.script.ScriptFieldsContext; @@ -628,4 +630,14 @@ public abstract class FilteredSearchContext extends SearchContext { public void copyContextAndHeadersFrom(HasContextAndHeaders other) { in.copyContextAndHeadersFrom(other); } + + @Override + public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory subPhase) { + return in.getFetchSubPhaseContext(subPhase); + } + + @Override + public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + return in.hasFetchSubPhaseContext(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..0d96ae16412 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -50,6 +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.FetchSubPhase; +import org.elasticsearch.search.fetch.FetchSubPhaseContext; import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.fetch.script.ScriptFieldsContext; @@ -163,6 +165,8 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders public abstract SearchContext aggregations(SearchContextAggregations aggregations); + public abstract FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory); + public abstract SearchContextHighlight highlight(); public abstract void highlight(SearchContextHighlight highlight); @@ -360,6 +364,8 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders public abstract Counter timeEstimateCounter(); + public abstract boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory); + /** * The life time of an object that is used during search execution. */ diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java new file mode 100644 index 00000000000..df7cc6da5a9 --- /dev/null +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -0,0 +1,215 @@ +/* + * 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.ElasticsearchIntegrationTest; +import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope; +import org.elasticsearch.test.ElasticsearchIntegrationTest.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 FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { + + @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 FetchSubPhaseContext newContextInstance() { + return new TermVectorsFetchContext(); + } + }; + + public TermVectorsFetchSubPhase() { + } + + public static final String[] NAMES = {"term_vectors_fetch"}; + + @Override + public Map parseElements() { + ImmutableMap.Builder parseElements = ImmutableMap.builder(); + parseElements.put("term_vectors_fetch", new TermVectorsFetchParseElement()); + return parseElements.build(); + } + + @Override + public boolean hitsExecutionNeeded(SearchContext context) { + return false; + } + + @Override + public void hitsExecute(SearchContext context, InternalSearchHit[] hits) { + } + + @Override + public boolean hitExecutionNeeded(SearchContext context) { + return context.hasFetchSubPhaseContext(CONTEXT_FACTORY); + } + + @Override + public void hitExecute(SearchContext context, HitContext hitContext) { + String field = ((TermVectorsFetchContext) 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 implements SearchParseElement { + + @Override + public void parse(XContentParser parser, SearchContext context) throws Exception { + XContentParser.Token token = parser.currentToken(); + if (token == XContentParser.Token.VALUE_STRING) { + String fieldName = parser.text(); + ((TermVectorsFetchContext) context.getFetchSubPhaseContext(TermVectorsFetchSubPhase.CONTEXT_FACTORY)).setField(fieldName); + } else { + throw new IllegalStateException("Expected a VALUE_STRING but got " + token); + } + } + } + + public static class TermVectorsFetchContext implements 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/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java index a186bf43edf..c0a64ca2ea2 100644 --- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java +++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java @@ -48,6 +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.FetchSubPhase; +import org.elasticsearch.search.fetch.FetchSubPhaseContext; import org.elasticsearch.search.fetch.fielddata.FieldDataFieldsContext; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.fetch.script.ScriptFieldsContext; @@ -63,9 +65,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 +83,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 +204,20 @@ public class TestSearchContext extends SearchContext { return this; } + @Override + public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + String subPhaseName = contextFactory.getName(); + if (subPhaseContexts.get(subPhaseName) == null) { + subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); + } + return subPhaseContexts.get(subPhaseName); + } + + @Override + public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + return subPhaseContexts.get(contextFactory.getName()) != null; + } + @Override public SearchContextHighlight highlight() { return null; From 5f0f66908e85f2b63f5e3491d44e436f3b53f4a2 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 22 Jul 2015 17:42:49 +0200 Subject: [PATCH 03/49] make fielddata fields a plugin --- .../percolator/PercolateContext.java | 10 ---------- .../fielddata/FieldDataFieldsContext.java | 3 ++- .../FieldDataFieldsFetchSubPhase.java | 19 +++++++++++++++++-- .../FieldDataFieldsParseElement.java | 5 +++-- .../search/internal/DefaultSearchContext.java | 13 ------------- .../internal/FilteredSearchContext.java | 10 ---------- .../search/internal/SearchContext.java | 4 ---- .../search/internal/SubSearchContext.java | 13 ------------- .../elasticsearch/test/TestSearchContext.java | 10 ---------- 9 files changed, 22 insertions(+), 65 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java index 1fbcc0b9c0f..1a18f021597 100644 --- a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java +++ b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java @@ -395,16 +395,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/search/fetch/fielddata/FieldDataFieldsContext.java b/core/src/main/java/org/elasticsearch/search/fetch/fielddata/FieldDataFieldsContext.java index aebed3956a0..14c389785b8 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 implements 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..0ff61e7bb3e 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 FetchSubPhaseContext 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.hasFetchSubPhaseContext(CONTEXT_FACTORY); } @Override public void hitExecute(SearchContext context, HitContext hitContext) { - for (FieldDataFieldsContext.FieldDataField field : context.fieldDataFields().fields()) { + for (FieldDataFieldsContext.FieldDataField field : ((FieldDataFieldsContext)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..2088de6aa86 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 @@ -36,15 +36,16 @@ import org.elasticsearch.search.internal.SearchContext; public class FieldDataFieldsParseElement implements SearchParseElement { @Override public void parse(XContentParser parser, SearchContext context) throws Exception { + FieldDataFieldsContext fieldDataFieldsContext = (FieldDataFieldsContext)context.getFetchSubPhaseContext(FieldDataFieldsFetchSubPhase.CONTEXT_FACTORY); 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)); + fieldDataFieldsContext.add(new FieldDataFieldsContext.FieldDataField(fieldName)); } else { throw new IllegalStateException("Expected either a VALUE_STRING or an START_ARRAY but got " + token); } 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 f22c889f254..f178f94bb00 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java @@ -351,19 +351,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 12ed9f41342..ac17aca1ec1 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java @@ -211,16 +211,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(); 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 0d96ae16412..8829c697d72 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -186,10 +186,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..b8e8344494d 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SubSearchContext.java @@ -132,19 +132,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/elasticsearch/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java index c0a64ca2ea2..fc0d2e0fba3 100644 --- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java +++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java @@ -245,16 +245,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; From df339f4cb9597e38fc241e7084d036d3d92647d8 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Sun, 26 Jul 2015 22:54:10 +0200 Subject: [PATCH 04/49] toArray --- .../java/org/elasticsearch/search/fetch/FetchPhase.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 aad04fbfe5c..81f13c32727 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchPhase.java @@ -86,13 +86,8 @@ public class FetchPhase implements SearchPhase { @Inject public FetchPhase(Set fetchSubPhases, InnerHitsFetchSubPhase innerHitsFetchSubPhase) { innerHitsFetchSubPhase.setFetchPhase(this); - this.fetchSubPhases = new FetchSubPhase[fetchSubPhases.size() + 1]; - int counter = 0; - for (FetchSubPhase phase : fetchSubPhases) { - this.fetchSubPhases[counter] = phase; - counter++; - } - this.fetchSubPhases[counter] = innerHitsFetchSubPhase; + this.fetchSubPhases = fetchSubPhases.toArray(new FetchSubPhase[fetchSubPhases.size() + 1]); + this.fetchSubPhases[fetchSubPhases.size()] = innerHitsFetchSubPhase; } @Override From ea14f675b23b7a6212742ff9c0e51d20b36b3e08 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Mon, 27 Jul 2015 00:38:47 +0200 Subject: [PATCH 05/49] remove hasFetchSubPhaseContext --- .../percolator/PercolateContext.java | 5 --- .../search/fetch/FetchSubPhaseContext.java | 12 +++++- .../fetch/FetchSubPhaseParseElement.java | 38 +++++++++++++++++++ .../fielddata/FieldDataFieldsContext.java | 2 +- .../FieldDataFieldsFetchSubPhase.java | 2 +- .../FieldDataFieldsParseElement.java | 19 +++++++--- .../search/internal/DefaultSearchContext.java | 5 --- .../internal/FilteredSearchContext.java | 5 --- .../search/internal/SearchContext.java | 2 - .../fetch/FetchSubPhasePluginTests.java | 16 +++++--- .../elasticsearch/test/TestSearchContext.java | 5 --- 11 files changed, 76 insertions(+), 35 deletions(-) create mode 100644 core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java index 1a18f021597..c1b357e9b28 100644 --- a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java +++ b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java @@ -294,11 +294,6 @@ public class PercolateContext extends SearchContext { return subPhaseContexts.get(subPhaseName); } - @Override - public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { - return subPhaseContexts.get(contextFactory.getName()) != null; - } - // Unused: @Override public void preProcess() { diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java index 907d20c52ee..17125b42bcf 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java @@ -19,6 +19,16 @@ package org.elasticsearch.search.fetch; -public interface FetchSubPhaseContext { +public class FetchSubPhaseContext { + + private boolean hitExecutionNeeded = false; + + void setHitExecutionNeeded(boolean hitExecutionNeeded) { + this.hitExecutionNeeded = hitExecutionNeeded; + } + + public boolean hitExecutionNeeded() { + return hitExecutionNeeded; + } } 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..6e35b54bd64 --- /dev/null +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java @@ -0,0 +1,38 @@ +/* + * 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; + +public abstract class FetchSubPhaseParseElement implements SearchParseElement { + + @Override + public void parse(XContentParser parser, SearchContext context) throws Exception { + FetchSubPhaseContext fetchSubPhaseContext = context.getFetchSubPhaseContext(getContextFactory()); + fetchSubPhaseContext.setHitExecutionNeeded(true); + innerParse(parser, fetchSubPhaseContext); + } + + protected abstract void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception; + + 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 14c389785b8..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 @@ -26,7 +26,7 @@ import java.util.List; /** * All the required context to pull a field from the field data cache. */ -public class FieldDataFieldsContext implements FetchSubPhaseContext{ +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 0ff61e7bb3e..0c4e6d2cfa0 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 @@ -81,7 +81,7 @@ public class FieldDataFieldsFetchSubPhase implements FetchSubPhase { @Override public boolean hitExecutionNeeded(SearchContext context) { - return context.hasFetchSubPhaseContext(CONTEXT_FACTORY); + return context.getFetchSubPhaseContext(CONTEXT_FACTORY).hitExecutionNeeded(); } @Override 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 2088de6aa86..993a2c45252 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,10 +36,11 @@ 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 { - FieldDataFieldsContext fieldDataFieldsContext = (FieldDataFieldsContext)context.getFetchSubPhaseContext(FieldDataFieldsFetchSubPhase.CONTEXT_FACTORY); + protected void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception { + FieldDataFieldsContext fieldDataFieldsContext = (FieldDataFieldsContext) fetchSubPhaseContext; XContentParser.Token token = parser.currentToken(); if (token == XContentParser.Token.START_ARRAY) { while (parser.nextToken() != XContentParser.Token.END_ARRAY) { @@ -46,8 +50,13 @@ public class FieldDataFieldsParseElement implements SearchParseElement { } else if (token == XContentParser.Token.VALUE_STRING) { String fieldName = parser.text(); fieldDataFieldsContext.add(new FieldDataFieldsContext.FieldDataField(fieldName)); - } else { + } 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 f178f94bb00..5914b31c742 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java @@ -727,11 +727,6 @@ public class DefaultSearchContext extends SearchContext { return timeEstimateCounter; } - @Override - public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { - return subPhaseContexts.get(contextFactory.getName()) != null; - } - @Override public void innerHits(InnerHitsContext innerHitsContext) { this.innerHitsContext = innerHitsContext; 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 ac17aca1ec1..98874ba0048 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java @@ -625,9 +625,4 @@ public abstract class FilteredSearchContext extends SearchContext { public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory subPhase) { return in.getFetchSubPhaseContext(subPhase); } - - @Override - public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { - return in.hasFetchSubPhaseContext(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 8829c697d72..b9d16b1ab27 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -360,8 +360,6 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders public abstract Counter timeEstimateCounter(); - public abstract boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory); - /** * The life time of an object that is used during search execution. */ diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java index df7cc6da5a9..29af400ba58 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -153,7 +153,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { @Override public boolean hitExecutionNeeded(SearchContext context) { - return context.hasFetchSubPhaseContext(CONTEXT_FACTORY); + return context.getFetchSubPhaseContext(CONTEXT_FACTORY).hitExecutionNeeded(); } @Override @@ -183,21 +183,27 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { } } - public static class TermVectorsFetchParseElement implements SearchParseElement { + public static class TermVectorsFetchParseElement extends FetchSubPhaseParseElement { @Override - public void parse(XContentParser parser, SearchContext context) throws Exception { + protected void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception { XContentParser.Token token = parser.currentToken(); + TermVectorsFetchContext termVectorsFetchContext = (TermVectorsFetchContext) fetchSubPhaseContext; if (token == XContentParser.Token.VALUE_STRING) { String fieldName = parser.text(); - ((TermVectorsFetchContext) context.getFetchSubPhaseContext(TermVectorsFetchSubPhase.CONTEXT_FACTORY)).setField(fieldName); + 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 implements FetchSubPhaseContext { + public static class TermVectorsFetchContext extends FetchSubPhaseContext { private String field = null; diff --git a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java index fc0d2e0fba3..9c4d0c34d40 100644 --- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java +++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java @@ -213,11 +213,6 @@ public class TestSearchContext extends SearchContext { return subPhaseContexts.get(subPhaseName); } - @Override - public boolean hasFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { - return subPhaseContexts.get(contextFactory.getName()) != null; - } - @Override public SearchContextHighlight highlight() { return null; From 3ee3238d54bcbb3ae99e964278c95cef4783b2f2 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Mon, 27 Jul 2015 11:10:06 +0200 Subject: [PATCH 06/49] remove unused imports and vars --- .../java/org/elasticsearch/percolator/PercolateContext.java | 1 - .../org/elasticsearch/search/internal/DefaultSearchContext.java | 2 -- .../elasticsearch/search/internal/FilteredSearchContext.java | 1 - .../java/org/elasticsearch/search/internal/SearchContext.java | 1 - .../org/elasticsearch/search/internal/SubSearchContext.java | 2 -- .../src/test/java/org/elasticsearch/test/TestSearchContext.java | 1 - 6 files changed, 8 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java index c1b357e9b28..79d07c0e1f0 100644 --- a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java +++ b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java @@ -60,7 +60,6 @@ import org.elasticsearch.search.dfs.DfsSearchResult; import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.fetch.FetchSubPhase; import org.elasticsearch.search.fetch.FetchSubPhaseContext; -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; 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 5914b31c742..f1573b2e23d 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java @@ -55,7 +55,6 @@ import org.elasticsearch.search.dfs.DfsSearchResult; import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.fetch.FetchSubPhase; import org.elasticsearch.search.fetch.FetchSubPhaseContext; -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; @@ -101,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; 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 98874ba0048..fa88cfcfdc6 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java @@ -47,7 +47,6 @@ import org.elasticsearch.search.dfs.DfsSearchResult; import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.fetch.FetchSubPhase; import org.elasticsearch.search.fetch.FetchSubPhaseContext; -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; 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 b9d16b1ab27..1ab98b9d21a 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -52,7 +52,6 @@ import org.elasticsearch.search.dfs.DfsSearchResult; import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.fetch.FetchSubPhase; import org.elasticsearch.search.fetch.FetchSubPhaseContext; -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; 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 b8e8344494d..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; diff --git a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java index 9c4d0c34d40..979d8afdb0e 100644 --- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java +++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java @@ -50,7 +50,6 @@ import org.elasticsearch.search.dfs.DfsSearchResult; import org.elasticsearch.search.fetch.FetchSearchResult; import org.elasticsearch.search.fetch.FetchSubPhase; import org.elasticsearch.search.fetch.FetchSubPhaseContext; -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; From 24c4b279785c701f831955cae94e641a9c8c5091 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Mon, 27 Jul 2015 11:54:12 +0200 Subject: [PATCH 07/49] add some documentation --- .../elasticsearch/search/fetch/FetchSubPhase.java | 12 ++++++++++++ .../search/fetch/FetchSubPhaseContext.java | 12 ++++++++++++ .../search/fetch/FetchSubPhaseModule.java | 12 +++++++++++- .../search/fetch/FetchSubPhaseParseElement.java | 12 +++++++++++- 4 files changed, 46 insertions(+), 2 deletions(-) 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 f841d2be3f2..6005313ad29 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java @@ -115,10 +115,22 @@ public interface FetchSubPhase { 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 FetchSubPhaseContext 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 index 17125b42bcf..90df2f1ef0e 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java @@ -19,14 +19,26 @@ package org.elasticsearch.search.fetch; +/** + * This class stores if or if not a FetchSubPhase is supposed to execute. + * It 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 index ac89ad9d253..e01de72b232 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseModule.java @@ -33,7 +33,17 @@ 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)}. + * See {@link FieldDataFieldsFetchSubPhase} for an example. */ public class FetchSubPhaseModule extends AbstractModule { diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java index 6e35b54bd64..3a6518aec04 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java @@ -23,16 +23,26 @@ 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 - public void parse(XContentParser parser, SearchContext context) throws Exception { + final public void parse(XContentParser parser, SearchContext context) throws Exception { FetchSubPhaseContext fetchSubPhaseContext = context.getFetchSubPhaseContext(getContextFactory()); + // this is to make sure that the SubFetchPhase knows it should execute fetchSubPhaseContext.setHitExecutionNeeded(true); innerParse(parser, fetchSubPhaseContext); } + /** + * Implement the actual parsing here. + */ protected abstract void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception; + /** + * Return the ContextFactory for this FetchSubPhase. + */ protected abstract FetchSubPhase.ContextFactory getContextFactory(); } From 6295738d4ca853e33ba753f805b3a74274b921fe Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 29 Jul 2015 16:00:37 +0200 Subject: [PATCH 08/49] make Context generic so we don't have to cast --- .../org/elasticsearch/search/fetch/FetchSubPhase.java | 4 ++-- .../search/fetch/FetchSubPhaseParseElement.java | 8 ++++---- .../fetch/fielddata/FieldDataFieldsParseElement.java | 5 ++--- .../org/elasticsearch/search/internal/SearchContext.java | 2 +- .../search/fetch/FetchSubPhasePluginTests.java | 5 ++--- 5 files changed, 11 insertions(+), 13 deletions(-) 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 6005313ad29..91cc7034401 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhase.java @@ -121,7 +121,7 @@ public interface 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 { + public interface ContextFactory { /** * The name of the context. @@ -131,6 +131,6 @@ public interface FetchSubPhase { /** * Creates a new instance of a FetchSubPhaseContext that holds all information a FetchSubPhase needs to execute on hits. */ - public FetchSubPhaseContext newContextInstance(); + public SubPhaseContext newContextInstance(); } } diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java index 3a6518aec04..849b4d1b7c0 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java @@ -26,11 +26,11 @@ 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 { +public abstract class FetchSubPhaseParseElement implements SearchParseElement { @Override final public void parse(XContentParser parser, SearchContext context) throws Exception { - FetchSubPhaseContext fetchSubPhaseContext = context.getFetchSubPhaseContext(getContextFactory()); + SubPhaseContext fetchSubPhaseContext = context.getFetchSubPhaseContext(getContextFactory()); // this is to make sure that the SubFetchPhase knows it should execute fetchSubPhaseContext.setHitExecutionNeeded(true); innerParse(parser, fetchSubPhaseContext); @@ -39,10 +39,10 @@ public abstract class FetchSubPhaseParseElement implements SearchParseElement { /** * Implement the actual parsing here. */ - protected abstract void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception; + protected abstract void innerParse(XContentParser parser, SubPhaseContext fetchSubPhaseContext) throws Exception; /** * Return the ContextFactory for this FetchSubPhase. */ - protected abstract FetchSubPhase.ContextFactory getContextFactory(); + protected abstract FetchSubPhase.ContextFactory getContextFactory(); } 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 993a2c45252..689fd123ee2 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 @@ -36,11 +36,10 @@ import org.elasticsearch.search.internal.SearchContext; * } * */ -public class FieldDataFieldsParseElement extends FetchSubPhaseParseElement { +public class FieldDataFieldsParseElement extends FetchSubPhaseParseElement { @Override - protected void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception { - FieldDataFieldsContext fieldDataFieldsContext = (FieldDataFieldsContext) fetchSubPhaseContext; + protected void innerParse(XContentParser parser, FieldDataFieldsContext fieldDataFieldsContext) throws Exception { XContentParser.Token token = parser.currentToken(); if (token == XContentParser.Token.START_ARRAY) { while (parser.nextToken() != XContentParser.Token.END_ARRAY) { 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 1ab98b9d21a..901b721c3b5 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/SearchContext.java @@ -164,7 +164,7 @@ public abstract class SearchContext implements Releasable, HasContextAndHeaders public abstract SearchContext aggregations(SearchContextAggregations aggregations); - public abstract FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory); + public abstract SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory); public abstract SearchContextHighlight highlight(); diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java index 29af400ba58..12a11efa3a6 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -183,12 +183,11 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { } } - public static class TermVectorsFetchParseElement extends FetchSubPhaseParseElement { + public static class TermVectorsFetchParseElement extends FetchSubPhaseParseElement { @Override - protected void innerParse(XContentParser parser, FetchSubPhaseContext fetchSubPhaseContext) throws Exception { + protected void innerParse(XContentParser parser, TermVectorsFetchContext termVectorsFetchContext) throws Exception { XContentParser.Token token = parser.currentToken(); - TermVectorsFetchContext termVectorsFetchContext = (TermVectorsFetchContext) fetchSubPhaseContext; if (token == XContentParser.Token.VALUE_STRING) { String fieldName = parser.text(); termVectorsFetchContext.setField(fieldName); From d113b59e8644633af6543f8d7c5110adc4498563 Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 29 Jul 2015 16:06:40 +0200 Subject: [PATCH 09/49] add SearchContext to innerParse method --- .../elasticsearch/search/fetch/FetchSubPhaseParseElement.java | 4 ++-- .../search/fetch/fielddata/FieldDataFieldsParseElement.java | 2 +- .../elasticsearch/search/fetch/FetchSubPhasePluginTests.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java index 849b4d1b7c0..f43ed68d769 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseParseElement.java @@ -33,13 +33,13 @@ public abstract class FetchSubPhaseParseElement { @Override - protected void innerParse(XContentParser parser, FieldDataFieldsContext fieldDataFieldsContext) 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) { diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java index 12a11efa3a6..d713d99774e 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -186,7 +186,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { public static class TermVectorsFetchParseElement extends FetchSubPhaseParseElement { @Override - protected void innerParse(XContentParser parser, TermVectorsFetchContext termVectorsFetchContext) throws Exception { + 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(); From 6754a26d08c3f5b5ffd2f35c9fdd90f07778b92d Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 29 Jul 2015 16:46:13 +0200 Subject: [PATCH 10/49] more generic? --- .../fetch/fielddata/FieldDataFieldsFetchSubPhase.java | 6 +++--- .../search/fetch/FetchSubPhasePluginTests.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 0c4e6d2cfa0..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 @@ -45,7 +45,7 @@ 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() { + public static final ContextFactory CONTEXT_FACTORY = new ContextFactory() { @Override public String getName() { @@ -53,7 +53,7 @@ public class FieldDataFieldsFetchSubPhase implements FetchSubPhase { } @Override - public FetchSubPhaseContext newContextInstance() { + public FieldDataFieldsContext newContextInstance() { return new FieldDataFieldsContext(); } }; @@ -86,7 +86,7 @@ public class FieldDataFieldsFetchSubPhase implements FetchSubPhase { @Override public void hitExecute(SearchContext context, HitContext hitContext) { - for (FieldDataFieldsContext.FieldDataField field : ((FieldDataFieldsContext)context.getFetchSubPhaseContext(CONTEXT_FACTORY)).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/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java index d713d99774e..5579768ac9f 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -117,7 +117,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { public static class TermVectorsFetchSubPhase implements FetchSubPhase { - public static final ContextFactory CONTEXT_FACTORY = new ContextFactory() { + public static final ContextFactory CONTEXT_FACTORY = new ContextFactory() { @Override public String getName() { @@ -125,7 +125,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { } @Override - public FetchSubPhaseContext newContextInstance() { + public TermVectorsFetchContext newContextInstance() { return new TermVectorsFetchContext(); } }; @@ -158,7 +158,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { @Override public void hitExecute(SearchContext context, HitContext hitContext) { - String field = ((TermVectorsFetchContext) context.getFetchSubPhaseContext(CONTEXT_FACTORY)).getField(); + String field = context.getFetchSubPhaseContext(CONTEXT_FACTORY).getField(); if (hitContext.hit().fieldsOrNull() == null) { hitContext.hit().fields(new HashMap()); From b86d07fc9a55c5a103fbce29f20b6493871d6d2b Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Wed, 29 Jul 2015 17:20:06 +0200 Subject: [PATCH 11/49] generic for sub classes also? --- .../elasticsearch/percolator/PercolateContext.java | 4 ++-- .../search/internal/DefaultSearchContext.java | 13 +++++++------ .../search/internal/FilteredSearchContext.java | 4 ++-- .../org/elasticsearch/test/TestSearchContext.java | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java index 79d07c0e1f0..bf3b060db12 100644 --- a/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java +++ b/core/src/main/java/org/elasticsearch/percolator/PercolateContext.java @@ -285,12 +285,12 @@ public class PercolateContext extends SearchContext { } @Override - public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { String subPhaseName = contextFactory.getName(); if (subPhaseContexts.get(subPhaseName) == null) { subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); } - return subPhaseContexts.get(subPhaseName); + return (SubPhaseContext) subPhaseContexts.get(subPhaseName); } // Unused: 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 f1573b2e23d..f420986272d 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java @@ -129,10 +129,10 @@ public class DefaultSearchContext extends SearchContext { 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; @@ -305,14 +305,15 @@ public class DefaultSearchContext extends SearchContext { } @Override - public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { String subPhaseName = contextFactory.getName(); if (subPhaseContexts.get(subPhaseName) == null) { subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); } - return subPhaseContexts.get(subPhaseName); + return (SubPhaseContext) subPhaseContexts.get(subPhaseName); } + @Override public SearchContextHighlight highlight() { return highlight; 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 fa88cfcfdc6..c22842e7093 100644 --- a/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java +++ b/core/src/main/java/org/elasticsearch/search/internal/FilteredSearchContext.java @@ -621,7 +621,7 @@ public abstract class FilteredSearchContext extends SearchContext { } @Override - public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory subPhase) { - return in.getFetchSubPhaseContext(subPhase); + public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + return in.getFetchSubPhaseContext(contextFactory); } } diff --git a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java index 979d8afdb0e..44004fe6f48 100644 --- a/core/src/test/java/org/elasticsearch/test/TestSearchContext.java +++ b/core/src/test/java/org/elasticsearch/test/TestSearchContext.java @@ -204,12 +204,12 @@ public class TestSearchContext extends SearchContext { } @Override - public FetchSubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { + public SubPhaseContext getFetchSubPhaseContext(FetchSubPhase.ContextFactory contextFactory) { String subPhaseName = contextFactory.getName(); if (subPhaseContexts.get(subPhaseName) == null) { subPhaseContexts.put(subPhaseName, contextFactory.newContextInstance()); } - return subPhaseContexts.get(subPhaseName); + return (SubPhaseContext) subPhaseContexts.get(subPhaseName); } @Override From 8a4957967b0faaab1921e25e00ad67153f75256d Mon Sep 17 00:00:00 2001 From: Britta Weber Date: Thu, 30 Jul 2015 17:47:21 +0200 Subject: [PATCH 12/49] more review comments --- .../org/elasticsearch/search/fetch/FetchSubPhaseContext.java | 5 +++-- .../elasticsearch/search/fetch/FetchSubPhasePluginTests.java | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java index 90df2f1ef0e..237f43519fa 100644 --- a/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java +++ b/core/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseContext.java @@ -20,8 +20,9 @@ package org.elasticsearch.search.fetch; /** - * This class stores if or if not a FetchSubPhase is supposed to execute. - * It be extended by FetchSubPhases to hold information the phase needs to execute on hits. + * 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 { diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java index 5579768ac9f..a4263b20f9c 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java @@ -137,9 +137,7 @@ public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { @Override public Map parseElements() { - ImmutableMap.Builder parseElements = ImmutableMap.builder(); - parseElements.put("term_vectors_fetch", new TermVectorsFetchParseElement()); - return parseElements.build(); + return ImmutableMap.of("term_vectors_fetch", new TermVectorsFetchParseElement()); } @Override From 5f9edd26eaa138acbb43196a7c952b43820a5d39 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 31 Jul 2015 14:00:18 -0400 Subject: [PATCH 13/49] Fix Bootstrap to not call System.exit Its not going to work: its blocked by security policy and will just add a confusing SecurityException to the mix, and bogusly give an exit status of 0 when in fact something bad happened. Finally, if ES can't startup, it is a serious problem, there is no sense in hiding the reason why: deliver the full stack trace. --- .../elasticsearch/bootstrap/Bootstrap.java | 71 +++---------------- .../bootstrap/Elasticsearch.java | 2 +- .../bootstrap/ElasticsearchF.java | 2 +- 3 files changed, 11 insertions(+), 64 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java index d110942388f..3b97749c084 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 Exception { 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..e996e5ae651 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 Exception { 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..1fb1dcc9d8a 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 Exception { System.setProperty("es.foreground", "yes"); Bootstrap.main(args); } From d173b89d11d41a7a65692000298bf18b8cda8695 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 31 Jul 2015 14:13:00 -0400 Subject: [PATCH 14/49] make this less syntactically confusing --- core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java | 2 +- .../main/java/org/elasticsearch/bootstrap/Elasticsearch.java | 2 +- .../main/java/org/elasticsearch/bootstrap/ElasticsearchF.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java b/core/src/main/java/org/elasticsearch/bootstrap/Bootstrap.java index 3b97749c084..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) throws Exception { + public static void main(String[] args) throws Throwable { BootstrapCLIParser bootstrapCLIParser = new BootstrapCLIParser(); CliTool.ExitStatus status = bootstrapCLIParser.execute(args); diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java b/core/src/main/java/org/elasticsearch/bootstrap/Elasticsearch.java index e996e5ae651..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) throws Exception { + 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 1fb1dcc9d8a..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) throws Exception { + public static void main(String[] args) throws Throwable { System.setProperty("es.foreground", "yes"); Bootstrap.main(args); } From fef55348f9d29989e273b7090a153d6e26da876f Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 1 Aug 2015 09:10:03 -0400 Subject: [PATCH 15/49] clean up .zip handling so its not uselessly downloaded in the build --- .../main/resources/ant/integration-tests.xml | 20 +++++++++---- distribution/zip/pom.xml | 2 +- plugins/pom.xml | 29 ++++++++++++++++++ pom.xml | 30 ------------------- 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index a8cb9912dd3..6a391397d4f 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 @@ + + + + + + + + + + + + + + diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml index dd0621b2e04..8988eb6562a 100644 --- a/distribution/zip/pom.xml +++ b/distribution/zip/pom.xml @@ -88,7 +88,7 @@ ${skip.integ.tests} - + diff --git a/plugins/pom.xml b/plugins/pom.xml index 8c0e845841a..16416092aa1 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -371,6 +371,35 @@ + + 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} + + + + diff --git a/pom.xml b/pom.xml index 416f8a5e2ca..b6381a66813 100644 --- a/pom.xml +++ b/pom.xml @@ -908,36 +908,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} - - - - From 6f33ea4f628a979c67251fbda6010ca0b47adf1b Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 1 Aug 2015 11:37:43 -0400 Subject: [PATCH 16/49] move shading to distribution/shaded --- core/pom.xml | 113 ---------------------------- distribution/pom.xml | 1 + distribution/shaded/pom.xml | 142 ++++++++++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+), 113 deletions(-) create mode 100644 distribution/shaded/pom.xml diff --git a/core/pom.xml b/core/pom.xml index def0b5e14f0..b1fb4ae6f3c 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -297,119 +297,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/distribution/pom.xml b/distribution/pom.xml index 2c68cee7946..6d02e1eb8e5 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -185,6 +185,7 @@ + shaded tar zip deb diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml new file mode 100644 index 00000000000..31bfbe419f0 --- /dev/null +++ b/distribution/shaded/pom.xml @@ -0,0 +1,142 @@ + + + 4.0.0 + + org.elasticsearch.distribution + elasticsearch-distribution + 2.0.0-beta1-SNAPSHOT + + + elasticsearch-shaded + Elasticsearch Shaded Distribution + + + true + + + + ${project.artifactId}-${project.version} + + ${project.basedir}/../src/main/packaging/packaging.properties + + + + + org.apache.maven.plugins + maven-jar-plugin + + + true + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + false + false + true + false + + + org.elasticsearch:elasticsearch + 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 + + + + + + + + From eaaa06b6b39f8dff4c5822b2e514619daff705b2 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 1 Aug 2015 12:44:00 -0400 Subject: [PATCH 17/49] fix shading to create correct POM and not drag in wacky dependencies --- distribution/shaded/pom.xml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml index 31bfbe419f0..72ddd7c2216 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -3,25 +3,32 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + - org.elasticsearch.distribution - elasticsearch-distribution + org.elasticsearch + elasticsearch-parent 2.0.0-beta1-SNAPSHOT + org.elasticsearch.distribution elasticsearch-shaded Elasticsearch Shaded Distribution + 2.0.0-beta1-SNAPSHOT - true + true + + + org.elasticsearch + elasticsearch + ${elasticsearch.version} + + + ${project.artifactId}-${project.version} - - ${project.basedir}/../src/main/packaging/packaging.properties - - org.apache.maven.plugins @@ -31,6 +38,13 @@ true + + org.apache.maven.plugins + maven-shade-plugin + + + + org.apache.maven.plugins maven-shade-plugin @@ -46,7 +60,8 @@ false false true - false + true + ${build.directory}/dependency-reduced-pom.xml org.elasticsearch:elasticsearch @@ -137,6 +152,7 @@ - + + From aaf0976cb7478bebf7839072ebf22dc6e8b30dfc Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 1 Aug 2015 14:02:14 -0400 Subject: [PATCH 18/49] clear up dependency hell a bit more --- distribution/deb/pom.xml | 9 +++ distribution/fully-loaded/pom.xml | 72 +++++++++++++++++++ distribution/pom.xml | 51 +------------ distribution/rpm/pom.xml | 9 +++ distribution/shaded/pom.xml | 11 +-- .../src/main/assemblies/common-bin.xml | 40 ++--------- distribution/tar/pom.xml | 9 +++ distribution/zip/pom.xml | 9 +++ 8 files changed, 119 insertions(+), 91 deletions(-) create mode 100644 distribution/fully-loaded/pom.xml 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/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 6d02e1eb8e5..2be257222fd 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 @@ -185,6 +137,7 @@ + fully-loaded shaded tar zip 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/shaded/pom.xml b/distribution/shaded/pom.xml index 72ddd7c2216..770862ce2fe 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -3,21 +3,14 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - - org.elasticsearch - elasticsearch-parent + org.elasticsearch.distribution + elasticsearch-distribution 2.0.0-beta1-SNAPSHOT - org.elasticsearch.distribution elasticsearch-shaded Elasticsearch Shaded Distribution - 2.0.0-beta1-SNAPSHOT - - - true - 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/zip/pom.xml b/distribution/zip/pom.xml index 8988eb6562a..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 From b3a7f25404c96c31a07706b1e69953fb68ea46d2 Mon Sep 17 00:00:00 2001 From: kakakakakku Date: Sun, 2 Aug 2015 12:39:40 +0900 Subject: [PATCH 19/49] Fixed official api name in docs --- docs/reference/modules/plugins.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 35d947b5245ff3247a5f415a49b7c705832676ed Mon Sep 17 00:00:00 2001 From: szroland Date: Tue, 16 Jun 2015 02:35:19 +0200 Subject: [PATCH 20/49] Add option to `_cat/indices` to return index creation date #11524 Returning index creation date, both as a numeric millisecond value and as a string. This implements #11524 --- .../elasticsearch/rest/action/cat/RestIndicesAction.java | 7 +++++++ 1 file changed, 7 insertions(+) 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..36f044ff117 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,7 @@ 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 java.util.Locale; @@ -112,6 +113,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 +324,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())); + table.addCell(indexStats == null ? null : indexStats.getTotal().getStore().size()); table.addCell(indexStats == null ? null : indexStats.getPrimaries().getStore().size()); From 742607ec9bf8f9c75a39a6b8ebc5cac94e9a9305 Mon Sep 17 00:00:00 2001 From: szroland Date: Sun, 21 Jun 2015 10:33:45 +0200 Subject: [PATCH 21/49] using default timezone explicitly --- .../org/elasticsearch/rest/action/cat/RestIndicesAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 36f044ff117..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 @@ -43,6 +43,7 @@ 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; @@ -325,7 +326,7 @@ public class RestIndicesAction extends AbstractCatAction { table.addCell(indexStats == null ? null : indexStats.getPrimaries().getDocs().getDeleted()); table.addCell(indexMetaData.creationDate()); - table.addCell(new DateTime(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()); From 9bb904b155e2586b844ff5ddd3274dc7a25dbb24 Mon Sep 17 00:00:00 2001 From: szroland Date: Sun, 21 Jun 2015 10:34:44 +0200 Subject: [PATCH 22/49] testing output, both with default field names and shorthand aliases --- .../rest-api-spec/test/cat.indices/10_basic.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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..7fdec1212f8 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\d T\d\d:\d\d:\d\d.\d\d\d\+\d\d:\d\d) \s+ + (\d+) \s+ + (\d\d\d\d\-\d\d\-\d\d T\d\d:\d\d:\d\d.\d\d\d\+\d\d:\d\d) \s* + ) + $/ From 94f8b8f2cf5fde8e3c9cf66e85c2d1cfae32579c Mon Sep 17 00:00:00 2001 From: szroland Date: Sun, 2 Aug 2015 21:52:00 +0200 Subject: [PATCH 23/49] remove extra space in test regexp --- .../resources/rest-api-spec/test/cat.indices/10_basic.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 7fdec1212f8..c4265f39376 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 @@ -46,8 +46,8 @@ /^( index1 \s+ (\d+) \s+ - (\d\d\d\d\-\d\d\-\d\d T\d\d:\d\d:\d\d.\d\d\d\+\d\d:\d\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\d T\d\d:\d\d:\d\d.\d\d\d\+\d\d:\d\d) \s* + (\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d\+\d\d:\d\d) \s* ) $/ From a5a27a5cd9182d7f44196b8c1e89332d46b270a1 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 05:54:55 -0400 Subject: [PATCH 24/49] Add jar hell check test for the shaded jar --- .../org/elasticsearch/bootstrap/JarHell.java | 3 +++ .../main/resources/ant/integration-tests.xml | 10 ++++++++++ distribution/shaded/pom.xml | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+) 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/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index 6a391397d4f..2582cab3c6c 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -276,4 +276,14 @@ + + + + + + + + + + diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml index 770862ce2fe..9b1d7b08963 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -38,6 +38,24 @@ + + org.apache.maven.plugins + maven-antrun-plugin + + + check-for-jar-hell + integration-test + + run + + + + + + + + + org.apache.maven.plugins maven-shade-plugin From ade3881152c71d56f83240d88e7f26b985bac1fd Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Mon, 3 Aug 2015 09:06:14 +0100 Subject: [PATCH 25/49] Aggregations: Full path validation for pipeline aggregations Previously only the first aggregation in a buckets_path was check to make sure the aggregation existed. Now the whole path is checked to ensure an aggregation exists at each element in the buckets_path Closes #12360 --- .../aggregations/AggregatorFactories.java | 60 +++++++++++++++---- .../pipeline/PipelineAggregatorFactory.java | 12 ++-- .../pipeline/DerivativeTests.java | 48 +++++++++++++-- 3 files changed, 102 insertions(+), 18 deletions(-) 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/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java index a95364393aa..d587b17e309 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeTests.java @@ -19,15 +19,18 @@ 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; @@ -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; @@ -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()); From 365a324fc51eb7d5b5bda8d2c889f149a8198b0a Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Mon, 3 Aug 2015 12:55:15 +0200 Subject: [PATCH 26/49] Tests: Add more logging to SearchPreferenceTests so that we can know which preference is failing. --- .../elasticsearch/search/preference/SearchPreferenceTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java index dc125558209..452e421ab8f 100644 --- a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java +++ b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java @@ -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)); From 1eaa9f9fda3ce7466fe56f4afb4d374026c9febd Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Mon, 3 Aug 2015 14:11:49 +0200 Subject: [PATCH 27/49] Fix concurrency issue in PrioritizedEsThreadPoolExecutor. Tasks can be registered with a timeout, which runs as a task in a separate threadpool. The idea is that the timeout runner cancels the main task when the time is out, and the timeout runner is cancelled when the main task starts executing. However, the following statement: ```java timeoutFuture = timer.schedule(new Runnable() { @Override public void run() { if (remove(TieBreakingPrioritizedRunnable.this)) { runAndClean(timeoutCallback); } } }, timeValue.nanos(), TimeUnit.NANOSECONDS); ``` is not atomic: the removal task is first started, and then the (volatile) variable is assigned. As a consequence, there is a short window that allows a timeout task to wait until the time is out even if the task is already completed. See http://build-us-00.elastic.co/job/es_core_17_centos/496/ for an example of such a failure. --- .../PrioritizedEsThreadPoolExecutor.java | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) 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); } } From e1886a9b12eb6a5f305b86351a51876e33254d7e Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 08:56:45 -0400 Subject: [PATCH 28/49] Test that shaded jar contains only shaded classes --- .../main/resources/ant/integration-tests.xml | 22 +++++++++++ distribution/shaded/pom.xml | 39 ++++++++++--------- 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index 2582cab3c6c..fa454983130 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -286,4 +286,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/distribution/shaded/pom.xml b/distribution/shaded/pom.xml index 9b1d7b08963..f7704f94e9a 100644 --- a/distribution/shaded/pom.xml +++ b/distribution/shaded/pom.xml @@ -51,6 +51,7 @@ + @@ -74,24 +75,10 @@ true ${build.directory}/dependency-reduced-pom.xml - - org.elasticsearch:elasticsearch - 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.apache.lucene:* + com.spatial4j:* + @@ -106,10 +93,22 @@ 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 @@ -122,6 +121,10 @@ org.joda.time org.elasticsearch.common.joda.time + + org.joda.convert + org.elasticsearch.common.joda.convert + org.jboss.netty org.elasticsearch.common.netty From 379ffdb8ee8b71a76e8622afa076dbbd167f4b49 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 09:43:11 -0400 Subject: [PATCH 29/49] Add integration test phase for elasticsearch core/ --- TESTING.asciidoc | 2 +- core/pom.xml | 5 ----- .../test/rest/{Rest0Tests.java => Rest0IT.java} | 4 ++-- .../test/rest/{Rest1Tests.java => Rest1IT.java} | 4 ++-- .../test/rest/{Rest2Tests.java => Rest2IT.java} | 4 ++-- .../test/rest/{Rest3Tests.java => Rest3IT.java} | 4 ++-- .../test/rest/{Rest4Tests.java => Rest4IT.java} | 4 ++-- .../test/rest/{Rest5Tests.java => Rest5IT.java} | 4 ++-- .../test/rest/{Rest6Tests.java => Rest6IT.java} | 4 ++-- .../test/rest/{Rest7Tests.java => Rest7IT.java} | 4 ++-- distribution/pom.xml | 17 +++++++++++++++++ plugins/pom.xml | 17 +++++++++++++++++ pom.xml | 4 ---- 13 files changed, 51 insertions(+), 26 deletions(-) rename core/src/test/java/org/elasticsearch/test/rest/{Rest0Tests.java => Rest0IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest1Tests.java => Rest1IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest2Tests.java => Rest2IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest3Tests.java => Rest3IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest4Tests.java => Rest4IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest5Tests.java => Rest5IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest6Tests.java => Rest6IT.java} (90%) rename core/src/test/java/org/elasticsearch/test/rest/{Rest7Tests.java => Rest7IT.java} (90%) diff --git a/TESTING.asciidoc b/TESTING.asciidoc index 2d6e6db8502..87af991eb5b 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -261,7 +261,7 @@ 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 diff --git a/core/pom.xml b/core/pom.xml index b1fb4ae6f3c..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 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..729d8789745 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 ElasticsearchRestTestCase { + 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..af11d547a12 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 ElasticsearchRestTestCase { + 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..31a4bfb0f9f 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 ElasticsearchRestTestCase { + 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..48937cdd02d 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 ElasticsearchRestTestCase { + 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..a565171059f 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 ElasticsearchRestTestCase { + 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..fd69bf5cca1 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 ElasticsearchRestTestCase { + 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..3ec543f44bd 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 ElasticsearchRestTestCase { + 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..2f0b07a84d5 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 ElasticsearchRestTestCase { + public Rest7IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } @ParametersFactory diff --git a/distribution/pom.xml b/distribution/pom.xml index 2be257222fd..6e3ae4e78c7 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -132,6 +132,23 @@ + + com.carrotsearch.randomizedtesting + junit4-maven-plugin + + + integ-tests + + + 1 + + + 127.0.0.1:9300 + + + + + diff --git a/plugins/pom.xml b/plugins/pom.xml index 16416092aa1..3ca7a1307d7 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -400,6 +400,23 @@ + + com.carrotsearch.randomizedtesting + junit4-maven-plugin + + + integ-tests + + + 1 + + + 127.0.0.1:9300 + + + + + diff --git a/pom.xml b/pom.xml index b6381a66813..6ff8a265c0e 100644 --- a/pom.xml +++ b/pom.xml @@ -733,16 +733,12 @@ 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 From 20781003906bd06b099c001920f99880c5f5c18e Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 3 Aug 2015 11:46:27 -0400 Subject: [PATCH 30/49] [TESTS] cat indices times for UTC - timezones --- .../rest-api-spec/test/cat.indices/10_basic.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 c4265f39376..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,7 +36,7 @@ (\d+|\d+[.]\d+)(kb|b) \s* ) $/ - + - do: cat.indices: v: false @@ -46,8 +46,8 @@ /^( 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\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* + (\d\d\d\d\-\d\d\-\d\dT\d\d:\d\d:\d\d.\d\d\d[+-]\d\d:\d\d) \s* ) - $/ + $/ From 1b0492f800703cd476d6e93de384fcd8a8a714ee Mon Sep 17 00:00:00 2001 From: David Pilato Date: Mon, 3 Aug 2015 18:41:04 +0200 Subject: [PATCH 31/49] [build] rename site example plugin to site-example Just to be consistent in plugin naming convention we have today: `plugin_type-plugin_name` So it's a `site` plugin. --- plugins/pom.xml | 2 +- plugins/{example-site => site-example}/pom.xml | 2 +- .../rest-api-spec/test/example/10_basic.yaml | 2 +- .../src/main/assemblies/plugin-assembly.xml | 0 .../{example-site => site-example}/src/site/_site/index.html | 0 .../src/test/java/org/elasticsearch/example/SiteRestIT.java | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename plugins/{example-site => site-example}/pom.xml (97%) rename plugins/{example-site => site-example}/rest-api-spec/test/example/10_basic.yaml (83%) rename plugins/{example-site => site-example}/src/main/assemblies/plugin-assembly.xml (100%) rename plugins/{example-site => site-example}/src/site/_site/index.html (100%) rename plugins/{example-site => site-example}/src/test/java/org/elasticsearch/example/SiteRestIT.java (100%) diff --git a/plugins/pom.xml b/plugins/pom.xml index 16416092aa1..ac9140c6dd6 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -413,7 +413,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/example-site/src/test/java/org/elasticsearch/example/SiteRestIT.java b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java similarity index 100% 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 From be6f9a0196979ed02f64134013f3c9767e1f8296 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 14:43:40 -0400 Subject: [PATCH 32/49] improve sanity of securitymanager file permissions conf/ and plugins/ do not need read-write access: this prevents a lot of bad possibilities. --- core/src/main/java/org/elasticsearch/bootstrap/Security.java | 5 +++-- .../test/java/org/elasticsearch/bootstrap/SecurityTests.java | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java index ddbe41157b4..ec013e737f0 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java @@ -120,10 +120,11 @@ final class Security { // 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.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"); } diff --git a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java index 3f72caaa539..de4c03872af 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -60,6 +60,9 @@ public class SecurityTests extends ElasticsearchTestCase { assertFalse(permissions.implies(new FilePermission(path.resolve("other").toString(), "read"))); // double check we overwrote java.io.tmpdir correctly for the test assertFalse(permissions.implies(new FilePermission(realTmpDir.toString(), "read"))); + // a read only directory + assertTrue(permissions.implies(new FilePermission(esHome.resolve("config").toString(), "read"))); + assertFalse(permissions.implies(new FilePermission(esHome.resolve("config").toString(), "write"))); } /** test generated permissions for all configured paths */ From 2623ce7960b1720e06ea2ea2bfaad3621f5736f7 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 16:58:25 -0400 Subject: [PATCH 33/49] Improve permissions checking in security tests and fix crazy pidfile parent permissions --- .../org/elasticsearch/bootstrap/Security.java | 3 +- .../bootstrap/SecurityTests.java | 107 ++++++++++++------ 2 files changed, 77 insertions(+), 33 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java index ec013e737f0..ca6fb9f0eb0 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java @@ -135,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/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java index de4c03872af..38780ec0cac 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -20,6 +20,7 @@ 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; @@ -28,7 +29,9 @@ 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 { @@ -53,29 +56,28 @@ public class SecurityTests extends ElasticsearchTestCase { } // the fake es home - assertFalse(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"))); - // a read only directory - assertTrue(permissions.implies(new FilePermission(esHome.resolve("config").toString(), "read"))); - assertFalse(permissions.implies(new FilePermission(esHome.resolve("config").toString(), "write"))); + 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(); @@ -90,29 +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: - assertTrue(permissions.implies(new FilePermission(environment.binFile().toString(), "read"))); - assertTrue(permissions.implies(new FilePermission(environment.libFile().toString(), "read"))); - // 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 { @@ -228,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"))); } } From 622d8a830e29baab16540ca942a41b646c32aca4 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 14:42:34 -0700 Subject: [PATCH 34/49] Tests: Rename integ tests to IT suffix This rename effectively moves all integration tests to be run with `mvn verify`. `mvn test` now runs in about 2 mins. This is a follow up to --- .../{IndicesRequestTests.java => IndicesRequestIT.java} | 2 +- .../{ListenerActionTests.java => ListenerActionIT.java} | 2 +- .../{RejectionActionTests.java => RejectionActionIT.java} | 2 +- .../action/admin/{HotThreadsTest.java => HotThreadsIT.java} | 2 +- .../{RepositoryBlocksTests.java => RepositoryBlocksIT.java} | 2 +- .../{SnapshotBlocksTests.java => SnapshotBlocksIT.java} | 2 +- .../stats/{ClusterStatsTests.java => ClusterStatsIT.java} | 2 +- ...ndingTasksBlocksTests.java => PendingTasksBlocksIT.java} | 2 +- ...CacheBlocksTests.java => ClearIndicesCacheBlocksIT.java} | 2 +- .../create/{CreateIndexTests.java => CreateIndexIT.java} | 2 +- ...DeleteIndexBlocksTests.java => DeleteIndexBlocksIT.java} | 2 +- .../flush/{FlushBlocksTests.java => FlushBlocksIT.java} | 2 +- .../indices/get/{GetIndexTests.java => GetIndexIT.java} | 2 +- .../{OptimizeBlocksTests.java => OptimizeBlocksIT.java} | 2 +- .../{RefreshBlocksTests.java => RefreshBlocksIT.java} | 2 +- ...egmentsBlocksTests.java => IndicesSegmentsBlocksIT.java} | 2 +- ...oreRequestTests.java => IndicesShardStoreRequestIT.java} | 2 +- ...dicesStatsBlocksTests.java => IndicesStatsBlocksIT.java} | 2 +- .../{BulkIntegrationTests.java => BulkIntegrationIT.java} | 2 +- ...ttingsTests.java => BulkProcessorClusterSettingsIT.java} | 2 +- .../bulk/{BulkProcessorTests.java => BulkProcessorIT.java} | 2 +- ...kDocFreqTests.java => GetTermVectorsCheckDocFreqIT.java} | 2 +- .../aliases/{IndexAliasesTests.java => IndexAliasesIT.java} | 2 +- .../blocks/{SimpleBlocksTests.java => SimpleBlocksIT.java} | 2 +- .../{BroadcastActionsTests.java => BroadcastActionsIT.java} | 2 +- ...lityTests.java => OldIndexBackwardsCompatibilityIT.java} | 2 +- .../client/node/{NodeClientTests.java => NodeClientIT.java} | 2 +- .../{TransportClientTests.java => TransportClientIT.java} | 2 +- ...ortClientRetryTests.java => TransportClientRetryIT.java} | 2 +- .../{ClusterHealthTests.java => ClusterHealthIT.java} | 2 +- ...usterInfoServiceTests.java => ClusterInfoServiceIT.java} | 6 +++--- .../{ClusterServiceTests.java => ClusterServiceIT.java} | 2 +- .../{ClusterStateDiffTests.java => ClusterStateDiffIT.java} | 2 +- ...nimumMasterNodesTests.java => MinimumMasterNodesIT.java} | 2 +- .../cluster/{NoMasterNodeTests.java => NoMasterNodeIT.java} | 2 +- ...mpleClusterStateTests.java => SimpleClusterStateIT.java} | 2 +- .../{SimpleDataNodesTests.java => SimpleDataNodesIT.java} | 2 +- ...ificMasterNodesTests.java => SpecificMasterNodesIT.java} | 2 +- ...ValidationTests.java => UpdateSettingsValidationIT.java} | 2 +- ...teSettingsTests.java => AckClusterUpdateSettingsIT.java} | 2 +- .../elasticsearch/cluster/ack/{AckTests.java => AckIT.java} | 2 +- ...enessAllocationTests.java => AwarenessAllocationIT.java} | 4 ++-- .../{ClusterRerouteTests.java => ClusterRerouteIT.java} | 4 ++-- ...eringAllocationTests.java => FilteringAllocationIT.java} | 4 ++-- ...locatorModuleTests.java => ShardsAllocatorModuleIT.java} | 2 +- .../{SimpleAllocationTests.java => SimpleAllocationIT.java} | 2 +- ...DelayedAllocationTests.java => DelayedAllocationIT.java} | 2 +- ....java => RoutingBackwardCompatibilityUponUpgradeIT.java} | 2 +- ...rIntegrationTest.java => EnableAllocationDeciderIT.java} | 2 +- .../{MockDiskUsagesTests.java => MockDiskUsagesIT.java} | 2 +- .../{ClusterSettingsTests.java => ClusterSettingsIT.java} | 6 +++--- ...SettingsFilteringTests.java => SettingsFilteringIT.java} | 2 +- ...terSearchShardsTests.java => ClusterSearchShardsIT.java} | 2 +- .../common/util/MultiDataPathUpgraderTests.java | 6 +++--- ...sistencyLevelTests.java => WriteConsistencyLevelIT.java} | 2 +- .../simple/{SimpleCountTests.java => SimpleCountIT.java} | 2 +- ...onsTests.java => DiscoveryWithServiceDisruptionsIT.java} | 2 +- ...nicastDiscoveryTests.java => ZenUnicastDiscoveryIT.java} | 2 +- .../zen/{ZenDiscoveryTests.java => ZenDiscoveryIT.java} | 2 +- .../document/AliasedIndexDocumentActionsTests.java | 2 +- .../elasticsearch/document/{BulkTests.java => BulkIT.java} | 2 +- .../{DocumentActionsTests.java => DocumentActionsIT.java} | 2 +- .../document/{ShardInfoTests.java => ShardInfoIT.java} | 2 +- .../exists/{SimpleExistsTests.java => SimpleExistsIT.java} | 2 +- .../{ExplainActionTests.java => ExplainActionIT.java} | 2 +- ...tsIntegrationTests.java => FieldStatsIntegrationIT.java} | 2 +- ...GatewayIndexStateTests.java => GatewayIndexStateIT.java} | 4 ++-- ...iteDataNodesTests.java => MetaDataWriteDataNodesIT.java} | 2 +- .../{QuorumGatewayTests.java => QuorumGatewayIT.java} | 2 +- ...RecoverAfterNodesTests.java => RecoverAfterNodesIT.java} | 2 +- ...veryFromGatewayTests.java => RecoveryFromGatewayIT.java} | 2 +- .../get/{GetActionTests.java => GetActionIT.java} | 2 +- .../{HttpPublishPortTests.java => HttpPublishPortIT.java} | 2 +- ...dIntegrationTest.java => NettyPipeliningDisabledIT.java} | 2 +- ...edIntegrationTest.java => NettyPipeliningEnabledIT.java} | 2 +- ...xRequestBuilderTests.java => IndexRequestBuilderIT.java} | 2 +- ...dowReplicasTests.java => IndexWithShadowReplicasIT.java} | 2 +- ...IndexFailuresTest.java => TransportIndexFailuresIT.java} | 2 +- ...rnalEngineIntegrationTest.java => InternalEngineIT.java} | 2 +- ...rnalEngineMergeTests.java => InternalEngineMergeIT.java} | 2 +- .../org/elasticsearch/index/engine/InternalEngineTests.java | 4 ++-- ...egrationTests.java => FieldDataFilterIntegrationIT.java} | 2 +- .../{FieldDataLoadingTests.java => FieldDataLoadingIT.java} | 2 +- ...tegrationTests.java => DynamicMappingIntegrationIT.java} | 2 +- ...erIntegrationTest.java => TransformOnIndexMapperIT.java} | 2 +- ...IntegrationTests.java => CopyToMapperIntegrationIT.java} | 2 +- ...onTests.java => TokenCountFieldMapperIntegrationIT.java} | 4 ++-- ...ionTests.java => ExternalValuesMapperIntegrationIT.java} | 2 +- ...sIntegrationTests.java => MultiFieldsIntegrationIT.java} | 2 +- ...gIntegrationTests.java => SizeMappingIntegrationIT.java} | 2 +- ...ingOnClusterTests.java => UpdateMappingOnClusterIT.java} | 2 +- .../query/{TemplateQueryTest.java => TemplateQueryIT.java} | 2 +- ...CustomQueryParserTests.java => CustomQueryParserIT.java} | 2 +- .../store/{CorruptedFileTest.java => CorruptedFileIT.java} | 2 +- ...CorruptedTranslogTests.java => CorruptedTranslogIT.java} | 2 +- .../{ExceptionRetryTests.java => ExceptionRetryIT.java} | 2 +- .../stats/{SuggestStatsTests.java => SuggestStatsIT.java} | 2 +- .../org/elasticsearch/index/translog/TranslogTests.java | 4 ++-- .../indexing/{IndexActionTests.java => IndexActionIT.java} | 2 +- ...ifecycleActionTests.java => IndexLifecycleActionIT.java} | 2 +- ...ests.java => DateMathIndexExpressionsIntegrationIT.java} | 2 +- ...ustomDataPathTests.java => IndicesCustomDataPathIT.java} | 2 +- ...leListenerTests.java => IndicesLifecycleListenerIT.java} | 2 +- ...tegrationTests.java => IndicesOptionsIntegrationIT.java} | 2 +- ...grationTests.java => PreBuiltAnalyzerIntegrationIT.java} | 2 +- .../{AnalyzeActionTests.java => AnalyzeActionIT.java} | 2 +- .../{HunspellServiceTests.java => HunspellServiceIT.java} | 2 +- ...cesRequestCacheTests.java => IndicesRequestCacheIT.java} | 2 +- .../{IndicesExistsTests.java => IndicesExistsIT.java} | 2 +- .../types/{TypesExistsTests.java => TypesExistsIT.java} | 2 +- .../indices/flush/{FlushTest.java => FlushIT.java} | 2 +- .../leaks/{IndicesLeaksTests.java => IndicesLeaksIT.java} | 2 +- ...cTemplateTests.java => ConcurrentDynamicTemplateIT.java} | 2 +- .../mapping/DedicatedMasterGetFieldMappingTests.java | 2 +- ...ieldMappingsTests.java => SimpleGetFieldMappingsIT.java} | 2 +- ...SimpleGetMappingsTests.java => SimpleGetMappingsIT.java} | 2 +- ...ntegrationTests.java => UpdateMappingIntegrationIT.java} | 2 +- ...ControllerTests.java => IndexingMemoryControllerIT.java} | 6 +++--- ...rcuitBreakerNoopTests.java => CircuitBreakerNoopIT.java} | 2 +- ...reakerServiceTests.java => CircuitBreakerServiceIT.java} | 2 +- ...eakerTests.java => RandomExceptionCircuitBreakerIT.java} | 2 +- .../{IndexRecoveryTests.java => IndexRecoveryIT.java} | 2 +- ...GetSettingsBlocksTests.java => GetSettingsBlocksIT.java} | 2 +- ...erOfReplicasTests.java => UpdateNumberOfReplicasIT.java} | 4 ++-- .../{UpdateSettingsTests.java => UpdateSettingsIT.java} | 2 +- ...eCloseAllTests.java => CloseIndexDisableCloseAllIT.java} | 2 +- .../{OpenCloseIndexTests.java => OpenCloseIndexIT.java} | 2 +- .../{RareClusterStateTests.java => RareClusterStateIT.java} | 2 +- .../{SimpleIndexStateTests.java => SimpleIndexStateIT.java} | 4 ++-- .../stats/{IndexStatsTests.java => IndexStatsIT.java} | 2 +- ...IntegrationTests.java => IndicesStoreIntegrationIT.java} | 2 +- ...xTemplateBlocksTests.java => IndexTemplateBlocksIT.java} | 2 +- ...ateFilteringTests.java => IndexTemplateFilteringIT.java} | 2 +- ...leIndexTemplateTests.java => SimpleIndexTemplateIT.java} | 2 +- ...yIndicesWarmerTests.java => GatewayIndicesWarmerIT.java} | 4 ++-- ...cesWarmerBlocksTests.java => IndicesWarmerBlocksIT.java} | 2 +- ...leIndicesWarmerTests.java => SimpleIndicesWarmerIT.java} | 2 +- .../mget/{SimpleMgetTests.java => SimpleMgetIT.java} | 2 +- .../nested/{SimpleNestedTests.java => SimpleNestedIT.java} | 2 +- ...ctBufferNetworkTests.java => DirectBufferNetworkIT.java} | 2 +- ...onTests.java => DestructiveOperationsIntegrationIT.java} | 2 +- ...rrorsDisabledTest.java => DetailedErrorsDisabledIT.java} | 2 +- ...dErrorsEnabledTest.java => DetailedErrorsEnabledIT.java} | 2 +- ...rentPercolatorTests.java => ConcurrentPercolatorIT.java} | 4 ++-- .../{MultiPercolatorTests.java => MultiPercolatorIT.java} | 4 ++-- ...tyTests.java => PercolatorBackwardsCompatibilityIT.java} | 2 +- ...onsTests.java => PercolatorFacetsAndAggregationsIT.java} | 2 +- .../percolator/{PercolatorTests.java => PercolatorIT.java} | 2 +- ...coveryPercolatorTests.java => RecoveryPercolatorIT.java} | 4 ++-- .../{TTLPercolatorTests.java => TTLPercolatorIT.java} | 4 ++-- ...portModuleTests.java => PluggableTransportModuleIT.java} | 2 +- .../{PluginManagerTests.java => PluginManagerIT.java} | 2 +- ...seHeaderPluginTests.java => ResponseHeaderPluginIT.java} | 2 +- .../plugins/{SitePluginTests.java => SitePluginIT.java} | 2 +- ...ConfigTests.java => SitePluginRelativePathConfigIT.java} | 2 +- ...llRollingRestartTests.java => FullRollingRestartIT.java} | 2 +- ...ileUnderLoadTests.java => RecoveryWhileUnderLoadIT.java} | 4 ++-- .../recovery/{RelocationTests.java => RelocationIT.java} | 2 +- .../{SimpleRecoveryTests.java => SimpleRecoveryIT.java} | 2 +- ...RecoveryTests.java => SmallFileChunkSizeRecoveryIT.java} | 2 +- ...psRecoveryTests.java => SmallTranslogOpsRecoveryIT.java} | 2 +- ...eRecoveryTests.java => SmallTranslogSizeRecoveryIT.java} | 2 +- ...TruncatedRecoveryTests.java => TruncatedRecoveryIT.java} | 2 +- .../{CorsRegexDefaultTests.java => CorsRegexDefaultIT.java} | 2 +- .../rest/{CorsRegexTests.java => CorsRegexIT.java} | 4 ++-- ...sResolveRoutingTests.java => AliasResolveRoutingIT.java} | 2 +- .../routing/{AliasRoutingTests.java => AliasRoutingIT.java} | 2 +- .../{SimpleRoutingTests.java => SimpleRoutingIT.java} | 2 +- ...omScriptContextTests.java => CustomScriptContextIT.java} | 2 +- .../script/{GroovyScriptTests.java => GroovyScriptIT.java} | 2 +- .../{GroovySecurityTests.java => GroovySecurityIT.java} | 2 +- .../script/{IndexLookupTests.java => IndexLookupIT.java} | 2 +- .../{IndexedScriptTests.java => IndexedScriptIT.java} | 2 +- .../script/{OnDiskScriptTests.java => OnDiskScriptIT.java} | 2 +- .../script/{ScriptFieldTests.java => ScriptFieldIT.java} | 2 +- ...iptIndexSettingsTest.java => ScriptIndexSettingsIT.java} | 2 +- .../{ExpressionScriptTests.java => ExpressionScriptIT.java} | 2 +- .../search/{CountSearchTests.java => CountSearchIT.java} | 2 +- ...WithRejectionsTests.java => SearchWithRejectionsIT.java} | 2 +- ...viceReaperTest.java => StressSearchServiceReaperIT.java} | 2 +- ...gregationsBinaryTests.java => AggregationsBinaryIT.java} | 2 +- ...IntegrationTests.java => AggregationsIntegrationIT.java} | 2 +- .../search/aggregations/{CombiTests.java => CombiIT.java} | 2 +- .../{EquivalenceTests.java => EquivalenceIT.java} | 2 +- .../aggregations/{MetaDataTests.java => MetaDataIT.java} | 2 +- .../{MissingValueTests.java => MissingValueIT.java} | 2 +- .../aggregations/{ParsingTests.java => ParsingIT.java} | 2 +- .../bucket/{BooleanTermsTests.java => BooleanTermsIT.java} | 2 +- .../bucket/{ChildrenTests.java => ChildrenIT.java} | 2 +- .../{DateHistogramTests.java => DateHistogramIT.java} | 2 +- ...HistogramOffsetTests.java => DateHistogramOffsetIT.java} | 2 +- .../bucket/{DateRangeTests.java => DateRangeIT.java} | 2 +- ...tedAggregationTests.java => DedicatedAggregationIT.java} | 2 +- .../aggregations/bucket/{FilterTests.java => FilterIT.java} | 2 +- .../bucket/{FiltersTests.java => FiltersIT.java} | 2 +- .../bucket/{GeoDistanceTests.java => GeoDistanceIT.java} | 2 +- .../bucket/{GeoHashGridTests.java => GeoHashGridIT.java} | 2 +- .../aggregations/bucket/{GlobalTests.java => GlobalIT.java} | 2 +- .../bucket/{HistogramTests.java => HistogramIT.java} | 2 +- .../bucket/{IPv4RangeTests.java => IPv4RangeIT.java} | 2 +- .../bucket/{MissingTests.java => MissingIT.java} | 2 +- .../bucket/{NaNSortingTests.java => NaNSortingIT.java} | 2 +- .../aggregations/bucket/{NestedTests.java => NestedIT.java} | 2 +- .../bucket/{ParentIdAggTests.java => ParentIdAggIT.java} | 2 +- .../aggregations/bucket/{RangeTests.java => RangeIT.java} | 2 +- .../{ReverseNestedTests.java => ReverseNestedIT.java} | 2 +- .../bucket/{SamplerTests.java => SamplerIT.java} | 2 +- .../bucket/{ShardReduceTests.java => ShardReduceIT.java} | 2 +- .../{SignificantTermsTests.java => SignificantTermsIT.java} | 2 +- ...eTests.java => SignificantTermsSignificanceScoreIT.java} | 2 +- ...rmsDocCountErrorTests.java => TermsDocCountErrorIT.java} | 2 +- ...rdMinDocCountTests.java => TermsShardMinDocCountIT.java} | 2 +- .../bucket/{TopHitsTests.java => TopHitsIT.java} | 2 +- .../metrics/{CardinalityTests.java => CardinalityIT.java} | 2 +- .../metrics/{GeoBoundsTests.java => GeoBoundsIT.java} | 2 +- .../{ScriptedMetricTests.java => ScriptedMetricIT.java} | 2 +- .../metrics/{ValueCountTests.java => ValueCountIT.java} | 2 +- .../pipeline/{AvgBucketTests.java => AvgBucketIT.java} | 2 +- .../{BucketScriptTests.java => BucketScriptIT.java} | 2 +- .../{BucketSelectorTests.java => BucketSelectorIT.java} | 2 +- .../{CumulativeSumTests.java => CumulativeSumIT.java} | 2 +- .../{DateDerivativeTests.java => DateDerivativeIT.java} | 2 +- .../pipeline/{DerivativeTests.java => DerivativeIT.java} | 2 +- .../pipeline/{MaxBucketTests.java => MaxBucketIT.java} | 2 +- .../pipeline/{MinBucketTests.java => MinBucketIT.java} | 2 +- .../pipeline/{SumBucketTests.java => SumBucketIT.java} | 2 +- .../pipeline/moving/avg/{MovAvgTests.java => MovAvgIT.java} | 2 +- .../serialdiff/{SerialDiffTests.java => SerialDiffIT.java} | 2 +- ...atingIndexTests.java => SearchWhileCreatingIndexIT.java} | 2 +- ...ileRelocatingTests.java => SearchWhileRelocatingIT.java} | 2 +- ...ceptionsTests.java => SearchWithRandomExceptionsIT.java} | 2 +- ...rchFailuresTests.java => TransportSearchFailuresIT.java} | 2 +- ...NodesSearchTests.java => TransportTwoNodesSearchIT.java} | 2 +- ...dQuerySearchBwcTests.java => ChildQuerySearchBwcIT.java} | 2 +- .../{ChildQuerySearchTests.java => ChildQuerySearchIT.java} | 2 +- ...ieldLoadingBwcTest.java => ParentFieldLoadingBwcIT.java} | 4 ++-- ...arentFieldLoadingTest.java => ParentFieldLoadingIT.java} | 2 +- ...hSubPhasePluginTests.java => FetchSubPhasePluginIT.java} | 2 +- .../fields/{SearchFieldsTests.java => SearchFieldsIT.java} | 2 +- ...cayFunctionScoreTests.java => DecayFunctionScoreIT.java} | 2 +- ...ExplainableScriptTests.java => ExplainableScriptIT.java} | 2 +- .../search/functionscore/ExplainableScriptPlugin.java | 2 +- ...eFieldValueTests.java => FunctionScoreFieldValueIT.java} | 2 +- .../{FunctionScoreTests.java => FunctionScoreIT.java} | 6 +++--- ...tionScorePluginTests.java => FunctionScorePluginIT.java} | 4 ++-- ...omScoreFunctionTests.java => RandomScoreFunctionIT.java} | 2 +- .../geo/{GeoBoundingBoxTests.java => GeoBoundingBoxIT.java} | 2 +- .../geo/{GeoDistanceTests.java => GeoDistanceIT.java} | 2 +- .../search/geo/{GeoFilterTests.java => GeoFilterIT.java} | 2 +- .../search/geo/{GeoPolygonTests.java => GeoPolygonIT.java} | 2 +- ...hapeIntegrationTests.java => GeoShapeIntegrationIT.java} | 2 +- ...ghterSearchTests.java => CustomHighlighterSearchIT.java} | 2 +- ...HighlighterSearchTests.java => HighlighterSearchIT.java} | 2 +- ...oostSearchTests.java => SimpleIndicesBoostSearchIT.java} | 2 +- .../innerhits/{InnerHitsTests.java => InnerHitsIT.java} | 2 +- .../{MatchedQueriesTests.java => MatchedQueriesIT.java} | 2 +- .../{MoreLikeThisTests.java => MoreLikeThisIT.java} | 2 +- ...SimpleMultiSearchTests.java => SimpleMultiSearchIT.java} | 2 +- .../{SearchPreferenceTests.java => SearchPreferenceIT.java} | 2 +- .../query/{ExistsMissingTests.java => ExistsMissingIT.java} | 2 +- .../{MultiMatchQueryTests.java => MultiMatchQueryIT.java} | 2 +- .../query/{SearchQueryTests.java => SearchQueryIT.java} | 2 +- ...SimpleQueryStringTests.java => SimpleQueryStringIT.java} | 2 +- .../{QueryRescorerTests.java => QueryRescorerIT.java} | 2 +- .../search/scan/{SearchScanTests.java => SearchScanIT.java} | 2 +- ...chScanScrollingTests.java => SearchScanScrollingIT.java} | 2 +- ...ScriptQuerySearchTests.java => ScriptQuerySearchIT.java} | 2 +- .../scroll/{DuelScrollTests.java => DuelScrollIT.java} | 2 +- .../scroll/{SearchScrollTests.java => SearchScrollIT.java} | 2 +- ...gNodesTests.java => SearchScrollWithFailingNodesIT.java} | 2 +- .../simple/{SimpleSearchTests.java => SimpleSearchIT.java} | 2 +- .../search/sort/{SimpleSortTests.java => SimpleSortIT.java} | 2 +- .../{SourceFetchingTests.java => SourceFetchingIT.java} | 2 +- .../stats/{SearchStatsTests.java => SearchStatsIT.java} | 2 +- ...ggestSearchTests.java => CompletionSuggestSearchIT.java} | 2 +- ...tSuggestSearchTests.java => ContextSuggestSearchIT.java} | 2 +- ...ggesterSearchTests.java => CustomSuggesterSearchIT.java} | 2 +- .../{SuggestSearchTests.java => SuggestSearchIT.java} | 6 +++--- .../{SearchTimeoutTests.java => SearchTimeoutIT.java} | 2 +- .../similarity/{SimilarityTests.java => SimilarityIT.java} | 2 +- .../{NetworkPartitionTests.java => NetworkPartitionIT.java} | 2 +- ...SuiteScopeClusterTests.java => SuiteScopeClusterIT.java} | 2 +- .../{TestScopeClusterTests.java => TestScopeClusterIT.java} | 2 +- .../{SimpleThreadPoolTests.java => SimpleThreadPoolIT.java} | 6 +++--- .../{SimpleTimestampTests.java => SimpleTimestampIT.java} | 2 +- .../transport/{ActionNamesTests.java => ActionNamesIT.java} | 2 +- ...TransportTests.java => ContextAndHeaderTransportIT.java} | 2 +- .../{NettyTransportTests.java => NettyTransportIT.java} | 2 +- ...Tests.java => NettyTransportMultiPortIntegrationIT.java} | 2 +- .../elasticsearch/tribe/{TribeTests.java => TribeIT.java} | 2 +- .../ttl/{SimpleTTLTests.java => SimpleTTLIT.java} | 2 +- ...ByNativeScriptTests.java => UpdateByNativeScriptIT.java} | 2 +- .../update/{UpdateTests.java => UpdateIT.java} | 2 +- .../update/{UpdateNoopTests.java => UpdateNoopIT.java} | 2 +- ...SearchTemplateTests.java => RenderSearchTemplateIT.java} | 2 +- ...leValidateQueryTests.java => SimpleValidateQueryIT.java} | 2 +- ...erationTests.java => ConcurrentDocumentOperationIT.java} | 2 +- .../{SimpleVersioningTests.java => SimpleVersioningIT.java} | 2 +- 298 files changed, 330 insertions(+), 330 deletions(-) rename core/src/test/java/org/elasticsearch/action/{IndicesRequestTests.java => IndicesRequestIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/{ListenerActionTests.java => ListenerActionIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/{RejectionActionTests.java => RejectionActionIT.java} (98%) rename core/src/test/java/org/elasticsearch/action/admin/{HotThreadsTest.java => HotThreadsIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/{RepositoryBlocksTests.java => RepositoryBlocksIT.java} (98%) rename core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/{SnapshotBlocksTests.java => SnapshotBlocksIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/cluster/stats/{ClusterStatsTests.java => ClusterStatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/{PendingTasksBlocksTests.java => PendingTasksBlocksIT.java} (96%) rename core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/{ClearIndicesCacheBlocksTests.java => ClearIndicesCacheBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/admin/indices/create/{CreateIndexTests.java => CreateIndexIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/indices/delete/{DeleteIndexBlocksTests.java => DeleteIndexBlocksIT.java} (95%) rename core/src/test/java/org/elasticsearch/action/admin/indices/flush/{FlushBlocksTests.java => FlushBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/admin/indices/get/{GetIndexTests.java => GetIndexIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/indices/optimize/{OptimizeBlocksTests.java => OptimizeBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/admin/indices/refresh/{RefreshBlocksTests.java => RefreshBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/admin/indices/segments/{IndicesSegmentsBlocksTests.java => IndicesSegmentsBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/action/admin/indices/shards/{IndicesShardStoreRequestTests.java => IndicesShardStoreRequestIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/admin/indices/stats/{IndicesStatsBlocksTests.java => IndicesStatsBlocksIT.java} (96%) rename core/src/test/java/org/elasticsearch/action/bulk/{BulkIntegrationTests.java => BulkIntegrationIT.java} (96%) rename core/src/test/java/org/elasticsearch/action/bulk/{BulkProcessorClusterSettingsTests.java => BulkProcessorClusterSettingsIT.java} (96%) rename core/src/test/java/org/elasticsearch/action/bulk/{BulkProcessorTests.java => BulkProcessorIT.java} (99%) rename core/src/test/java/org/elasticsearch/action/termvectors/{GetTermVectorsCheckDocFreqTests.java => GetTermVectorsCheckDocFreqIT.java} (99%) rename core/src/test/java/org/elasticsearch/aliases/{IndexAliasesTests.java => IndexAliasesIT.java} (99%) rename core/src/test/java/org/elasticsearch/blocks/{SimpleBlocksTests.java => SimpleBlocksIT.java} (98%) rename core/src/test/java/org/elasticsearch/broadcast/{BroadcastActionsTests.java => BroadcastActionsIT.java} (97%) rename core/src/test/java/org/elasticsearch/bwcompat/{OldIndexBackwardsCompatibilityTests.java => OldIndexBackwardsCompatibilityIT.java} (99%) rename core/src/test/java/org/elasticsearch/client/node/{NodeClientTests.java => NodeClientIT.java} (96%) rename core/src/test/java/org/elasticsearch/client/transport/{TransportClientTests.java => TransportClientIT.java} (98%) rename core/src/test/java/org/elasticsearch/client/transport/{TransportClientRetryTests.java => TransportClientRetryIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/{ClusterHealthTests.java => ClusterHealthIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/{ClusterInfoServiceTests.java => ClusterInfoServiceIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/{ClusterServiceTests.java => ClusterServiceIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{ClusterStateDiffTests.java => ClusterStateDiffIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{MinimumMasterNodesTests.java => MinimumMasterNodesIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{NoMasterNodeTests.java => NoMasterNodeIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{SimpleClusterStateTests.java => SimpleClusterStateIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{SimpleDataNodesTests.java => SimpleDataNodesIT.java} (97%) rename core/src/test/java/org/elasticsearch/cluster/{SpecificMasterNodesTests.java => SpecificMasterNodesIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/{UpdateSettingsValidationTests.java => UpdateSettingsValidationIT.java} (97%) rename core/src/test/java/org/elasticsearch/cluster/ack/{AckClusterUpdateSettingsTests.java => AckClusterUpdateSettingsIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/ack/{AckTests.java => AckIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/allocation/{AwarenessAllocationTests.java => AwarenessAllocationIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/allocation/{ClusterRerouteTests.java => ClusterRerouteIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/allocation/{FilteringAllocationTests.java => FilteringAllocationIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/allocation/{ShardsAllocatorModuleTests.java => ShardsAllocatorModuleIT.java} (97%) rename core/src/test/java/org/elasticsearch/cluster/allocation/{SimpleAllocationTests.java => SimpleAllocationIT.java} (97%) rename core/src/test/java/org/elasticsearch/cluster/routing/{DelayedAllocationTests.java => DelayedAllocationIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/routing/{RoutingBackwardCompatibilityUponUpgradeTests.java => RoutingBackwardCompatibilityUponUpgradeIT.java} (97%) rename core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/{EnableAllocationDeciderIntegrationTest.java => EnableAllocationDeciderIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/{MockDiskUsagesTests.java => MockDiskUsagesIT.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/settings/{ClusterSettingsTests.java => ClusterSettingsIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/settings/{SettingsFilteringTests.java => SettingsFilteringIT.java} (98%) rename core/src/test/java/org/elasticsearch/cluster/shards/{ClusterSearchShardsTests.java => ClusterSearchShardsIT.java} (99%) rename core/src/test/java/org/elasticsearch/consistencylevel/{WriteConsistencyLevelTests.java => WriteConsistencyLevelIT.java} (98%) rename core/src/test/java/org/elasticsearch/count/simple/{SimpleCountTests.java => SimpleCountIT.java} (99%) rename core/src/test/java/org/elasticsearch/discovery/{DiscoveryWithServiceDisruptionsTests.java => DiscoveryWithServiceDisruptionsIT.java} (99%) rename core/src/test/java/org/elasticsearch/discovery/{ZenUnicastDiscoveryTests.java => ZenUnicastDiscoveryIT.java} (98%) rename core/src/test/java/org/elasticsearch/discovery/zen/{ZenDiscoveryTests.java => ZenDiscoveryIT.java} (99%) rename core/src/test/java/org/elasticsearch/document/{BulkTests.java => BulkIT.java} (99%) rename core/src/test/java/org/elasticsearch/document/{DocumentActionsTests.java => DocumentActionsIT.java} (99%) rename core/src/test/java/org/elasticsearch/document/{ShardInfoTests.java => ShardInfoIT.java} (98%) rename core/src/test/java/org/elasticsearch/exists/{SimpleExistsTests.java => SimpleExistsIT.java} (98%) rename core/src/test/java/org/elasticsearch/explain/{ExplainActionTests.java => ExplainActionIT.java} (99%) rename core/src/test/java/org/elasticsearch/fieldstats/{FieldStatsIntegrationTests.java => FieldStatsIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/gateway/{GatewayIndexStateTests.java => GatewayIndexStateIT.java} (99%) rename core/src/test/java/org/elasticsearch/gateway/{MetaDataWriteDataNodesTests.java => MetaDataWriteDataNodesIT.java} (99%) rename core/src/test/java/org/elasticsearch/gateway/{QuorumGatewayTests.java => QuorumGatewayIT.java} (99%) rename core/src/test/java/org/elasticsearch/gateway/{RecoverAfterNodesTests.java => RecoverAfterNodesIT.java} (99%) rename core/src/test/java/org/elasticsearch/gateway/{RecoveryFromGatewayTests.java => RecoveryFromGatewayIT.java} (99%) rename core/src/test/java/org/elasticsearch/get/{GetActionTests.java => GetActionIT.java} (99%) rename core/src/test/java/org/elasticsearch/http/netty/{HttpPublishPortTests.java => HttpPublishPortIT.java} (97%) rename core/src/test/java/org/elasticsearch/http/netty/{NettyPipeliningDisabledIntegrationTest.java => NettyPipeliningDisabledIT.java} (97%) rename core/src/test/java/org/elasticsearch/http/netty/{NettyPipeliningEnabledIntegrationTest.java => NettyPipeliningEnabledIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/{IndexRequestBuilderTests.java => IndexRequestBuilderIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/{IndexWithShadowReplicasTests.java => IndexWithShadowReplicasIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/{TransportIndexFailuresTest.java => TransportIndexFailuresIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/engine/{InternalEngineIntegrationTest.java => InternalEngineIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/engine/{InternalEngineMergeTests.java => InternalEngineMergeIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/fielddata/{FieldDataFilterIntegrationTests.java => FieldDataFilterIntegrationIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/fielddata/{FieldDataLoadingTests.java => FieldDataLoadingIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/mapper/{DynamicMappingIntegrationTests.java => DynamicMappingIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/mapper/{TransformOnIndexMapperIntegrationTest.java => TransformOnIndexMapperIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/mapper/copyto/{CopyToMapperIntegrationTests.java => CopyToMapperIntegrationIT.java} (97%) rename core/src/test/java/org/elasticsearch/index/mapper/core/{TokenCountFieldMapperIntegrationTests.java => TokenCountFieldMapperIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/mapper/externalvalues/{ExternalValuesMapperIntegrationTests.java => ExternalValuesMapperIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/mapper/multifield/{MultiFieldsIntegrationTests.java => MultiFieldsIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/mapper/size/{SizeMappingIntegrationTests.java => SizeMappingIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/mapper/update/{UpdateMappingOnClusterTests.java => UpdateMappingOnClusterIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/query/{TemplateQueryTest.java => TemplateQueryIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/query/plugin/{CustomQueryParserTests.java => CustomQueryParserIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/store/{CorruptedFileTest.java => CorruptedFileIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/store/{CorruptedTranslogTests.java => CorruptedTranslogIT.java} (99%) rename core/src/test/java/org/elasticsearch/index/store/{ExceptionRetryTests.java => ExceptionRetryIT.java} (98%) rename core/src/test/java/org/elasticsearch/index/suggest/stats/{SuggestStatsTests.java => SuggestStatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/indexing/{IndexActionTests.java => IndexActionIT.java} (99%) rename core/src/test/java/org/elasticsearch/indexlifecycle/{IndexLifecycleActionTests.java => IndexLifecycleActionIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/{DateMathIndexExpressionsIntegrationTests.java => DateMathIndexExpressionsIntegrationIT.java} (97%) rename core/src/test/java/org/elasticsearch/indices/{IndicesCustomDataPathTests.java => IndicesCustomDataPathIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/{IndicesLifecycleListenerTests.java => IndicesLifecycleListenerIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/{IndicesOptionsIntegrationTests.java => IndicesOptionsIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/analysis/{PreBuiltAnalyzerIntegrationTests.java => PreBuiltAnalyzerIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/analyze/{AnalyzeActionTests.java => AnalyzeActionIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/analyze/{HunspellServiceTests.java => HunspellServiceIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/cache/query/{IndicesRequestCacheTests.java => IndicesRequestCacheIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/exists/indices/{IndicesExistsTests.java => IndicesExistsIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/exists/types/{TypesExistsTests.java => TypesExistsIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/flush/{FlushTest.java => FlushIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/leaks/{IndicesLeaksTests.java => IndicesLeaksIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/mapping/{ConcurrentDynamicTemplateTests.java => ConcurrentDynamicTemplateIT.java} (97%) rename core/src/test/java/org/elasticsearch/indices/mapping/{SimpleGetFieldMappingsTests.java => SimpleGetFieldMappingsIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/mapping/{SimpleGetMappingsTests.java => SimpleGetMappingsIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/mapping/{UpdateMappingIntegrationTests.java => UpdateMappingIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/memory/{IndexingMemoryControllerTests.java => IndexingMemoryControllerIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/memory/breaker/{CircuitBreakerNoopTests.java => CircuitBreakerNoopIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/memory/breaker/{CircuitBreakerServiceTests.java => CircuitBreakerServiceIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/memory/breaker/{RandomExceptionCircuitBreakerTests.java => RandomExceptionCircuitBreakerIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/recovery/{IndexRecoveryTests.java => IndexRecoveryIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/settings/{GetSettingsBlocksTests.java => GetSettingsBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/indices/settings/{UpdateNumberOfReplicasTests.java => UpdateNumberOfReplicasIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/settings/{UpdateSettingsTests.java => UpdateSettingsIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/state/{CloseIndexDisableCloseAllTests.java => CloseIndexDisableCloseAllIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/state/{OpenCloseIndexTests.java => OpenCloseIndexIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/state/{RareClusterStateTests.java => RareClusterStateIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/state/{SimpleIndexStateTests.java => SimpleIndexStateIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/stats/{IndexStatsTests.java => IndexStatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/store/{IndicesStoreIntegrationTests.java => IndicesStoreIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/template/{IndexTemplateBlocksTests.java => IndexTemplateBlocksIT.java} (97%) rename core/src/test/java/org/elasticsearch/indices/template/{IndexTemplateFilteringTests.java => IndexTemplateFilteringIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/template/{SimpleIndexTemplateTests.java => SimpleIndexTemplateIT.java} (99%) rename core/src/test/java/org/elasticsearch/indices/warmer/{GatewayIndicesWarmerTests.java => GatewayIndicesWarmerIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/warmer/{IndicesWarmerBlocksTests.java => IndicesWarmerBlocksIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/warmer/{SimpleIndicesWarmerTests.java => SimpleIndicesWarmerIT.java} (99%) rename core/src/test/java/org/elasticsearch/mget/{SimpleMgetTests.java => SimpleMgetIT.java} (99%) rename core/src/test/java/org/elasticsearch/nested/{SimpleNestedTests.java => SimpleNestedIT.java} (99%) rename core/src/test/java/org/elasticsearch/network/{DirectBufferNetworkTests.java => DirectBufferNetworkIT.java} (98%) rename core/src/test/java/org/elasticsearch/operateAllIndices/{DestructiveOperationsIntegrationTests.java => DestructiveOperationsIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/options/detailederrors/{DetailedErrorsDisabledTest.java => DetailedErrorsDisabledIT.java} (97%) rename core/src/test/java/org/elasticsearch/options/detailederrors/{DetailedErrorsEnabledTest.java => DetailedErrorsEnabledIT.java} (97%) rename core/src/test/java/org/elasticsearch/percolator/{ConcurrentPercolatorTests.java => ConcurrentPercolatorIT.java} (99%) rename core/src/test/java/org/elasticsearch/percolator/{MultiPercolatorTests.java => MultiPercolatorIT.java} (99%) rename core/src/test/java/org/elasticsearch/percolator/{PercolatorBackwardsCompatibilityTests.java => PercolatorBackwardsCompatibilityIT.java} (97%) rename core/src/test/java/org/elasticsearch/percolator/{PercolatorFacetsAndAggregationsTests.java => PercolatorFacetsAndAggregationsIT.java} (99%) rename core/src/test/java/org/elasticsearch/percolator/{PercolatorTests.java => PercolatorIT.java} (99%) rename core/src/test/java/org/elasticsearch/percolator/{RecoveryPercolatorTests.java => RecoveryPercolatorIT.java} (99%) rename core/src/test/java/org/elasticsearch/percolator/{TTLPercolatorTests.java => TTLPercolatorIT.java} (98%) rename core/src/test/java/org/elasticsearch/plugins/{PluggableTransportModuleTests.java => PluggableTransportModuleIT.java} (98%) rename core/src/test/java/org/elasticsearch/plugins/{PluginManagerTests.java => PluginManagerIT.java} (99%) rename core/src/test/java/org/elasticsearch/plugins/{ResponseHeaderPluginTests.java => ResponseHeaderPluginIT.java} (96%) rename core/src/test/java/org/elasticsearch/plugins/{SitePluginTests.java => SitePluginIT.java} (98%) rename core/src/test/java/org/elasticsearch/plugins/{SitePluginRelativePathConfigTests.java => SitePluginRelativePathConfigIT.java} (97%) rename core/src/test/java/org/elasticsearch/recovery/{FullRollingRestartTests.java => FullRollingRestartIT.java} (98%) rename core/src/test/java/org/elasticsearch/recovery/{RecoveryWhileUnderLoadTests.java => RecoveryWhileUnderLoadIT.java} (99%) rename core/src/test/java/org/elasticsearch/recovery/{RelocationTests.java => RelocationIT.java} (99%) rename core/src/test/java/org/elasticsearch/recovery/{SimpleRecoveryTests.java => SimpleRecoveryIT.java} (98%) rename core/src/test/java/org/elasticsearch/recovery/{SmallFileChunkSizeRecoveryTests.java => SmallFileChunkSizeRecoveryIT.java} (93%) rename core/src/test/java/org/elasticsearch/recovery/{SmallTranslogOpsRecoveryTests.java => SmallTranslogOpsRecoveryIT.java} (93%) rename core/src/test/java/org/elasticsearch/recovery/{SmallTranslogSizeRecoveryTests.java => SmallTranslogSizeRecoveryIT.java} (93%) rename core/src/test/java/org/elasticsearch/recovery/{TruncatedRecoveryTests.java => TruncatedRecoveryIT.java} (99%) rename core/src/test/java/org/elasticsearch/rest/{CorsRegexDefaultTests.java => CorsRegexDefaultIT.java} (96%) rename core/src/test/java/org/elasticsearch/rest/{CorsRegexTests.java => CorsRegexIT.java} (98%) rename core/src/test/java/org/elasticsearch/routing/{AliasResolveRoutingTests.java => AliasResolveRoutingIT.java} (99%) rename core/src/test/java/org/elasticsearch/routing/{AliasRoutingTests.java => AliasRoutingIT.java} (99%) rename core/src/test/java/org/elasticsearch/routing/{SimpleRoutingTests.java => SimpleRoutingIT.java} (99%) rename core/src/test/java/org/elasticsearch/script/{CustomScriptContextTests.java => CustomScriptContextIT.java} (98%) rename core/src/test/java/org/elasticsearch/script/{GroovyScriptTests.java => GroovyScriptIT.java} (99%) rename core/src/test/java/org/elasticsearch/script/{GroovySecurityTests.java => GroovySecurityIT.java} (98%) rename core/src/test/java/org/elasticsearch/script/{IndexLookupTests.java => IndexLookupIT.java} (99%) rename core/src/test/java/org/elasticsearch/script/{IndexedScriptTests.java => IndexedScriptIT.java} (99%) rename core/src/test/java/org/elasticsearch/script/{OnDiskScriptTests.java => OnDiskScriptIT.java} (99%) rename core/src/test/java/org/elasticsearch/script/{ScriptFieldTests.java => ScriptFieldIT.java} (98%) rename core/src/test/java/org/elasticsearch/script/{ScriptIndexSettingsTest.java => ScriptIndexSettingsIT.java} (98%) rename core/src/test/java/org/elasticsearch/script/expression/{ExpressionScriptTests.java => ExpressionScriptIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/{CountSearchTests.java => CountSearchIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/{SearchWithRejectionsTests.java => SearchWithRejectionsIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/{StressSearchServiceReaperTest.java => StressSearchServiceReaperIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/{AggregationsBinaryTests.java => AggregationsBinaryIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/{AggregationsIntegrationTests.java => AggregationsIntegrationIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/{CombiTests.java => CombiIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/{EquivalenceTests.java => EquivalenceIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/{MetaDataTests.java => MetaDataIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/{MissingValueTests.java => MissingValueIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/{ParsingTests.java => ParsingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{BooleanTermsTests.java => BooleanTermsIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ChildrenTests.java => ChildrenIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{DateHistogramTests.java => DateHistogramIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{DateHistogramOffsetTests.java => DateHistogramOffsetIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{DateRangeTests.java => DateRangeIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{DedicatedAggregationTests.java => DedicatedAggregationIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{FilterTests.java => FilterIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{FiltersTests.java => FiltersIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{GeoDistanceTests.java => GeoDistanceIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{GeoHashGridTests.java => GeoHashGridIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{GlobalTests.java => GlobalIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{HistogramTests.java => HistogramIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{IPv4RangeTests.java => IPv4RangeIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{MissingTests.java => MissingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{NaNSortingTests.java => NaNSortingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{NestedTests.java => NestedIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ParentIdAggTests.java => ParentIdAggIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{RangeTests.java => RangeIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ReverseNestedTests.java => ReverseNestedIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{SamplerTests.java => SamplerIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ShardReduceTests.java => ShardReduceIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{SignificantTermsTests.java => SignificantTermsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{SignificantTermsSignificanceScoreTests.java => SignificantTermsSignificanceScoreIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{TermsDocCountErrorTests.java => TermsDocCountErrorIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{TermsShardMinDocCountTests.java => TermsShardMinDocCountIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{TopHitsTests.java => TopHitsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{CardinalityTests.java => CardinalityIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{GeoBoundsTests.java => GeoBoundsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{ScriptedMetricTests.java => ScriptedMetricIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{ValueCountTests.java => ValueCountIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{AvgBucketTests.java => AvgBucketIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{BucketScriptTests.java => BucketScriptIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{BucketSelectorTests.java => BucketSelectorIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{CumulativeSumTests.java => CumulativeSumIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{DateDerivativeTests.java => DateDerivativeIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{DerivativeTests.java => DerivativeIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{MaxBucketTests.java => MaxBucketIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{MinBucketTests.java => MinBucketIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/{SumBucketTests.java => SumBucketIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/{MovAvgTests.java => MovAvgIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/{SerialDiffTests.java => SerialDiffIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/basic/{SearchWhileCreatingIndexTests.java => SearchWhileCreatingIndexIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/basic/{SearchWhileRelocatingTests.java => SearchWhileRelocatingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/basic/{SearchWithRandomExceptionsTests.java => SearchWithRandomExceptionsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/basic/{TransportSearchFailuresTests.java => TransportSearchFailuresIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/basic/{TransportTwoNodesSearchTests.java => TransportTwoNodesSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/child/{ChildQuerySearchBwcTests.java => ChildQuerySearchBwcIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/child/{ChildQuerySearchTests.java => ChildQuerySearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/child/{ParentFieldLoadingBwcTest.java => ParentFieldLoadingBwcIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/child/{ParentFieldLoadingTest.java => ParentFieldLoadingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/fetch/{FetchSubPhasePluginTests.java => FetchSubPhasePluginIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/fields/{SearchFieldsTests.java => SearchFieldsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/functionscore/{DecayFunctionScoreTests.java => DecayFunctionScoreIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/functionscore/{ExplainableScriptTests.java => ExplainableScriptIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/functionscore/{FunctionScoreFieldValueTests.java => FunctionScoreFieldValueIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/functionscore/{FunctionScoreTests.java => FunctionScoreIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/functionscore/{FunctionScorePluginTests.java => FunctionScorePluginIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/functionscore/{RandomScoreFunctionTests.java => RandomScoreFunctionIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/geo/{GeoBoundingBoxTests.java => GeoBoundingBoxIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/geo/{GeoDistanceTests.java => GeoDistanceIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/geo/{GeoFilterTests.java => GeoFilterIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/geo/{GeoPolygonTests.java => GeoPolygonIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/geo/{GeoShapeIntegrationTests.java => GeoShapeIntegrationIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/highlight/{CustomHighlighterSearchTests.java => CustomHighlighterSearchIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/highlight/{HighlighterSearchTests.java => HighlighterSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/indicesboost/{SimpleIndicesBoostSearchTests.java => SimpleIndicesBoostSearchIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/innerhits/{InnerHitsTests.java => InnerHitsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/matchedqueries/{MatchedQueriesTests.java => MatchedQueriesIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/morelikethis/{MoreLikeThisTests.java => MoreLikeThisIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/msearch/{SimpleMultiSearchTests.java => SimpleMultiSearchIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/preference/{SearchPreferenceTests.java => SearchPreferenceIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/query/{ExistsMissingTests.java => ExistsMissingIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/query/{MultiMatchQueryTests.java => MultiMatchQueryIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/query/{SearchQueryTests.java => SearchQueryIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/query/{SimpleQueryStringTests.java => SimpleQueryStringIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/rescore/{QueryRescorerTests.java => QueryRescorerIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/scan/{SearchScanTests.java => SearchScanIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/scan/{SearchScanScrollingTests.java => SearchScanScrollingIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/scriptfilter/{ScriptQuerySearchTests.java => ScriptQuerySearchIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/scroll/{DuelScrollTests.java => DuelScrollIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/scroll/{SearchScrollTests.java => SearchScrollIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/scroll/{SearchScrollWithFailingNodesTests.java => SearchScrollWithFailingNodesIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/simple/{SimpleSearchTests.java => SimpleSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/sort/{SimpleSortTests.java => SimpleSortIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/source/{SourceFetchingTests.java => SourceFetchingIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/stats/{SearchStatsTests.java => SearchStatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/suggest/{CompletionSuggestSearchTests.java => CompletionSuggestSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/suggest/{ContextSuggestSearchTests.java => ContextSuggestSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/suggest/{CustomSuggesterSearchTests.java => CustomSuggesterSearchIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/suggest/{SuggestSearchTests.java => SuggestSearchIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/timeout/{SearchTimeoutTests.java => SearchTimeoutIT.java} (96%) rename core/src/test/java/org/elasticsearch/similarity/{SimilarityTests.java => SimilarityIT.java} (98%) rename core/src/test/java/org/elasticsearch/test/disruption/{NetworkPartitionTests.java => NetworkPartitionIT.java} (96%) rename core/src/test/java/org/elasticsearch/test/test/{SuiteScopeClusterTests.java => SuiteScopeClusterIT.java} (97%) rename core/src/test/java/org/elasticsearch/test/test/{TestScopeClusterTests.java => TestScopeClusterIT.java} (96%) rename core/src/test/java/org/elasticsearch/threadpool/{SimpleThreadPoolTests.java => SimpleThreadPoolIT.java} (98%) rename core/src/test/java/org/elasticsearch/timestamp/{SimpleTimestampTests.java => SimpleTimestampIT.java} (99%) rename core/src/test/java/org/elasticsearch/transport/{ActionNamesTests.java => ActionNamesIT.java} (97%) rename core/src/test/java/org/elasticsearch/transport/{ContextAndHeaderTransportTests.java => ContextAndHeaderTransportIT.java} (99%) rename core/src/test/java/org/elasticsearch/transport/netty/{NettyTransportTests.java => NettyTransportIT.java} (99%) rename core/src/test/java/org/elasticsearch/transport/netty/{NettyTransportMultiPortIntegrationTests.java => NettyTransportMultiPortIntegrationIT.java} (98%) rename core/src/test/java/org/elasticsearch/tribe/{TribeTests.java => TribeIT.java} (99%) rename core/src/test/java/org/elasticsearch/ttl/{SimpleTTLTests.java => SimpleTTLIT.java} (99%) rename core/src/test/java/org/elasticsearch/update/{UpdateByNativeScriptTests.java => UpdateByNativeScriptIT.java} (97%) rename core/src/test/java/org/elasticsearch/update/{UpdateTests.java => UpdateIT.java} (99%) rename core/src/test/java/org/elasticsearch/update/{UpdateNoopTests.java => UpdateNoopIT.java} (99%) rename core/src/test/java/org/elasticsearch/validate/{RenderSearchTemplateTests.java => RenderSearchTemplateIT.java} (99%) rename core/src/test/java/org/elasticsearch/validate/{SimpleValidateQueryTests.java => SimpleValidateQueryIT.java} (99%) rename core/src/test/java/org/elasticsearch/versioning/{ConcurrentDocumentOperationTests.java => ConcurrentDocumentOperationIT.java} (97%) rename core/src/test/java/org/elasticsearch/versioning/{SimpleVersioningTests.java => SimpleVersioningIT.java} (99%) 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..6bf1d3ab114 100644 --- a/core/src/test/java/org/elasticsearch/action/IndicesRequestTests.java +++ b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java @@ -124,7 +124,7 @@ import static org.hamcrest.Matchers.instanceOf; @ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2) @Slow -public class IndicesRequestTests extends ElasticsearchIntegrationTest { +public class IndicesRequestIT extends ElasticsearchIntegrationTest { 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 97% rename from core/src/test/java/org/elasticsearch/action/ListenerActionTests.java rename to core/src/test/java/org/elasticsearch/action/ListenerActionIT.java index 50cde99fcdb..d371fd5b611 100644 --- a/core/src/test/java/org/elasticsearch/action/ListenerActionTests.java +++ b/core/src/test/java/org/elasticsearch/action/ListenerActionIT.java @@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicReference; /** */ -public class ListenerActionTests extends ElasticsearchIntegrationTest { +public class ListenerActionIT extends ElasticsearchIntegrationTest { @Test public void verifyThreadedListeners() throws Throwable { diff --git a/core/src/test/java/org/elasticsearch/action/RejectionActionTests.java b/core/src/test/java/org/elasticsearch/action/RejectionActionIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/action/RejectionActionTests.java rename to core/src/test/java/org/elasticsearch/action/RejectionActionIT.java index 273caa52296..7ca17b1a398 100644 --- a/core/src/test/java/org/elasticsearch/action/RejectionActionTests.java +++ b/core/src/test/java/org/elasticsearch/action/RejectionActionIT.java @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 2) -public class RejectionActionTests extends ElasticsearchIntegrationTest { +public class RejectionActionIT extends ElasticsearchIntegrationTest { @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 99% 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..dd7b6fb2b90 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsTest.java +++ b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.lessThan; /** */ @Slow -public class HotThreadsTest extends ElasticsearchIntegrationTest { +public class HotThreadsIT extends ElasticsearchIntegrationTest { @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 98% 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..90189204f73 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 @@ -38,7 +38,7 @@ 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 { +public class RepositoryBlocksIT extends ElasticsearchIntegrationTest { @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 99% 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..b3566013f64 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 @@ -46,7 +46,7 @@ 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 { +public class SnapshotBlocksIT extends ElasticsearchIntegrationTest { 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/stats/ClusterStatsTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java similarity index 99% 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..7a6c4294527 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 @@ -39,7 +39,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.SUITE, numDataNodes = 1, numClientNodes = 0) -public class ClusterStatsTests extends ElasticsearchIntegrationTest { +public class ClusterStatsIT extends ElasticsearchIntegrationTest { 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 96% 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..5a9ccd6a0b4 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 @@ -28,7 +28,7 @@ import java.util.Arrays; import static org.elasticsearch.cluster.metadata.IndexMetaData.*; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class PendingTasksBlocksTests extends ElasticsearchIntegrationTest { +public class PendingTasksBlocksIT extends ElasticsearchIntegrationTest { @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 97% 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..8aa22ee915a 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 @@ -31,7 +31,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFa import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class ClearIndicesCacheBlocksTests extends ElasticsearchIntegrationTest { +public class ClearIndicesCacheBlocksIT extends ElasticsearchIntegrationTest { @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 99% 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..c105450c1cc 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 @@ -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 ElasticsearchIntegrationTest{ @Test public void testCreationDate_Given() { 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 95% 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..f5993c4b134 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 @@ -26,7 +26,7 @@ import org.junit.Test; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBlocked; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class DeleteIndexBlocksTests extends ElasticsearchIntegrationTest{ +public class DeleteIndexBlocksIT extends ElasticsearchIntegrationTest{ @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 97% 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..df2321af5dd 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 @@ -31,7 +31,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFa import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class FlushBlocksTests extends ElasticsearchIntegrationTest { +public class FlushBlocksIT extends ElasticsearchIntegrationTest { @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 99% 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..2926ed80b80 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 @@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc import static org.hamcrest.Matchers.*; @ElasticsearchIntegrationTest.SuiteScopeTest -public class GetIndexTests extends ElasticsearchIntegrationTest { +public class GetIndexIT extends ElasticsearchIntegrationTest { private static final String[] allFeatures = { "_alias", "_aliases", "_mapping", "_mappings", "_settings", "_warmer", "_warmers" }; 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 97% 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..d4122e3ebf4 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 @@ -31,7 +31,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFa import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class OptimizeBlocksTests extends ElasticsearchIntegrationTest { +public class OptimizeBlocksIT extends ElasticsearchIntegrationTest { @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 97% 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..6143d933508 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 @@ -32,7 +32,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFa import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class RefreshBlocksTests extends ElasticsearchIntegrationTest { +public class RefreshBlocksIT extends ElasticsearchIntegrationTest { @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 97% 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..efe632d190c 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 @@ -30,7 +30,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class IndicesSegmentsBlocksTests extends ElasticsearchIntegrationTest { +public class IndicesSegmentsBlocksIT extends ElasticsearchIntegrationTest { @Test public void testIndicesSegmentsWithBlocks() { 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 99% 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..13c273b93b0 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 @@ -49,7 +49,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTi import static org.hamcrest.Matchers.*; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class IndicesShardStoreRequestTests extends ElasticsearchIntegrationTest { +public class IndicesShardStoreRequestIT extends ElasticsearchIntegrationTest { @Test public void testEmpty() { 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 96% 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..fa8ff594dc1 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 @@ -30,7 +30,7 @@ import java.util.Arrays; import static org.elasticsearch.cluster.metadata.IndexMetaData.*; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class IndicesStatsBlocksTests extends ElasticsearchIntegrationTest { +public class IndicesStatsBlocksIT extends ElasticsearchIntegrationTest { @Test public void testIndicesStatsWithBlocks() { 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 96% 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..cd52f6a3a77 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java @@ -28,7 +28,7 @@ import org.junit.Test; import static org.elasticsearch.common.io.Streams.copyToStringFromClasspath; -public class BulkIntegrationTests extends ElasticsearchIntegrationTest { +public class BulkIntegrationIT extends ElasticsearchIntegrationTest { @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 96% 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..be6fcca12d0 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java @@ -26,7 +26,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; import org.junit.Test; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class BulkProcessorClusterSettingsTests extends ElasticsearchIntegrationTest { +public class BulkProcessorClusterSettingsIT extends ElasticsearchIntegrationTest { @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..0e50dfdcc47 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorTests.java +++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void testThatBulkProcessorCountIsCorrect() throws InterruptedException { 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..0dca5ab5e01 100644 --- a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqTests.java +++ b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected int numberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java rename to core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java index 4ff70bf88df..70eba662598 100644 --- a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesTests.java +++ b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java @@ -69,7 +69,7 @@ import static org.hamcrest.Matchers.*; * */ @Slow -public class IndexAliasesTests extends ElasticsearchIntegrationTest { +public class IndexAliasesIT extends ElasticsearchIntegrationTest { @Test public void testAliases() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java b/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java rename to core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java index b70ba625414..f9ad7749d68 100644 --- a/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksTests.java +++ b/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java @@ -36,7 +36,7 @@ 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 { +public class SimpleBlocksIT extends ElasticsearchIntegrationTest { @Test public void verifyIndexAndClusterReadOnly() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java b/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java similarity index 97% rename from core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java rename to core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java index baaa5045be7..f961acc2b83 100644 --- a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsTests.java +++ b/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected int maximumNumberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index 76d44642e41..94cebcc677e 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java @@ -72,7 +72,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0) @LuceneTestCase.SuppressFileSystems("ExtrasFS") @LuceneTestCase.Slow -public class OldIndexBackwardsCompatibilityTests extends ElasticsearchIntegrationTest { +public class OldIndexBackwardsCompatibilityIT extends ElasticsearchIntegrationTest { // TODO: test for proper exception on unsupported indexes (maybe via separate test?) // We have a 0.20.6.zip etc for this. 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 96% 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..7d8f15ffd8d 100644 --- a/core/src/test/java/org/elasticsearch/client/node/NodeClientTests.java +++ b/core/src/test/java/org/elasticsearch/client/node/NodeClientIT.java @@ -32,7 +32,7 @@ import static org.hamcrest.Matchers.is; * */ @ClusterScope(scope = Scope.SUITE) -public class NodeClientTests extends ElasticsearchIntegrationTest { +public class NodeClientIT extends ElasticsearchIntegrationTest { @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 98% 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..0c0d1c2a973 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientTests.java +++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java @@ -40,7 +40,7 @@ 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 ElasticsearchIntegrationTest { @Test public void testPickingUpChangesInDiscoveryNode() { 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 98% 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..8e7a378a809 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryTests.java +++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java @@ -47,7 +47,7 @@ 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 ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/cluster/ClusterHealthTests.java rename to core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java index 658da8bde36..6c1e4d20265 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java @@ -27,7 +27,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.equalTo; -public class ClusterHealthTests extends ElasticsearchIntegrationTest { +public class ClusterHealthIT extends ElasticsearchIntegrationTest { @Test diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java rename to core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java index 699e8ed9d11..96caf287487 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java @@ -62,18 +62,18 @@ 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 { +public class ClusterInfoServiceIT extends ElasticsearchIntegrationTest { 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..95c9b3152d5 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java @@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ClusterServiceTests extends ElasticsearchIntegrationTest { +public class ClusterServiceIT extends ElasticsearchIntegrationTest { @Test public void testTimeoutUpdateTask() throws Exception { 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..f8dd1320f0e 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.is; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 0, numClientNodes = 0) -public class ClusterStateDiffTests extends ElasticsearchIntegrationTest { +public class ClusterStateDiffIT extends ElasticsearchIntegrationTest { @Test public void testClusterStateDiffSerialization() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java rename to core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java index f18954df22f..0f07c075c91 100644 --- a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java @@ -45,7 +45,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.hamcrest.Matchers.*; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest { +public class MinimumMasterNodesIT extends ElasticsearchIntegrationTest { @Test @TestLogging("cluster.service:TRACE,discovery.zen:TRACE,gateway:TRACE,transport.tracer:TRACE") diff --git a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java b/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java rename to core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java index 21e8682bbc1..514015df546 100644 --- a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateTests.java rename to core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java index d3b26ac6307..250aca5b5ef 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java @@ -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 ElasticsearchIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesTests.java rename to core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java index d02bf477fe5..9f2dea3229a 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class SimpleDataNodesTests extends ElasticsearchIntegrationTest { +public class SimpleDataNodesIT extends ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesTests.java rename to core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java index 54bb8ffafc3..076350129df 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*; */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @Slow -public class SpecificMasterNodesTests extends ElasticsearchIntegrationTest { +public class SpecificMasterNodesIT extends ElasticsearchIntegrationTest { 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 97% rename from core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationTests.java rename to core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java index 416bc90bd24..69cda15e00e 100644 --- a/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java @@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class UpdateSettingsValidationTests extends ElasticsearchIntegrationTest { +public class UpdateSettingsValidationIT extends ElasticsearchIntegrationTest { @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 98% 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..608461b2eb6 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java @@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = TEST, minNumDataNodes = 2) -public class AckClusterUpdateSettingsTests extends ElasticsearchIntegrationTest { +public class AckClusterUpdateSettingsIT extends ElasticsearchIntegrationTest { @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 99% 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..f1eb4850f02 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ack/AckTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java @@ -57,7 +57,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.*; @ClusterScope(minNumDataNodes = 2) -public class AckTests extends ElasticsearchIntegrationTest { +public class AckIT extends ElasticsearchIntegrationTest { @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 99% 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..b136f3508bf 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java @@ -45,9 +45,9 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ClusterScope(scope= ElasticsearchIntegrationTest.Scope.TEST, numDataNodes =0, minNumDataNodes = 2) -public class AwarenessAllocationTests extends ElasticsearchIntegrationTest { +public class AwarenessAllocationIT extends ElasticsearchIntegrationTest { - private final ESLogger logger = Loggers.getLogger(AwarenessAllocationTests.class); + private final ESLogger logger = Loggers.getLogger(AwarenessAllocationIT.class); @Override protected int numberOfReplicas() { 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 99% 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..00a5dc3800b 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java @@ -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 ElasticsearchIntegrationTest { - 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 98% 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..ab242d487a4 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java @@ -38,9 +38,9 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.*; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class FilteringAllocationTests extends ElasticsearchIntegrationTest { +public class FilteringAllocationIT extends ElasticsearchIntegrationTest { - 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 97% 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..a539c598735 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java @@ -33,7 +33,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.*; import static org.hamcrest.Matchers.instanceOf; @ClusterScope(scope= Scope.TEST, numDataNodes =0) -public class ShardsAllocatorModuleTests extends ElasticsearchIntegrationTest { +public class ShardsAllocatorModuleIT extends ElasticsearchIntegrationTest { 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 97% 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..7c06a3ad8d4 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected int numberOfShards() { 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 99% 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..c162142c2ab 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0) -public class DelayedAllocationTests extends ElasticsearchIntegrationTest { +public class DelayedAllocationIT extends ElasticsearchIntegrationTest { /** * 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/RoutingBackwardCompatibilityUponUpgradeTests.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java similarity index 97% 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..3545f3d2364 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java @@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.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 ElasticsearchIntegrationTest { public void testDefaultRouting() throws Exception { test("default_routing_1_x", DjbHashFunction.class, false); 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 98% 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..5d2f3bcd087 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 @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo; * works as expected. */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0) -public class EnableAllocationDeciderIntegrationTest extends ElasticsearchIntegrationTest { +public class EnableAllocationDeciderIT extends ElasticsearchIntegrationTest { public void testEnableRebalance() throws InterruptedException { final String firstNode = internalCluster().startNode(); 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 99% 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..20b1577ace9 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 @@ -51,7 +51,7 @@ 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 { +public class MockDiskUsagesIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 98% 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..926a4e12a91 100644 --- a/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java @@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc import static org.hamcrest.Matchers.*; @ClusterScope(scope = TEST) -public class ClusterSettingsTests extends ElasticsearchIntegrationTest { +public class ClusterSettingsIT extends ElasticsearchIntegrationTest { @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 98% 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..8bce603658d 100644 --- a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java @@ -39,7 +39,7 @@ 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 ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 99% 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..94635db1ab7 100644 --- a/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ClusterScope(scope= Scope.SUITE, numDataNodes = 2) -public class ClusterSearchShardsTests extends ElasticsearchIntegrationTest { +public class ClusterSearchShardsIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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..324d0f2fc37 100644 --- a/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java +++ b/core/src/test/java/org/elasticsearch/common/util/MultiDataPathUpgraderTests.java @@ -24,7 +24,7 @@ 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; @@ -134,7 +134,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 +177,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/consistencylevel/WriteConsistencyLevelTests.java b/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelTests.java rename to core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java index 5019f6eaee7..bbeef21e05d 100644 --- a/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelTests.java +++ b/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo; /** * */ -public class WriteConsistencyLevelTests extends ElasticsearchIntegrationTest { +public class WriteConsistencyLevelIT extends ElasticsearchIntegrationTest { @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 99% 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..de2bb6f0e6c 100644 --- a/core/src/test/java/org/elasticsearch/count/simple/SimpleCountTests.java +++ b/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void testCountRandomPreference() throws InterruptedException, ExecutionException { 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..556b9023593 100644 --- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsTests.java +++ b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java @@ -76,7 +76,7 @@ import static org.hamcrest.Matchers.*; */ @LuceneTestCase.Slow @ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0) -public class DiscoveryWithServiceDisruptionsTests extends ElasticsearchIntegrationTest { +public class DiscoveryWithServiceDisruptionsIT extends ElasticsearchIntegrationTest { private static final TimeValue DISRUPTION_HEALING_OVERHEAD = TimeValue.timeValueSeconds(40); // we use 30s as timeout in many places. diff --git a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java rename to core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java index dc925078567..6de8d6c310f 100644 --- a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryTests.java +++ b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @Slow -public class ZenUnicastDiscoveryTests extends ElasticsearchIntegrationTest { +public class ZenUnicastDiscoveryIT extends ElasticsearchIntegrationTest { private ClusterDiscoveryConfiguration discoveryConfig; 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 99% 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..4e3108ed280 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryTests.java +++ b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java @@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.*; */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0) @Slow -public class ZenDiscoveryTests extends ElasticsearchIntegrationTest { +public class ZenDiscoveryIT extends ElasticsearchIntegrationTest { @Test public void testChangeRejoinOnMasterOptionIsDynamic() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java b/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java index 8d757cd7d54..89ea73d56ef 100644 --- a/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java +++ b/core/src/test/java/org/elasticsearch/document/AliasedIndexDocumentActionsTests.java @@ -26,7 +26,7 @@ import static org.elasticsearch.client.Requests.createIndexRequest; /** * */ -public class AliasedIndexDocumentActionsTests extends DocumentActionsTests { +public class AliasedIndexDocumentActionsTests 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..77cbf00565e 100644 --- a/core/src/test/java/org/elasticsearch/document/BulkTests.java +++ b/core/src/test/java/org/elasticsearch/document/BulkIT.java @@ -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 ElasticsearchIntegrationTest { @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..404f27224a4 100644 --- a/core/src/test/java/org/elasticsearch/document/DocumentActionsTests.java +++ b/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java @@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class DocumentActionsTests extends ElasticsearchIntegrationTest { +public class DocumentActionsIT extends ElasticsearchIntegrationTest { 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..0cd41570ec9 100644 --- a/core/src/test/java/org/elasticsearch/document/ShardInfoTests.java +++ b/core/src/test/java/org/elasticsearch/document/ShardInfoIT.java @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*; /** */ -public class ShardInfoTests extends ElasticsearchIntegrationTest { +public class ShardInfoIT extends ElasticsearchIntegrationTest { private int numCopies; private int numNodes; diff --git a/core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java b/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java rename to core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java index 85280f06d69..4da69fa51be 100644 --- a/core/src/test/java/org/elasticsearch/exists/SimpleExistsTests.java +++ b/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java @@ -29,7 +29,7 @@ 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 ElasticsearchIntegrationTest { @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..685c19c6884 100644 --- a/core/src/test/java/org/elasticsearch/explain/ExplainActionTests.java +++ b/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.notNullValue; /** */ -public class ExplainActionTests extends ElasticsearchIntegrationTest { +public class ExplainActionIT extends ElasticsearchIntegrationTest { @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..b8823b0e00c 100644 --- a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.*; /** */ -public class FieldStatsIntegrationTests extends ElasticsearchIntegrationTest { +public class FieldStatsIntegrationIT extends ElasticsearchIntegrationTest { public void testRandom() throws Exception { assertAcked(prepareCreate("test").addMapping( diff --git a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java rename to core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java index 186e05da604..f889200ef67 100644 --- a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java @@ -51,9 +51,9 @@ import static org.hamcrest.Matchers.nullValue; */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @Slow -public class GatewayIndexStateTests extends ElasticsearchIntegrationTest { +public class GatewayIndexStateIT extends ElasticsearchIntegrationTest { - 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/MetaDataWriteDataNodesTests.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesTests.java rename to core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java index afa3c5b44c1..e625f7e98db 100644 --- a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.equalTo; */ @LuceneTestCase.Slow @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class MetaDataWriteDataNodesTests extends ElasticsearchIntegrationTest { +public class MetaDataWriteDataNodesIT extends ElasticsearchIntegrationTest { @Test public void testMetaWrittenAlsoOnDataNode() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java rename to core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java index 0f5a5816c7e..c6d8332cc23 100644 --- a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java @@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(numDataNodes =0, scope= Scope.TEST) -public class QuorumGatewayTests extends ElasticsearchIntegrationTest { +public class QuorumGatewayIT extends ElasticsearchIntegrationTest { @Override protected int numberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java rename to core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java index 35bc9fb3e03..ff319e479c7 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.hasItem; */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @Slow -public class RecoverAfterNodesTests extends ElasticsearchIntegrationTest { +public class RecoverAfterNodesIT extends ElasticsearchIntegrationTest { private final static TimeValue BLOCK_WAIT_TIMEOUT = TimeValue.timeValueSeconds(10); diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java rename to core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java index be048f1b9a3..78455f136cc 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.*; */ @ClusterScope(numDataNodes = 0, scope = Scope.TEST) @Slow -public class RecoveryFromGatewayTests extends ElasticsearchIntegrationTest { +public class RecoveryFromGatewayIT extends ElasticsearchIntegrationTest { @Test @Slow 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..c76c77e2f17 100644 --- a/core/src/test/java/org/elasticsearch/get/GetActionTests.java +++ b/core/src/test/java/org/elasticsearch/get/GetActionIT.java @@ -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 ElasticsearchIntegrationTest { @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 97% 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..4df65284c60 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortTests.java +++ b/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java @@ -33,7 +33,7 @@ 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 ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 97% 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..0c789b860a4 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIntegrationTest.java +++ b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.java @@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 1) -public class NettyPipeliningDisabledIntegrationTest extends ElasticsearchIntegrationTest { +public class NettyPipeliningDisabledIT extends ElasticsearchIntegrationTest { @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 97% 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..1901bdaec08 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIntegrationTest.java +++ b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.is; @ClusterScope(scope = Scope.TEST, numDataNodes = 1) -public class NettyPipeliningEnabledIntegrationTest extends ElasticsearchIntegrationTest { +public class NettyPipeliningEnabledIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java b/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java similarity index 97% rename from core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java rename to core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java index e77242cfea8..6ffb789c49a 100644 --- a/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java @@ -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 ElasticsearchIntegrationTest { @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..d0a7e3f9f6b 100644 --- a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasTests.java +++ b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java @@ -66,7 +66,7 @@ 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 { +public class IndexWithShadowReplicasIT extends ElasticsearchIntegrationTest { 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 98% rename from core/src/test/java/org/elasticsearch/index/TransportIndexFailuresTest.java rename to core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java index b6ef53db87a..6d3d63a8ef3 100644 --- a/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresTest.java +++ b/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java @@ -48,7 +48,7 @@ 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 { +public class TransportIndexFailuresIT extends ElasticsearchIntegrationTest { 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/engine/InternalEngineIntegrationTest.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java similarity index 97% 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..ebd6965eb3c 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIntegrationTest.java +++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% 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..c0b21d685ae 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeTests.java +++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java @@ -43,7 +43,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFa /** */ @ClusterScope(numDataNodes = 1, scope = Scope.SUITE) -public class InternalEngineMergeTests extends ElasticsearchIntegrationTest { +public class InternalEngineMergeIT extends ElasticsearchIntegrationTest { @Test @Slow 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..befd7b94f2d 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; @@ -1750,7 +1750,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/fielddata/FieldDataFilterIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java similarity index 97% 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..602ab03498f 100644 --- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java @@ -36,7 +36,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 ElasticsearchIntegrationTest { @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 97% 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..07fa7e44c3d 100644 --- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingTests.java +++ b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java @@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.greaterThan; /** */ -public class FieldDataLoadingTests extends ElasticsearchIntegrationTest { +public class FieldDataLoadingIT extends ElasticsearchIntegrationTest { @Test public void testEagerFieldDataLoading() 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 98% 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..9d0ae62a315 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.java @@ -30,7 +30,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -public class DynamicMappingIntegrationTests extends ElasticsearchIntegrationTest { +public class DynamicMappingIntegrationIT extends ElasticsearchIntegrationTest { 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/TransformOnIndexMapperIntegrationTest.java b/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java similarity index 99% 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..fb0bdf88551 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIntegrationTest.java +++ b/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void searchOnTransformed() throws Exception { setup(true); 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 97% 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..5265b1b6401 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 @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ -public class CopyToMapperIntegrationTests extends ElasticsearchIntegrationTest { +public class CopyToMapperIntegrationIT extends ElasticsearchIntegrationTest { @Test 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 98% 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..d9f02ec1234 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 @@ -42,7 +42,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 ElasticsearchIntegrationTest { @ParametersFactory public static Iterable buildParameters() { List parameters = new ArrayList<>(); @@ -57,7 +57,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/externalvalues/ExternalValuesMapperIntegrationTests.java b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.java similarity index 98% 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..4eed5a677b6 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 @@ -30,7 +30,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.equalTo; -public class ExternalValuesMapperIntegrationTests extends ElasticsearchIntegrationTest { +public class ExternalValuesMapperIntegrationIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 99% 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..ee38e42b83a 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 @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.*; /** */ -public class MultiFieldsIntegrationTests extends ElasticsearchIntegrationTest { +public class MultiFieldsIntegrationIT extends ElasticsearchIntegrationTest { @Test public void testMultiFields() 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 98% 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..9d574574ed3 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 @@ -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 ElasticsearchIntegrationTest { @Test // issue 5053 public void testThatUpdatingMappingShouldNotRemoveSizeMappingConfiguration() 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 99% 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..923473c8b70 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 @@ -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 ElasticsearchIntegrationTest { private static final String INDEX = "index"; private static final String TYPE = "type"; 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..d1fb07e7140 100644 --- a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryTest.java +++ b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java @@ -58,7 +58,7 @@ 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 { +public class TemplateQueryIT extends ElasticsearchIntegrationTest { @Before public void setup() throws IOException { 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 98% 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..080998c97a2 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 @@ -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 ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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..5a37666da75 100644 --- a/core/src/test/java/org/elasticsearch/index/store/CorruptedFileTest.java +++ b/core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java @@ -90,7 +90,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.*; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) -public class CorruptedFileTest extends ElasticsearchIntegrationTest { +public class CorruptedFileIT extends ElasticsearchIntegrationTest { @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 99% 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..1e35a9656ee 100644 --- a/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogTests.java +++ b/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java @@ -58,7 +58,7 @@ 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 { +public class CorruptedTranslogIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 98% 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..d1beafd8278 100644 --- a/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryTests.java +++ b/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java @@ -48,7 +48,7 @@ import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.greaterThan; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) -public class ExceptionRetryTests extends ElasticsearchIntegrationTest { +public class ExceptionRetryIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 99% 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..ed189eb54a3 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 @@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.*; /** */ @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SuggestStatsTests extends ElasticsearchIntegrationTest { +public class SuggestStatsIT extends ElasticsearchIntegrationTest { @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..26b444764ef 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; @@ -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/indexing/IndexActionTests.java b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/indexing/IndexActionTests.java rename to core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java index 9201e1c381d..1af1cd58891 100644 --- a/core/src/test/java/org/elasticsearch/indexing/IndexActionTests.java +++ b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * */ -public class IndexActionTests extends ElasticsearchIntegrationTest { +public class IndexActionIT extends ElasticsearchIntegrationTest { /** * This test tries to simulate load while creating an index and indexing documents diff --git a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java rename to core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java index b49f7ab535c..8077d21642e 100644 --- a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionTests.java +++ b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java @@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndexLifecycleActionTests extends ElasticsearchIntegrationTest { +public class IndexLifecycleActionIT extends ElasticsearchIntegrationTest { @Slow @Test diff --git a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java b/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java similarity index 97% rename from core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java rename to core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java index 42fd8fa2736..0531e3942ab 100644 --- a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java @@ -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 ElasticsearchIntegrationTest { 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 98% rename from core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathTests.java rename to core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java index a6513b69689..b3deb7de470 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathTests.java +++ b/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java @@ -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 ElasticsearchIntegrationTest { 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 99% rename from core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerTests.java rename to core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java index 05756388a65..a2e8fbaf7e3 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerTests.java +++ b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java @@ -59,7 +59,7 @@ 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 ElasticsearchIntegrationTest { @Test public void testBeforeIndexAddedToCluster() throws Exception { 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..f9eeb7fef43 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java @@ -64,7 +64,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 ElasticsearchIntegrationTest { @Test public void testSpecifiedIndexUnavailable_multipleIndices() throws Exception { 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 99% 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..74143af2522 100644 --- a/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java @@ -41,7 +41,7 @@ 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 { +public class PreBuiltAnalyzerIntegrationIT extends ElasticsearchIntegrationTest { @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..119d5d2f9fc 100644 --- a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionTests.java +++ b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class AnalyzeActionTests extends ElasticsearchIntegrationTest { +public class AnalyzeActionIT extends ElasticsearchIntegrationTest { @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 98% 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..da813f96b6e 100644 --- a/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceTests.java +++ b/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% 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..5332959fbce 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 @@ -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 ElasticsearchIntegrationTest { // 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 98% 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..5f65990ffe9 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 @@ -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 ElasticsearchIntegrationTest { @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 98% 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..261698d1d8d 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 @@ -36,7 +36,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 ElasticsearchIntegrationTest { @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 99% 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..f3c29776852 100644 --- a/core/src/test/java/org/elasticsearch/indices/flush/FlushTest.java +++ b/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void testWaitIfOngoing() throws InterruptedException { 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 98% 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..50c9827c2d6 100644 --- a/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksTests.java +++ b/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.java @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.nullValue; /** */ @ClusterScope(scope= Scope.TEST, numDataNodes =1) -public class IndicesLeaksTests extends ElasticsearchIntegrationTest { +public class IndicesLeaksIT extends ElasticsearchIntegrationTest { @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 97% 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..a418325e36a 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java @@ -41,7 +41,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC 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 { +public class ConcurrentDynamicTemplateIT extends ElasticsearchIntegrationTest { 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/DedicatedMasterGetFieldMappingTests.java index 2b7e7a0e77c..1800c94f9e6 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java @@ -31,7 +31,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; */ @Slow @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class DedicatedMasterGetFieldMappingTests extends SimpleGetFieldMappingsTests { +public class DedicatedMasterGetFieldMappingTests 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 99% 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..1cdd3689615 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java @@ -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 ElasticsearchIntegrationTest { 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 99% 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..90437638a96 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue; * */ @ClusterScope(randomDynamicTemplates = false) -public class SimpleGetMappingsTests extends ElasticsearchIntegrationTest { +public class SimpleGetMappingsIT extends ElasticsearchIntegrationTest { @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 99% 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..080a65b82c8 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% 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..850d8993437 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerTests.java +++ b/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java @@ -33,7 +33,7 @@ import org.junit.Test; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0) -public class IndexingMemoryControllerTests extends ElasticsearchIntegrationTest { +public class IndexingMemoryControllerIT extends ElasticsearchIntegrationTest { @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 98% 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..3d96ff9a1e5 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 @@ -38,7 +38,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke /** Tests for the noop breakers, which are non-dynamic settings */ @ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes=0) -public class CircuitBreakerNoopTests extends ElasticsearchIntegrationTest { +public class CircuitBreakerNoopIT extends ElasticsearchIntegrationTest { @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 99% 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..6bbd5673dac 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 @@ -63,7 +63,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 ElasticsearchIntegrationTest { /** Reset all breaker settings back to their defaults */ private void reset() { 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 99% 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..9703d36a64b 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 @@ -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 ElasticsearchIntegrationTest { @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..e1f1d7ec0a9 100644 --- a/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryTests.java +++ b/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java @@ -73,7 +73,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndexRecoveryTests extends ElasticsearchIntegrationTest { +public class IndexRecoveryIT extends ElasticsearchIntegrationTest { 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/settings/GetSettingsBlocksTests.java b/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java similarity index 97% 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..3e0d1282957 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksTests.java +++ b/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% 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..ac6ba50d237 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasTests.java +++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java @@ -38,7 +38,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.hamcrest.Matchers.equalTo; @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class UpdateNumberOfReplicasTests extends ElasticsearchIntegrationTest { +public class UpdateNumberOfReplicasIT extends ElasticsearchIntegrationTest { @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 99% 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..df73f01cf0e 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsTests.java +++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void testOpenCloseUpdateSettings() throws Exception { 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 98% 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..419d850ce7e 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllTests.java +++ b/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java @@ -34,7 +34,7 @@ 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 ElasticsearchIntegrationTest { @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..11cb30e9550 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexTests.java +++ b/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java @@ -46,7 +46,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 ElasticsearchIntegrationTest { @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 99% 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..36144b0fcd5 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateTests.java +++ b/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java @@ -65,7 +65,7 @@ import static org.hamcrest.Matchers.*; /** */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0) -public class RareClusterStateTests extends ElasticsearchIntegrationTest { +public class RareClusterStateIT extends ElasticsearchIntegrationTest { @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 98% 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..b6f24e5c6ce 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateTests.java +++ b/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java @@ -45,9 +45,9 @@ import static org.hamcrest.Matchers.nullValue; * */ @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SimpleIndexStateTests extends ElasticsearchIntegrationTest { +public class SimpleIndexStateIT extends ElasticsearchIntegrationTest { - 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..5a2885f4a95 100644 --- a/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsTests.java +++ b/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 99% 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..c844e52bb93 100644 --- a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java @@ -72,7 +72,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndicesStoreIntegrationTests extends ElasticsearchIntegrationTest { +public class IndicesStoreIntegrationIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { // simplify this and only use a single data path 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 97% 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..28a6043479a 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksTests.java +++ b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java @@ -32,7 +32,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc import static org.hamcrest.Matchers.hasSize; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class IndexTemplateBlocksTests extends ElasticsearchIntegrationTest { +public class IndexTemplateBlocksIT extends ElasticsearchIntegrationTest { @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 98% 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..5c8582287f8 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringTests.java +++ b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java @@ -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 ElasticsearchIntegrationTest{ @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..0d5921f115a 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateTests.java +++ b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java @@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class SimpleIndexTemplateTests extends ElasticsearchIntegrationTest { +public class SimpleIndexTemplateIT extends ElasticsearchIntegrationTest { @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 98% 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..381141e2d67 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerTests.java +++ b/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java @@ -39,9 +39,9 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ClusterScope(numDataNodes =0, scope= Scope.TEST) -public class GatewayIndicesWarmerTests extends ElasticsearchIntegrationTest { +public class GatewayIndicesWarmerIT extends ElasticsearchIntegrationTest { - 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 98% 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..8337307e2be 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksTests.java +++ b/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java @@ -38,7 +38,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertBloc import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class IndicesWarmerBlocksTests extends ElasticsearchIntegrationTest { +public class IndicesWarmerBlocksIT extends ElasticsearchIntegrationTest { @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..98ee75cc2f0 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerTests.java +++ b/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/mget/SimpleMgetTests.java rename to core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java index 20038763892..cf67024ad98 100644 --- a/core/src/test/java/org/elasticsearch/mget/SimpleMgetTests.java +++ b/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java @@ -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 ElasticsearchIntegrationTest { @Test public void testThatMgetShouldWorkWithOneIndexMissing() throws IOException { 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..1329537cdd2 100644 --- a/core/src/test/java/org/elasticsearch/nested/SimpleNestedTests.java +++ b/core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.java @@ -51,7 +51,7 @@ 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 ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java rename to core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java index 979bc8b4543..6ebf02bea17 100644 --- a/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkTests.java +++ b/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java @@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC /** */ -public class DirectBufferNetworkTests extends ElasticsearchIntegrationTest { +public class DirectBufferNetworkIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java b/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java rename to core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java index 2390e3b9f85..bfd2dc59153 100644 --- a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java @@ -30,7 +30,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class DestructiveOperationsIntegrationTests extends ElasticsearchIntegrationTest { +public class DestructiveOperationsIntegrationIT extends ElasticsearchIntegrationTest { @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 97% 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..1835226ca6e 100644 --- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledTest.java +++ b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.java @@ -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 ElasticsearchIntegrationTest { // 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 97% 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..5422f0103ab 100644 --- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledTest.java +++ b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java @@ -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 ElasticsearchIntegrationTest { // 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 99% rename from core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorTests.java rename to core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java index 82e61defa12..08eb692b1cf 100644 --- a/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/percolator/MultiPercolatorTests.java rename to core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java index 1707f03fb61..d72e0f8ffe8 100644 --- a/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java @@ -35,14 +35,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 ElasticsearchIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityTests.java rename to core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java index 4c2cfcf487e..ada19158421 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.instanceOf; /** */ -public class PercolatorBackwardsCompatibilityTests extends ElasticsearchIntegrationTest { +public class PercolatorBackwardsCompatibilityIT extends ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsTests.java rename to core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java index e14dbf60dab..a6246bcae3c 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * */ -public class PercolatorFacetsAndAggregationsTests extends ElasticsearchIntegrationTest { +public class PercolatorFacetsAndAggregationsIT extends ElasticsearchIntegrationTest { @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 46144a0b39f..2b1eb762e98 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java @@ -95,7 +95,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class PercolatorTests extends ElasticsearchIntegrationTest { +public class PercolatorIT extends ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java rename to core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java index ec4d65316c3..3ed323229bb 100644 --- a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java @@ -47,14 +47,14 @@ 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.percolator.PercolatorIT.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.*; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0) -public class RecoveryPercolatorTests extends ElasticsearchIntegrationTest { +public class RecoveryPercolatorIT extends ElasticsearchIntegrationTest { @Override protected int numberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java b/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java rename to core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java index dff850d9bf6..066409be0e9 100644 --- a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorTests.java +++ b/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java @@ -39,7 +39,7 @@ 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.*; @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.*; /** */ @ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class TTLPercolatorTests extends ElasticsearchIntegrationTest { +public class TTLPercolatorIT extends ElasticsearchIntegrationTest { 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 98% rename from core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleTests.java rename to core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java index 832d04c5d0d..da0f6471009 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.SUITE, numDataNodes = 2) -public class PluggableTransportModuleTests extends ElasticsearchIntegrationTest { +public class PluggableTransportModuleIT extends ElasticsearchIntegrationTest { public static final AtomicInteger SENT_REQUEST_COUNTER = new AtomicInteger(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 99% rename from core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java rename to core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java index d0993dba87b..34bcbb6d852 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java @@ -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 ElasticsearchIntegrationTest { private Tuple initialSettings; private CaptureOutputTerminal terminal = new CaptureOutputTerminal(); diff --git a/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java b/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java similarity index 96% rename from core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java rename to core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java index 96673555e09..1b3260ae5e5 100644 --- a/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/plugins/SitePluginTests.java rename to core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java index 254d35253cb..505d3ee3222 100644 --- a/core/src/test/java/org/elasticsearch/plugins/SitePluginTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java @@ -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 ElasticsearchIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigTests.java rename to core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java index 78dd6809033..86e39bb43cc 100644 --- a/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java @@ -38,7 +38,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasStatus; @ClusterScope(scope = SUITE, numDataNodes = 1) -public class SitePluginRelativePathConfigTests extends ElasticsearchIntegrationTest { +public class SitePluginRelativePathConfigIT extends ElasticsearchIntegrationTest { 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 98% rename from core/src/test/java/org/elasticsearch/recovery/FullRollingRestartTests.java rename to core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java index dd859b46fb4..29dd39681ee 100644 --- a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartTests.java +++ b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java @@ -37,7 +37,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0.0) -public class FullRollingRestartTests extends ElasticsearchIntegrationTest { +public class FullRollingRestartIT extends ElasticsearchIntegrationTest { protected void assertTimeout(ClusterHealthRequestBuilder requestBuilder) { ClusterHealthResponse clusterHealth = requestBuilder.get(); diff --git a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java rename to core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java index cccfe8024b7..8570ac3e9a3 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadTests.java +++ b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java @@ -45,9 +45,9 @@ import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.equalTo; -public class RecoveryWhileUnderLoadTests extends ElasticsearchIntegrationTest { +public class RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { - private final ESLogger logger = Loggers.getLogger(RecoveryWhileUnderLoadTests.class); + private final ESLogger logger = Loggers.getLogger(RecoveryWhileUnderLoadIT.class); @Test @Slow diff --git a/core/src/test/java/org/elasticsearch/recovery/RelocationTests.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/recovery/RelocationTests.java rename to core/src/test/java/org/elasticsearch/recovery/RelocationIT.java index 4f61be0b273..c59729fba8f 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RelocationTests.java +++ b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java @@ -86,7 +86,7 @@ import static org.hamcrest.Matchers.*; */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @TestLogging("indices.recovery:TRACE,index.shard.service:TRACE") -public class RelocationTests extends ElasticsearchIntegrationTest { +public class RelocationIT extends ElasticsearchIntegrationTest { private final TimeValue ACCEPTABLE_RELOCATION_TIME = new TimeValue(5, TimeUnit.MINUTES); @Override diff --git a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java b/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java rename to core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java index f91ce01967c..208dfb275fb 100644 --- a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryTests.java +++ b/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryTests.java rename to core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java index 02656e9e4e0..c407ae64b8a 100644 --- a/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryTests.java +++ b/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java @@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 2, numClientNodes = 0, scope = ElasticsearchIntegrationTest.Scope.TEST) @SuppressCodecs("*") // test relies on exact file extensions -public class TruncatedRecoveryTests extends ElasticsearchIntegrationTest { +public class TruncatedRecoveryIT extends ElasticsearchIntegrationTest { protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder() diff --git a/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java b/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java similarity index 96% rename from core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java rename to core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java index da5da159223..feb57e87408 100644 --- a/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultTests.java +++ b/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java @@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class CorsRegexDefaultTests extends ElasticsearchIntegrationTest { +public class CorsRegexDefaultIT extends ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/rest/CorsRegexTests.java rename to core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java index 8e568d847cf..8ef8217e5be 100644 --- a/core/src/test/java/org/elasticsearch/rest/CorsRegexTests.java +++ b/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java @@ -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 ElasticsearchIntegrationTest { - 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/routing/AliasResolveRoutingTests.java b/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingTests.java rename to core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java index 0ebbda7d313..b79ec6a9262 100644 --- a/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingTests.java +++ b/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java @@ -37,7 +37,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class AliasResolveRoutingTests extends ElasticsearchIntegrationTest { +public class AliasResolveRoutingIT extends ElasticsearchIntegrationTest { @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..b596f75f4ba 100644 --- a/core/src/test/java/org/elasticsearch/routing/AliasRoutingTests.java +++ b/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo; /** * */ -public class AliasRoutingTests extends ElasticsearchIntegrationTest { +public class AliasRoutingIT extends ElasticsearchIntegrationTest { @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..f288a756091 100644 --- a/core/src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java +++ b/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java @@ -41,7 +41,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; import static org.hamcrest.Matchers.*; -public class SimpleRoutingTests extends ElasticsearchIntegrationTest { +public class SimpleRoutingIT extends ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/script/CustomScriptContextTests.java rename to core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java index 16006429baa..fc92731b28b 100644 --- a/core/src/test/java/org/elasticsearch/script/CustomScriptContextTests.java +++ b/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java @@ -33,7 +33,7 @@ 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 ElasticsearchIntegrationTest { 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 99% rename from core/src/test/java/org/elasticsearch/script/GroovyScriptTests.java rename to core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java index 9ceda548b9f..155d0a9cd84 100644 --- a/core/src/test/java/org/elasticsearch/script/GroovyScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java @@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.equalTo; /** * Various tests for Groovy scripting */ -public class GroovyScriptTests extends ElasticsearchIntegrationTest { +public class GroovyScriptIT extends ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/script/GroovySecurityTests.java rename to core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java index cb1a2771029..0ab1a874301 100644 --- a/core/src/test/java/org/elasticsearch/script/GroovySecurityTests.java +++ b/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java @@ -36,7 +36,7 @@ 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 { +public class GroovySecurityIT extends ElasticsearchIntegrationTest { @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..5e4788bdbdc 100644 --- a/core/src/test/java/org/elasticsearch/script/IndexLookupTests.java +++ b/core/src/test/java/org/elasticsearch/script/IndexLookupIT.java @@ -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 ElasticsearchIntegrationTest { 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 99% rename from core/src/test/java/org/elasticsearch/script/IndexedScriptTests.java rename to core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java index f4696d8f8e3..78be0b6fa5c 100644 --- a/core/src/test/java/org/elasticsearch/script/IndexedScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java b/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java rename to core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java index adc5351d57b..4d556b7a99b 100644 --- a/core/src/test/java/org/elasticsearch/script/OnDiskScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java @@ -37,7 +37,7 @@ 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 { +public class OnDiskScriptIT extends ElasticsearchIntegrationTest { @Override public Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java rename to core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java index d50b9573bc7..eaddeeba78d 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptFieldTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java @@ -38,7 +38,7 @@ 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 ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsTest.java rename to core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java index 1a57c5155e2..7b86ea5ba47 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsTest.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java @@ -31,7 +31,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.junit.Test; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class ScriptIndexSettingsTest extends ElasticsearchIntegrationTest{ +public class ScriptIndexSettingsIT extends ElasticsearchIntegrationTest{ @Test 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..056d1853863 100644 --- a/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptTests.java +++ b/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.java @@ -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 ElasticsearchIntegrationTest { private SearchRequestBuilder buildRequest(String script, Object... params) { ensureGreen("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 97% rename from core/src/test/java/org/elasticsearch/search/CountSearchTests.java rename to core/src/test/java/org/elasticsearch/search/CountSearchIT.java index fd7f028a922..4ecbff7c1a0 100644 --- a/core/src/test/java/org/elasticsearch/search/CountSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/CountSearchIT.java @@ -30,7 +30,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear /** * {@link SearchType#COUNT} is deprecated but let's make sure it still works as expected. */ -public class CountSearchTests extends ElasticsearchIntegrationTest { +public class CountSearchIT extends ElasticsearchIntegrationTest { public void testDuelCountQueryThenFetch() throws Exception { createIndex("idx"); diff --git a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java rename to core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java index 322679a584e..4b5b787756b 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsTests.java +++ b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java @@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) @LuceneTestCase.Slow -public class SearchWithRejectionsTests extends ElasticsearchIntegrationTest { +public class SearchWithRejectionsIT extends ElasticsearchIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperTest.java rename to core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java index e83f477d335..748959319c9 100644 --- a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperTest.java +++ b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java @@ -35,7 +35,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; @ClusterScope(scope = SUITE) -public class StressSearchServiceReaperTest extends ElasticsearchIntegrationTest { +public class StressSearchServiceReaperIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 98% 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..8cd52c3f801 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.java @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class AggregationsBinaryTests extends ElasticsearchIntegrationTest { +public class AggregationsBinaryIT extends ElasticsearchIntegrationTest { 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 97% 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..50302a731a7 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java @@ -36,7 +36,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear @ElasticsearchIntegrationTest.SuiteScopeTest -public class AggregationsIntegrationTests extends ElasticsearchIntegrationTest { +public class AggregationsIntegrationIT extends ElasticsearchIntegrationTest { 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 99% 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..a2b24b3d1a6 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/CombiTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java @@ -46,7 +46,7 @@ import static org.hamcrest.core.IsNull.notNullValue; /** * */ -public class CombiTests extends ElasticsearchIntegrationTest { +public class CombiIT extends ElasticsearchIntegrationTest { /** * 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..02f81c18ce0 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java @@ -72,7 +72,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * the growth of dynamic arrays is tested. */ @Slow -public class EquivalenceTests extends ElasticsearchIntegrationTest { +public class EquivalenceIT extends ElasticsearchIntegrationTest { // 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 98% 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..a18893f80da 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.java @@ -38,7 +38,7 @@ import static org.hamcrest.CoreMatchers.equalTo; /** * */ -public class MetaDataTests extends ElasticsearchIntegrationTest { +public class MetaDataIT extends ElasticsearchIntegrationTest { /** * 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 99% 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..e14f2ee7b7e 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java @@ -41,7 +41,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; @ElasticsearchIntegrationTest.SuiteScopeTest -public class MissingValueTests extends ElasticsearchIntegrationTest { +public class MissingValueIT extends ElasticsearchIntegrationTest { @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 99% 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..4c5232c2328 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/ParsingTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java @@ -29,7 +29,7 @@ import java.security.SecureRandom; import java.util.regex.Matcher; import java.util.regex.Pattern; -public class ParsingTests extends ElasticsearchIntegrationTest { +public class ParsingIT extends ElasticsearchIntegrationTest { @Test(expected=SearchPhaseExecutionException.class) public void testTwoTypes() throws Exception { 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 98% 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..c96f65f7e89 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 @@ -35,7 +35,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class BooleanTermsTests extends ElasticsearchIntegrationTest { +public class BooleanTermsIT extends ElasticsearchIntegrationTest { 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..4cfe02eab00 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 @@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.*; /** */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class ChildrenTests extends ElasticsearchIntegrationTest { +public class ChildrenIT extends ElasticsearchIntegrationTest { 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..36a29f49fb2 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 @@ -64,7 +64,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class DateHistogramTests extends ElasticsearchIntegrationTest { +public class DateHistogramIT extends ElasticsearchIntegrationTest { 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 99% 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..284c130797f 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 @@ -50,7 +50,7 @@ import static org.hamcrest.core.IsNull.notNullValue; */ @ElasticsearchIntegrationTest.SuiteScopeTest @ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE) -public class DateHistogramOffsetTests extends ElasticsearchIntegrationTest { +public class DateHistogramOffsetIT extends ElasticsearchIntegrationTest { 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..0b82296710f 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 @@ -56,7 +56,7 @@ import static org.hamcrest.core.IsNull.nullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class DateRangeTests extends ElasticsearchIntegrationTest { +public class DateRangeIT extends ElasticsearchIntegrationTest { 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 97% 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..3e073c53bcc 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 @@ -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 ElasticsearchIntegrationTest { // https://github.com/elasticsearch/elasticsearch/issues/7240 @Test 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 99% 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..b2544727246 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 @@ -49,7 +49,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class FilterTests extends ElasticsearchIntegrationTest { +public class FilterIT extends ElasticsearchIntegrationTest { 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..b0640c25297 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 @@ -52,7 +52,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class FiltersTests extends ElasticsearchIntegrationTest { +public class FiltersIT extends ElasticsearchIntegrationTest { 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..254b6e16fc6 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 @@ -54,7 +54,7 @@ import static org.hamcrest.core.IsNull.nullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class GeoDistanceTests extends ElasticsearchIntegrationTest { +public class GeoDistanceIT extends ElasticsearchIntegrationTest { 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 99% 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..1c35a776ef1 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 @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ElasticsearchIntegrationTest.SuiteScopeTest -public class GeoHashGridTests extends ElasticsearchIntegrationTest { +public class GeoHashGridIT extends ElasticsearchIntegrationTest { 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 98% 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..e03b7925bef 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 @@ -43,7 +43,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class GlobalTests extends ElasticsearchIntegrationTest { +public class GlobalIT extends ElasticsearchIntegrationTest { 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..ee698b25c22 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 @@ -61,7 +61,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class HistogramTests extends ElasticsearchIntegrationTest { +public class HistogramIT extends ElasticsearchIntegrationTest { 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..78b4192f6e7 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 @@ -51,7 +51,7 @@ import static org.hamcrest.core.IsNull.nullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class IPv4RangeTests extends ElasticsearchIntegrationTest { +public class IPv4RangeIT extends ElasticsearchIntegrationTest { @Override public void setupSuiteScopeCluster() throws Exception { 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 99% 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..04c0653aa30 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 @@ -44,7 +44,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class MissingTests extends ElasticsearchIntegrationTest { +public class MissingIT extends ElasticsearchIntegrationTest { 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 99% 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..0764e94d4e6 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 @@ -41,7 +41,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSear import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class NaNSortingTests extends ElasticsearchIntegrationTest { +public class NaNSortingIT extends ElasticsearchIntegrationTest { 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..7484c6a8944 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 @@ -67,7 +67,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class NestedTests extends ElasticsearchIntegrationTest { +public class NestedIT extends ElasticsearchIntegrationTest { 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 97% 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..116bec9a558 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 @@ -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 ElasticsearchIntegrationTest { @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..391c22a9cfc 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 @@ -52,7 +52,7 @@ import static org.hamcrest.core.IsNull.nullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class RangeTests extends ElasticsearchIntegrationTest { +public class RangeIT extends ElasticsearchIntegrationTest { 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..4e1a8b7c956 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 @@ -59,7 +59,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class ReverseNestedTests extends ElasticsearchIntegrationTest { +public class ReverseNestedIT extends ElasticsearchIntegrationTest { @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 99% 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..9891290431c 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 @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; * Tests the Sampler aggregation */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class SamplerTests extends ElasticsearchIntegrationTest { +public class SamplerIT extends ElasticsearchIntegrationTest { 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 99% 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..108c57cc269 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 @@ -58,7 +58,7 @@ import static org.hamcrest.Matchers.equalTo; * we can make sure that the reduce is properly propagated by checking that empty buckets were created. */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class ShardReduceTests extends ElasticsearchIntegrationTest { +public class ShardReduceIT extends ElasticsearchIntegrationTest { 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/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..147699e89b6 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 @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.is; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class SignificantTermsTests extends ElasticsearchIntegrationTest { +public class SignificantTermsIT extends ElasticsearchIntegrationTest { 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..e6b053d40fe 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 @@ -66,7 +66,7 @@ import static org.hamcrest.Matchers.*; * */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) -public class SignificantTermsSignificanceScoreTests extends ElasticsearchIntegrationTest { +public class SignificantTermsSignificanceScoreIT extends ElasticsearchIntegrationTest { static final String INDEX_NAME = "testidx"; static final String DOC_TYPE = "doc"; 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..f5c561a67e3 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 @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class TermsDocCountErrorTests extends ElasticsearchIntegrationTest { +public class TermsDocCountErrorIT extends ElasticsearchIntegrationTest { 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 99% 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..040819c8777 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 @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; /** * */ -public class TermsShardMinDocCountTests extends ElasticsearchIntegrationTest { +public class TermsShardMinDocCountIT extends ElasticsearchIntegrationTest { 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..2f8b355ecf3 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 @@ -79,7 +79,7 @@ import static org.hamcrest.Matchers.sameInstance; * */ @ElasticsearchIntegrationTest.SuiteScopeTest() -public class TopHitsTests extends ElasticsearchIntegrationTest { +public class TopHitsIT extends ElasticsearchIntegrationTest { 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/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..2fe87192dfe 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 @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class CardinalityTests extends ElasticsearchIntegrationTest { +public class CardinalityIT extends ElasticsearchIntegrationTest { @Override public Settings indexSettings() { 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..93d9a27ba32 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 @@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.sameInstance; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class GeoBoundsTests extends ElasticsearchIntegrationTest { +public class GeoBoundsIT extends ElasticsearchIntegrationTest { 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/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..8944a215f9a 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 @@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.sameInstance; @ClusterScope(scope = Scope.SUITE) @ElasticsearchIntegrationTest.SuiteScopeTest -public class ScriptedMetricTests extends ElasticsearchIntegrationTest { +public class ScriptedMetricIT extends ElasticsearchIntegrationTest { private static long numDocs; 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 99% 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..70ea3ea98a4 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 @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue; * */ @ElasticsearchIntegrationTest.SuiteScopeTest -public class ValueCountTests extends ElasticsearchIntegrationTest { +public class ValueCountIT extends ElasticsearchIntegrationTest { @Override public void setupSuiteScopeCluster() throws Exception { 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 99% 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..909a36ee929 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 @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class AvgBucketTests extends ElasticsearchIntegrationTest { +public class AvgBucketIT extends ElasticsearchIntegrationTest { 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..05239efb757 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 @@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class BucketScriptTests extends ElasticsearchIntegrationTest { +public class BucketScriptIT extends ElasticsearchIntegrationTest { 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..70fc2879ee9 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 @@ -50,7 +50,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class BucketSelectorTests extends ElasticsearchIntegrationTest { +public class BucketSelectorIT extends ElasticsearchIntegrationTest { 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 99% 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..e49172c68c1 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 @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class CumulativeSumTests extends ElasticsearchIntegrationTest { +public class CumulativeSumIT extends ElasticsearchIntegrationTest { 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 99% 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..dadc7a7ffda 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 @@ -54,7 +54,7 @@ import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class DateDerivativeTests extends ElasticsearchIntegrationTest { +public class DateDerivativeIT extends ElasticsearchIntegrationTest { 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 99% 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 d587b17e309..7134dc4ea13 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 @@ -57,7 +57,7 @@ import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class DerivativeTests extends ElasticsearchIntegrationTest { +public class DerivativeIT extends ElasticsearchIntegrationTest { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; 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..6d52cab4b02 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 @@ -49,7 +49,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class MaxBucketTests extends ElasticsearchIntegrationTest { +public class MaxBucketIT extends ElasticsearchIntegrationTest { 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..f8ba15e7ee2 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 @@ -46,7 +46,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class MinBucketTests extends ElasticsearchIntegrationTest { +public class MinBucketIT extends ElasticsearchIntegrationTest { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; 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 99% 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..f5f0f961249 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 @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.core.IsNull.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class SumBucketTests extends ElasticsearchIntegrationTest { +public class SumBucketIT extends ElasticsearchIntegrationTest { 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..795eccc3845 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 @@ -55,7 +55,7 @@ import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class MovAvgTests extends ElasticsearchIntegrationTest { +public class MovAvgIT extends ElasticsearchIntegrationTest { 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/serialdiff/SerialDiffTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.java similarity index 99% 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..c5e7cd5c63f 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 @@ -45,7 +45,7 @@ import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.nullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class SerialDiffTests extends ElasticsearchIntegrationTest { +public class SerialDiffIT extends ElasticsearchIntegrationTest { 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/basic/SearchWhileCreatingIndexTests.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java similarity index 98% 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..a4438f11794 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexTests.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java @@ -36,7 +36,7 @@ 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 ElasticsearchIntegrationTest { @Test @Slow 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 99% 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..de530cd61f2 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingTests.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SearchWhileRelocatingTests extends ElasticsearchIntegrationTest { +public class SearchWhileRelocatingIT extends ElasticsearchIntegrationTest { @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 99% 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..8810d67b389 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsTests.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java @@ -51,7 +51,7 @@ import java.util.concurrent.ExecutionException; import static org.elasticsearch.common.settings.Settings.settingsBuilder; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; -public class SearchWithRandomExceptionsTests extends ElasticsearchIntegrationTest { +public class SearchWithRandomExceptionsIT extends ElasticsearchIntegrationTest { @Test @Slow // maybe due to all the logging? 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 98% 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..aaff1c9ae41 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresTests.java +++ b/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java @@ -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 ElasticsearchIntegrationTest { @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..9fad1e6e11a 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java @@ -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 ElasticsearchIntegrationTest { @Override protected int numberOfReplicas() { 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 99% 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..cc6179e144c 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcTests.java +++ b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java @@ -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..04a0dab5358 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java @@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.SUITE) -public class ChildQuerySearchTests extends ElasticsearchIntegrationTest { +public class ChildQuerySearchIT extends ElasticsearchIntegrationTest { @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..c7a55ff884a 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcTest.java +++ b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java @@ -46,12 +46,12 @@ 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 ElasticsearchIntegrationTest { 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 99% 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..4a79d0ca5b0 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingTest.java +++ b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.java @@ -43,7 +43,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 ElasticsearchIntegrationTest { private final Settings indexSettings = Settings.builder() .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) diff --git a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java rename to core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java index a4263b20f9c..a9cb67fb73a 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ClusterScope(scope = Scope.SUITE, numDataNodes = 1) -public class FetchSubPhasePluginTests extends ElasticsearchIntegrationTest { +public class FetchSubPhasePluginIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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..346d5e39f72 100644 --- a/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsTests.java +++ b/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java @@ -68,7 +68,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class SearchFieldsTests extends ElasticsearchIntegrationTest { +public class SearchFieldsIT extends ElasticsearchIntegrationTest { @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..9d0f54b91ff 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% 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..efed64f2cdd 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java @@ -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 ElasticsearchIntegrationTest { @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/FunctionScoreFieldValueTests.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java similarity index 98% 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..2f583cb3df8 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java @@ -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 ElasticsearchIntegrationTest { @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..fbf5d04c56b 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java @@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; @Slow -public class FunctionScoreTests extends ElasticsearchIntegrationTest { +public class FunctionScoreIT extends ElasticsearchIntegrationTest { static final String TYPE = "type"; static final String INDEX = "index"; @@ -133,7 +133,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 +154,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 97% 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..d3cd012e8ce 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% 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..b3f10ea912c 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java @@ -48,7 +48,7 @@ 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 ElasticsearchIntegrationTest { @Slow public void testConsistentHitsWithSameSeed() throws Exception { 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..c46a238d9b6 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxTests.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.equalTo; /** * */ -public class GeoBoundingBoxTests extends ElasticsearchIntegrationTest { +public class GeoBoundingBoxIT extends ElasticsearchIntegrationTest { @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..c06754d14d0 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceTests.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java @@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ -public class GeoDistanceTests extends ElasticsearchIntegrationTest { +public class GeoDistanceIT extends ElasticsearchIntegrationTest { @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..d4a81d0a7ef 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterTests.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java @@ -67,7 +67,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class GeoFilterTests extends ElasticsearchIntegrationTest { +public class GeoFilterIT extends ElasticsearchIntegrationTest { private static boolean intersectSupport; private static boolean disjointSupport; 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 98% 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..c878baf2e69 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonTests.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.equalTo; @ElasticsearchIntegrationTest.SuiteScopeTest -public class GeoPolygonTests extends ElasticsearchIntegrationTest { +public class GeoPolygonIT extends ElasticsearchIntegrationTest { @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..64b11866d1a 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java @@ -56,7 +56,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 ElasticsearchIntegrationTest { @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 98% 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..ad7aed2f5b0 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% 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 c9312a5db98..72843eabffe 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java @@ -56,7 +56,7 @@ import static org.elasticsearch.test.hamcrest.RegexMatcher.matches; import static org.hamcrest.Matchers.*; @Slow -public class HighlighterSearchTests extends ElasticsearchIntegrationTest { +public class HighlighterSearchIT extends ElasticsearchIntegrationTest { @Test public void testHighlightingWithWildcardName() throws IOException { 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 98% 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..ae3f7b43a0f 100644 --- a/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo; /** * */ -public class SimpleIndicesBoostSearchTests extends ElasticsearchIntegrationTest { +public class SimpleIndicesBoostSearchIT extends ElasticsearchIntegrationTest { @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..1c867bda100 100644 --- a/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsTests.java +++ b/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.*; /** */ -public class InnerHitsTests extends ElasticsearchIntegrationTest { +public class InnerHitsIT extends ElasticsearchIntegrationTest { @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..158eafb27ec 100644 --- a/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java +++ b/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java @@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.hasItemInArray; /** * */ -public class MatchedQueriesTests extends ElasticsearchIntegrationTest { +public class MatchedQueriesIT extends ElasticsearchIntegrationTest { @Test public void simpleMatchedQueryFromFilteredQuery() throws Exception { 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..2efc1b721a7 100644 --- a/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisTests.java +++ b/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java @@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * */ -public class MoreLikeThisTests extends ElasticsearchIntegrationTest { +public class MoreLikeThisIT extends ElasticsearchIntegrationTest { @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 97% 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..3517fdf05b3 100644 --- a/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java @@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ -public class SimpleMultiSearchTests extends ElasticsearchIntegrationTest { +public class SimpleMultiSearchIT extends ElasticsearchIntegrationTest { @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 99% 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 452e421ab8f..705ceeecaf3 100644 --- a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceTests.java +++ b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java @@ -35,7 +35,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.*; @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SearchPreferenceTests extends ElasticsearchIntegrationTest { +public class SearchPreferenceIT extends ElasticsearchIntegrationTest { @Test // see #2896 public void testStopOneNodePreferenceWithRedState() throws InterruptedException, IOException { 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 99% 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..595240cf007 100644 --- a/core/src/test/java/org/elasticsearch/search/query/ExistsMissingTests.java +++ b/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java @@ -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 ElasticsearchIntegrationTest { // 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 d0131cffde6..42fea05c64d 100644 --- a/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryTests.java +++ b/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java @@ -51,7 +51,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 ElasticsearchIntegrationTest { @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 c539db49a3b..1872b823fde 100644 --- a/core/src/test/java/org/elasticsearch/search/query/SearchQueryTests.java +++ b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java @@ -63,7 +63,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.*; @Slow -public class SearchQueryTests extends ElasticsearchIntegrationTest { +public class SearchQueryIT extends ElasticsearchIntegrationTest { @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 eaa016411ad..a2673390644 100644 --- a/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringTests.java +++ b/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; /** * Tests for the {@code simple_query_string} query */ -public class SimpleQueryStringTests extends ElasticsearchIntegrationTest { +public class SimpleQueryStringIT extends ElasticsearchIntegrationTest { @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 3ed24ac8168..2cfd817f5f3 100644 --- a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerTests.java +++ b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java @@ -65,7 +65,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * */ -public class QueryRescorerTests extends ElasticsearchIntegrationTest { +public class QueryRescorerIT extends ElasticsearchIntegrationTest { @Test public void testEnforceWindowSize() { 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 98% 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..64f3e783a98 100644 --- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanTests.java +++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java @@ -35,7 +35,7 @@ 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 ElasticsearchIntegrationTest { @Test @Slow 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 98% 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..e5eefb83f7c 100644 --- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingTests.java +++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java @@ -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 ElasticsearchIntegrationTest { @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 98% 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..04e2bb5a387 100644 --- a/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java @@ -45,7 +45,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE) -public class ScriptQuerySearchTests extends ElasticsearchIntegrationTest { +public class ScriptQuerySearchIT extends ElasticsearchIntegrationTest { @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 99% 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..e2562f39434 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollTests.java +++ b/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ -public class DuelScrollTests extends ElasticsearchIntegrationTest { +public class DuelScrollIT extends ElasticsearchIntegrationTest { @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..3b592df6b73 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollTests.java +++ b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java @@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class SearchScrollTests extends ElasticsearchIntegrationTest { +public class SearchScrollIT extends ElasticsearchIntegrationTest { @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 98% 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..9247714e85f 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesTests.java +++ b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.*; /** */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class SearchScrollWithFailingNodesTests extends ElasticsearchIntegrationTest { +public class SearchScrollWithFailingNodesIT extends ElasticsearchIntegrationTest { @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 99% 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..f9c2f8a2809 100644 --- a/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java @@ -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 ElasticsearchIntegrationTest { @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..8321b3b64c4 100644 --- a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortTests.java +++ b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java @@ -92,7 +92,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class SimpleSortTests extends ElasticsearchIntegrationTest { +public class SimpleSortIT extends ElasticsearchIntegrationTest { @TestLogging("action.search.type:TRACE") @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elasticsearch/elasticsearch/issues/9421") 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 98% 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..73d5235e1e0 100644 --- a/core/src/test/java/org/elasticsearch/search/source/SourceFetchingTests.java +++ b/core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java @@ -27,7 +27,7 @@ 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 ElasticsearchIntegrationTest { @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 99% 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..79fc32b4925 100644 --- a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsTests.java +++ b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java @@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.nullValue; /** */ @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SearchStatsTests extends ElasticsearchIntegrationTest { +public class SearchStatsIT extends ElasticsearchIntegrationTest { @Override protected int numberOfReplicas() { 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..1b30598a3b3 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java @@ -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 ElasticsearchIntegrationTest { 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/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..a56187eef9e 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.java @@ -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 ElasticsearchIntegrationTest { 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 97% 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..7bafe640071 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.java @@ -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 ElasticsearchIntegrationTest { @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..e16df6388e4 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchTests.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java @@ -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 ElasticsearchIntegrationTest { @Test // see #3196 public void testSuggestAcrossMultipleIndices() throws IOException { @@ -508,7 +508,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 +700,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/timeout/SearchTimeoutTests.java b/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java similarity index 96% 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..7a37ded1abf 100644 --- a/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutTests.java +++ b/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ @ElasticsearchIntegrationTest.ClusterScope(scope=ElasticsearchIntegrationTest.Scope.SUITE) -public class SearchTimeoutTests extends ElasticsearchIntegrationTest { +public class SearchTimeoutIT extends ElasticsearchIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/similarity/SimilarityTests.java rename to core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java index 8dd58e2307a..8b1eee953fd 100644 --- a/core/src/test/java/org/elasticsearch/similarity/SimilarityTests.java +++ b/core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java @@ -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 ElasticsearchIntegrationTest { @Test 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 96% 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..049c6f58bc6 100644 --- a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionTests.java +++ b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java @@ -32,7 +32,7 @@ import org.junit.Test; import java.io.IOException; @LuceneTestCase.Slow -public class NetworkPartitionTests extends ElasticsearchIntegrationTest { +public class NetworkPartitionIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 97% 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..f17542c1125 100644 --- a/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterTests.java +++ b/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java @@ -34,7 +34,7 @@ import static org.hamcrest.Matchers.equalTo; * the tests random sequence due to initializtion using the same random instance. */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) -public class SuiteScopeClusterTests extends ElasticsearchIntegrationTest { +public class SuiteScopeClusterIT extends ElasticsearchIntegrationTest { 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 96% 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..8130a2b4be1 100644 --- a/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterTests.java +++ b/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java @@ -31,7 +31,7 @@ import static org.hamcrest.Matchers.equalTo; * the tests random sequence due to initializtion using the same random instance. */ @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class TestScopeClusterTests extends ElasticsearchIntegrationTest { +public class TestScopeClusterIT extends ElasticsearchIntegrationTest { 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/threadpool/SimpleThreadPoolTests.java b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java rename to core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java index dc223deba0f..1d51b26bd53 100644 --- a/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolTests.java +++ b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java @@ -38,7 +38,7 @@ import org.elasticsearch.test.ElasticsearchSingleNodeTest; 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; @@ -59,7 +59,7 @@ import static org.hamcrest.Matchers.*; /** */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0) -public class SimpleThreadPoolTests extends ElasticsearchIntegrationTest { +public class SimpleThreadPoolIT extends ElasticsearchIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -120,7 +120,7 @@ public class SimpleThreadPoolTests extends ElasticsearchIntegrationTest { 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(TribeIT.SECOND_CLUSTER_NODE_PREFIX) + ")"; assertThat(threadName, RegexMatcher.matches("\\[" + nodePrefix + "\\d+\\]")); } } diff --git a/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java b/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java rename to core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java index 90365f68c15..ee7886174f2 100644 --- a/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampTests.java +++ b/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java @@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.notNullValue; /** */ -public class SimpleTimestampTests extends ElasticsearchIntegrationTest { +public class SimpleTimestampIT extends ElasticsearchIntegrationTest { @Test public void testSimpleTimestamp() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java b/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java similarity index 97% rename from core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java rename to core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java index 69be9f8fdf2..89e3323219d 100644 --- a/core/src/test/java/org/elasticsearch/transport/ActionNamesTests.java +++ b/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java @@ -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 ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportTests.java rename to core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java index 40cb626ce93..3ed7cdf18b9 100644 --- a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportTests.java +++ b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java @@ -68,7 +68,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.*; @ClusterScope(scope = SUITE) -public class ContextAndHeaderTransportTests extends ElasticsearchIntegrationTest { +public class ContextAndHeaderTransportIT extends ElasticsearchIntegrationTest { private static final List requests = new CopyOnWriteArrayList<>(); private String randomHeaderKey = randomAsciiOfLength(10); 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 99% 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 403f2a7a2e0..227f84a3494 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportTests.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java @@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.is; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 1) -public class NettyTransportTests extends ElasticsearchIntegrationTest { +public class NettyTransportIT extends ElasticsearchIntegrationTest { // 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 98% 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..ae6640a32da 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationTests.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.java @@ -38,7 +38,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; import static org.hamcrest.Matchers.*; @ClusterScope(scope = Scope.SUITE, numDataNodes = 1, numClientNodes = 0) -public class NettyTransportMultiPortIntegrationTests extends ElasticsearchIntegrationTest { +public class NettyTransportMultiPortIntegrationIT extends ElasticsearchIntegrationTest { private static int randomPort = -1; private static String randomPortRange; diff --git a/core/src/test/java/org/elasticsearch/tribe/TribeTests.java b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/tribe/TribeTests.java rename to core/src/test/java/org/elasticsearch/tribe/TribeIT.java index 7a0a8f769b9..a1aba983219 100644 --- a/core/src/test/java/org/elasticsearch/tribe/TribeTests.java +++ b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java @@ -59,7 +59,7 @@ import static org.hamcrest.Matchers.notNullValue; */ @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 ElasticsearchIntegrationTest { public static final String SECOND_CLUSTER_NODE_PREFIX = "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 99% rename from core/src/test/java/org/elasticsearch/ttl/SimpleTTLTests.java rename to core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java index e945769275a..9240e0c0e71 100644 --- a/core/src/test/java/org/elasticsearch/ttl/SimpleTTLTests.java +++ b/core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java @@ -44,7 +44,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.*; @ClusterScope(scope= Scope.SUITE, numDataNodes = 1) -public class SimpleTTLTests extends ElasticsearchIntegrationTest { +public class SimpleTTLIT extends ElasticsearchIntegrationTest { 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 97% rename from core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptTests.java rename to core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java index 30ad56b2dd4..27a9ab6c717 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptTests.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java @@ -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 ElasticsearchIntegrationTest { @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..12498a81161 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateTests.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateIT.java @@ -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 ElasticsearchIntegrationTest { private void createTestIndex() throws Exception { logger.info("--> creating index 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 99% rename from core/src/test/java/org/elasticsearch/update/UpdateNoopTests.java rename to core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java index 9f4f203b299..bf9031203ec 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateNoopTests.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * Tests for noop updates. */ -public class UpdateNoopTests extends ElasticsearchIntegrationTest { +public class UpdateNoopIT extends ElasticsearchIntegrationTest { @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 99% rename from core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateTests.java rename to core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java index 9ed0e59206b..b4d05aeb3c4 100644 --- a/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateTests.java +++ b/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java @@ -39,7 +39,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; @ElasticsearchIntegrationTest.SuiteScopeTest -public class RenderSearchTemplateTests extends ElasticsearchIntegrationTest { +public class RenderSearchTemplateIT extends ElasticsearchIntegrationTest { 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 99% rename from core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryTests.java rename to core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java index 0026957fe79..edfbcf04c3f 100644 --- a/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryTests.java +++ b/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java @@ -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 ElasticsearchIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationTests.java rename to core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java index 11d49cef827..8edf2f23350 100644 --- a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationTests.java +++ b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java @@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class ConcurrentDocumentOperationTests extends ElasticsearchIntegrationTest { +public class ConcurrentDocumentOperationIT extends ElasticsearchIntegrationTest { @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..d2c1c8bd662 100644 --- a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningTests.java +++ b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java @@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * */ -public class SimpleVersioningTests extends ElasticsearchIntegrationTest { +public class SimpleVersioningIT extends ElasticsearchIntegrationTest { @Test public void testExternalVersioningInitialDelete() throws Exception { From d67d7b0fb04a089c7ca1f639687071e40e61b234 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 18:40:30 -0400 Subject: [PATCH 35/49] Give unit tests and integ tests separate load balancing This is a mess today, e.g. tophints shows you slow integ tests after unit tests runs and so on. Lets track them independently, so we can keep an eye on slow unit tests and slow integ tests, and have good load balancing. --- pom.xml | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 6ff8a265c0e..a59ed99a38d 100644 --- a/pom.xml +++ b/pom.xml @@ -70,6 +70,7 @@ ${basedir}/logs/ 5 .local-${elasticsearch.version}-execution-hints.log + .local-${elasticsearch.version}-integ-execution-hints.log false false @@ -597,11 +598,6 @@ - - - - - -Xmx${tests.heap.size} -Xms${tests.heap.size} @@ -690,7 +686,6 @@ - @@ -706,7 +701,14 @@ + + + + + + **/*Tests.class **/*Test.class @@ -732,7 +734,14 @@ mavenExtensions="true" summaryFile="${project.build.directory}/failsafe-reports/failsafe-summary.xml" dir="${project.build.directory}/failsafe-reports"/> + + + + + + **/*IT.class @@ -1177,6 +1186,22 @@ org.eclipse.jdt.ui.text.custom_code_templates=run + + integ-tests-top-hints + integration-test + + ${skip.integ.tests} + + + + + + + + + run + + From 062feac80aef1436ef88dafe0fc622ae2e6e06b5 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 19:08:01 -0400 Subject: [PATCH 36/49] Cut over some remaining integration tests to IT A few subclasses got missed here --- ...ava => BasicAnalysisBackwardCompatibilityIT.java} | 2 +- ...yTest.java => BasicBackwardsCompatibilityIT.java} | 2 +- ...Tests.java => ClusterStateBackwardsCompatIT.java} | 2 +- ...ts.java => GetIndexBackwardsCompatibilityIT.java} | 2 +- ...ts.java => NodesStatsBasicBackwardsCompatIT.java} | 2 +- .../bwcompat/OldIndexBackwardsCompatibilityIT.java | 6 +++--- ...ts.java => RecoveryWithUnsupportedIndicesIT.java} | 2 +- .../bwcompat/RestoreBackwardsCompatTests.java | 4 ++-- ....java => StaticIndexBackwardCompatibilityIT.java} | 2 +- ... => TransportClientBackwardsCompatibilityIT.java} | 2 +- ...est.java => UnicastBackwardsCompatibilityIT.java} | 2 +- ...Tests.java => AliasedIndexDocumentActionsIT.java} | 2 +- ...ts.java => RecoveryBackwardsCompatibilityIT.java} | 2 +- ...ts.java => DedicatedMasterGetFieldMappingIT.java} | 2 +- .../upgrade/{UpgradeTest.java => UpgradeIT.java} | 4 ++-- ...ldIndexTest.java => UpgradeReallyOldIndexIT.java} | 12 ++++++------ ... => SignificantTermsBackwardCompatibilityIT.java} | 2 +- ...ava => FunctionScoreBackwardCompatibilityIT.java} | 2 +- ...actSnapshotTests.java => AbstractSnapshotIT.java} | 2 +- .../snapshots/BlobStoreFormatTests.java | 2 +- ...s.java => DedicatedClusterSnapshotRestoreIT.java} | 2 +- .../elasticsearch/snapshots/RepositoriesTests.java | 2 +- ...ests.java => SharedClusterSnapshotRestoreIT.java} | 2 +- ...st.java => SnapshotBackwardsCompatibilityIT.java} | 2 +- 24 files changed, 33 insertions(+), 33 deletions(-) rename core/src/test/java/org/elasticsearch/bwcompat/{BasicAnalysisBackwardCompatibilityTests.java => BasicAnalysisBackwardCompatibilityIT.java} (98%) rename core/src/test/java/org/elasticsearch/bwcompat/{BasicBackwardsCompatibilityTest.java => BasicBackwardsCompatibilityIT.java} (99%) rename core/src/test/java/org/elasticsearch/bwcompat/{ClusterStateBackwardsCompatTests.java => ClusterStateBackwardsCompatIT.java} (97%) rename core/src/test/java/org/elasticsearch/bwcompat/{GetIndexBackwardsCompatibilityTests.java => GetIndexBackwardsCompatibilityIT.java} (98%) rename core/src/test/java/org/elasticsearch/bwcompat/{NodesStatsBasicBackwardsCompatTests.java => NodesStatsBasicBackwardsCompatIT.java} (97%) rename core/src/test/java/org/elasticsearch/bwcompat/{RecoveryWithUnsupportedIndicesTests.java => RecoveryWithUnsupportedIndicesIT.java} (94%) rename core/src/test/java/org/elasticsearch/bwcompat/{StaticIndexBackwardCompatibilityTest.java => StaticIndexBackwardCompatibilityIT.java} (96%) rename core/src/test/java/org/elasticsearch/bwcompat/{TransportClientBackwardsCompatibilityTest.java => TransportClientBackwardsCompatibilityIT.java} (97%) rename core/src/test/java/org/elasticsearch/bwcompat/{UnicastBackwardsCompatibilityTest.java => UnicastBackwardsCompatibilityIT.java} (95%) rename core/src/test/java/org/elasticsearch/document/{AliasedIndexDocumentActionsTests.java => AliasedIndexDocumentActionsIT.java} (95%) rename core/src/test/java/org/elasticsearch/gateway/{RecoveryBackwardsCompatibilityTests.java => RecoveryBackwardsCompatibilityIT.java} (98%) rename core/src/test/java/org/elasticsearch/indices/mapping/{DedicatedMasterGetFieldMappingTests.java => DedicatedMasterGetFieldMappingIT.java} (94%) rename core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/{UpgradeTest.java => UpgradeIT.java} (98%) rename core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/{UpgradeReallyOldIndexTest.java => UpgradeReallyOldIndexIT.java} (86%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{SignificantTermsBackwardCompatibilityTests.java => SignificantTermsBackwardCompatibilityIT.java} (98%) rename core/src/test/java/org/elasticsearch/search/functionscore/{FunctionScoreBackwardCompatibilityTests.java => FunctionScoreBackwardCompatibilityIT.java} (98%) rename core/src/test/java/org/elasticsearch/snapshots/{AbstractSnapshotTests.java => AbstractSnapshotIT.java} (99%) rename core/src/test/java/org/elasticsearch/snapshots/{DedicatedClusterSnapshotRestoreTests.java => DedicatedClusterSnapshotRestoreIT.java} (99%) rename core/src/test/java/org/elasticsearch/snapshots/{SharedClusterSnapshotRestoreTests.java => SharedClusterSnapshotRestoreIT.java} (99%) rename core/src/test/java/org/elasticsearch/snapshots/{SnapshotBackwardsCompatibilityTest.java => SnapshotBackwardsCompatibilityIT.java} (99%) diff --git a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java index aac1e3c73d1..359b6228f34 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java @@ -39,7 +39,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.hamcrest.Matchers.equalTo; @ElasticsearchIntegrationTest.ClusterScope(numDataNodes = 0, scope = ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0, transportClientRatio = 0.0) -public class BasicAnalysisBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest { +public class BasicAnalysisBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { // 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..19593b07717 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityTest.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java @@ -76,7 +76,7 @@ import static org.hamcrest.Matchers.*; /** */ -public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest { +public class BasicBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { /** * 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 97% rename from core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java index ba208eb739e..9964c64e0bb 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java @@ -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 ElasticsearchBackwardsCompatIntegrationTest { @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 98% rename from core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java index 5da2c1ff96c..b8cc47242ca 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java @@ -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 ElasticsearchBackwardsCompatIntegrationTest { @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 97% rename from core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java index 5220b6c7cc8..14eccf20f2e 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java @@ -33,7 +33,7 @@ import java.lang.reflect.Method; @ElasticsearchIntegrationTest.ClusterScope(scope= ElasticsearchIntegrationTest.Scope.SUITE, numClientNodes = 0) -public class NodesStatsBasicBackwardsCompatTests extends ElasticsearchBackwardsCompatIntegrationTest { +public class NodesStatsBasicBackwardsCompatIT extends ElasticsearchBackwardsCompatIntegrationTest { @Test public void testNodeStatsSetIndices() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index 94cebcc677e..eb46ad04c02 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java @@ -43,7 +43,7 @@ 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; @@ -436,10 +436,10 @@ public class OldIndexBackwardsCompatibilityIT extends ElasticsearchIntegrationTe 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/RestoreBackwardsCompatTests.java index a0d3dc4e10a..ce9e5f10770 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java @@ -29,7 +29,7 @@ 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.AbstractSnapshotIT; import org.elasticsearch.snapshots.RestoreInfo; import org.elasticsearch.snapshots.SnapshotInfo; import org.elasticsearch.snapshots.SnapshotRestoreException; @@ -56,7 +56,7 @@ import static org.hamcrest.Matchers.*; @Slow @ClusterScope(scope = Scope.TEST) -public class RestoreBackwardsCompatTests extends AbstractSnapshotTests { +public class RestoreBackwardsCompatTests extends AbstractSnapshotIT { @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 96% rename from core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java rename to core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java index 2fcd9572a65..4f90be1d4d4 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityTest.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java @@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; */ @LuceneTestCase.SuppressCodecs("*") @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0, minNumDataNodes = 0, maxNumDataNodes = 0) -public class StaticIndexBackwardCompatibilityTest extends ElasticsearchIntegrationTest { +public class StaticIndexBackwardCompatibilityIT extends ElasticsearchIntegrationTest { 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 97% rename from core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityTest.java rename to core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java index 11e01b2c1eb..26f8a126ad3 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityTest.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java @@ -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 ElasticsearchBackwardsCompatIntegrationTest { @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 95% rename from core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java rename to core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java index d8019a64c65..fb4c5424a68 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityTest.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java @@ -26,7 +26,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.equalTo; -public class UnicastBackwardsCompatibilityTest extends ElasticsearchBackwardsCompatIntegrationTest { +public class UnicastBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { @Override protected Settings nodeSettings(int nodeOrdinal) { 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 89ea73d56ef..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 DocumentActionsIT { +public class AliasedIndexDocumentActionsIT extends DocumentActionsIT { @Override protected void createIndex() { diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java rename to core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java index 7eeff09a944..6b17bb6fb2c 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java @@ -41,7 +41,7 @@ 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 { +public class RecoveryBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { @Override 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 94% 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 1800c94f9e6..fcabd5d9271 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingTests.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java @@ -31,7 +31,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; */ @Slow @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class DedicatedMasterGetFieldMappingTests extends SimpleGetFieldMappingsIT { +public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT { @Before public void before1() 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 98% 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..e93296175bf 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 @@ -48,7 +48,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke 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 { +public class UpgradeIT extends ElasticsearchBackwardsCompatIntegrationTest { @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/search/aggregations/bucket/SignificantTermsBackwardCompatibilityTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.java similarity index 98% 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..4134da233a7 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 @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.equalTo; /** */ -public class SignificantTermsBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest { +public class SignificantTermsBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { static final String INDEX_NAME = "testidx"; static final String DOC_TYPE = "doc"; 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 98% 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..d2378709f05 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityTests.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java @@ -42,7 +42,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; /** */ -public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwardsCompatIntegrationTest { +public class FunctionScoreBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { /** * Simple upgrade test for function score diff --git a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java b/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java rename to core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.java index fad99f0f7bd..840bc4b0edf 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.java @@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; /** */ @Ignore -public abstract class AbstractSnapshotTests extends ElasticsearchIntegrationTest { +public abstract class AbstractSnapshotIT extends ElasticsearchIntegrationTest { 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/BlobStoreFormatTests.java index 4ddeb2bd782..1e4a5f61faa 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.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 BlobStoreFormatTests extends AbstractSnapshotIT { 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..cba9831ccae 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java @@ -94,7 +94,7 @@ import static org.hamcrest.Matchers.*; /** */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests { +public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIT { @Test public void restorePersistentSettingsTest() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java index a6432e5cda5..9c36d34b24b 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.notNullValue; /** */ @ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class RepositoriesTests extends AbstractSnapshotTests { +public class RepositoriesTests extends AbstractSnapshotIT { @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 99% rename from core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java rename to core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index bf2e3aa98f7..144a2d34cf4 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -80,7 +80,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.*; @Slow -public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests { +public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIT { @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 99% rename from core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityTest.java rename to core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java index d545e1076d0..dea168a2d7d 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityTest.java +++ b/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java @@ -50,7 +50,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 ElasticsearchBackwardsCompatIntegrationTest { @Test public void testSnapshotAndRestore() throws ExecutionException, InterruptedException, IOException { From be941f0669837ba13481c5218c91e4d7e6768a2e Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 16:23:29 -0700 Subject: [PATCH 37/49] Tests: Remove uses of @Slow and @Integration Now that integ tests are moved into `mvn verify`, we don't really have a need for @Slow, and especially not @Integration. This removes uses of the first, and completely removes uses of the latter. --- .../action/IndicesRequestIT.java | 2 - .../action/admin/HotThreadsIT.java | 13 ++-- ...ectorsTests.java => GetTermVectorsIT.java} | 24 +++++--- .../elasticsearch/aliases/IndexAliasesIT.java | 30 +++++++--- .../OldIndexBackwardsCompatibilityIT.java | 16 +++-- ...sts.java => RestoreBackwardsCompatIT.java} | 9 +-- .../cluster/ClusterServiceIT.java | 2 +- .../cluster/MinimumMasterNodesIT.java | 2 +- .../cluster/SpecificMasterNodesIT.java | 4 -- .../allocation/AwarenessAllocationIT.java | 2 - .../BalanceUnbalancedClusterTest.java | 2 - .../org/elasticsearch/codecs/CodecTests.java | 4 -- .../DiscoveryWithServiceDisruptionsIT.java | 3 - .../discovery/ZenUnicastDiscoveryIT.java | 2 - .../discovery/zen/ZenDiscoveryIT.java | 18 ++++-- ...PingTests.java => MulticastZenPingIT.java} | 5 +- ...enPingTests.java => UnicastZenPingIT.java} | 7 +-- .../gateway/GatewayIndexStateIT.java | 5 -- .../gateway/MetaDataWriteDataNodesIT.java | 5 -- .../gateway/QuorumGatewayIT.java | 2 - .../gateway/RecoverAfterNodesIT.java | 6 -- .../RecoveryBackwardsCompatibilityIT.java | 2 - .../gateway/RecoveryFromGatewayIT.java | 20 ++----- .../index/engine/InternalEngineMergeIT.java | 3 - .../index/engine/InternalEngineTests.java | 1 - .../elasticsearch/indexing/IndexActionIT.java | 2 +- .../IndexLifecycleActionIT.java | 1 - .../DedicatedMasterGetFieldMappingIT.java | 4 -- .../indices/settings/UpdateSettingsIT.java | 1 - .../store/IndicesStoreIntegrationIT.java | 10 +++- .../percolator/RecoveryPercolatorIT.java | 20 ++++--- .../recovery/FullRollingRestartIT.java | 1 - .../recovery/RecoveryWhileUnderLoadIT.java | 9 ++- .../elasticsearch/recovery/RelocationIT.java | 21 ++++--- .../search/SearchWithRejectionsIT.java | 1 - .../search/StressSearchServiceReaperIT.java | 1 - .../search/aggregations/EquivalenceIT.java | 3 - .../basic/SearchWhileCreatingIndexIT.java | 5 -- .../basic/SearchWithRandomExceptionsIT.java | 5 +- .../search/functionscore/FunctionScoreIT.java | 2 - .../functionscore/RandomScoreFunctionIT.java | 6 +- .../elasticsearch/search/geo/GeoFilterIT.java | 1 - .../search/highlight/HighlighterSearchIT.java | 43 ++++++++++--- .../search/query/SearchQueryIT.java | 30 ++++++++-- .../search/rescore/QueryRescorerIT.java | 2 +- .../search/scan/SearchScanIT.java | 2 - .../search/sort/SimpleSortIT.java | 2 +- .../search/suggest/SuggestSearchIT.java | 1 - .../SharedClusterSnapshotRestoreIT.java | 38 +++++++++--- .../test/ElasticsearchIntegrationTest.java | 16 ----- .../test/disruption/NetworkPartitionIT.java | 2 - .../test/rest/ElasticsearchRestTestCase.java | 3 - .../netty/SimpleNettyTransportTests.java | 2 - .../java/org/elasticsearch/tribe/TribeIT.java | 2 - .../org/elasticsearch/update/UpdateIT.java | 2 - .../versioning/SimpleVersioningIT.java | 2 - .../discovery/azure/AzureSimpleTest.java | 2 - .../azure/AzureTwoStartedNodesTest.java | 2 - .../deletebyquery/DeleteByQueryTests.java | 3 - .../test/rest/DeleteByQueryRestTests.java | 60 ------------------- 60 files changed, 221 insertions(+), 275 deletions(-) rename core/src/test/java/org/elasticsearch/action/termvectors/{GetTermVectorsTests.java => GetTermVectorsIT.java} (99%) rename core/src/test/java/org/elasticsearch/bwcompat/{RestoreBackwardsCompatTests.java => RestoreBackwardsCompatIT.java} (97%) rename core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/{MulticastZenPingTests.java => MulticastZenPingIT.java} (98%) rename core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/{UnicastZenPingTests.java => UnicastZenPingIT.java} (97%) delete mode 100644 plugins/delete-by-query/src/test/java/org/elasticsearch/plugin/deletebyquery/test/rest/DeleteByQueryRestTests.java diff --git a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java index 6bf1d3ab114..fdb2f5478b5 100644 --- a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.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; @@ -123,7 +122,6 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.instanceOf; @ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2) -@Slow public class IndicesRequestIT extends ElasticsearchIntegrationTest { private final List indices = new ArrayList<>(); diff --git a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java index dd7b6fb2b90..fb71a1c1708 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java +++ b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java @@ -18,7 +18,6 @@ */ 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; @@ -32,14 +31,16 @@ 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 HotThreadsIT extends ElasticsearchIntegrationTest { @Test 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..41e1be82728 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 AbstractTermVectorsTests { @Test public void testNoSuchDoc() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java index 70eba662598..071355ee89a 100644 --- a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.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; @@ -58,17 +57,30 @@ 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 IndexAliasesIT extends ElasticsearchIntegrationTest { @Test diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index eb46ad04c02..e2e948eece6 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.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; @@ -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; @@ -71,7 +80,6 @@ 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) @LuceneTestCase.SuppressFileSystems("ExtrasFS") -@LuceneTestCase.Slow public class OldIndexBackwardsCompatibilityIT extends ElasticsearchIntegrationTest { // TODO: test for proper exception on unsupported indexes (maybe via separate test?) // We have a 0.20.6.zip etc for this. diff --git a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java similarity index 97% rename from core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatTests.java rename to core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java index ce9e5f10770..68d6faeaeac 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; @@ -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 AbstractSnapshotIT { +public class RestoreBackwardsCompatIT extends AbstractSnapshotIT { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java index 95c9b3152d5..5cf95f5da5a 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java @@ -621,7 +621,7 @@ public class ClusterServiceIT 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/MinimumMasterNodesIT.java b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java index 0f07c075c91..7dda2aad4d3 100644 --- a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java @@ -165,7 +165,7 @@ public class MinimumMasterNodesIT 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/SpecificMasterNodesIT.java b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java index 076350129df..3f3b5f3e92c 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java @@ -33,11 +33,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.*; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.hamcrest.Matchers.*; -/** - * - */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -@Slow public class SpecificMasterNodesIT extends ElasticsearchIntegrationTest { protected final Settings.Builder settingsBuilder() { diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java index b136f3508bf..205abf29804 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java @@ -105,7 +105,6 @@ public class AwarenessAllocationIT 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 AwarenessAllocationIT 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/routing/allocation/BalanceUnbalancedClusterTest.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/BalanceUnbalancedClusterTest.java index 481a036eafa..a7d6bc33354 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,7 +40,6 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder; /** * see issue #9023 */ -@Slow public class BalanceUnbalancedClusterTest extends CatAllocationTestBase { @Override diff --git a/core/src/test/java/org/elasticsearch/codecs/CodecTests.java b/core/src/test/java/org/elasticsearch/codecs/CodecTests.java index 6347dc5da72..94cbf351fcf 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; @@ -36,9 +35,6 @@ import java.io.IOException; import static org.hamcrest.Matchers.containsString; -/** - */ -@Slow public class CodecTests extends ElasticsearchSingleNodeTest { public void testAcceptPostingsFormat() throws IOException { diff --git a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java index 556b9023593..4386b20685b 100644 --- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java @@ -72,9 +72,6 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.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 DiscoveryWithServiceDisruptionsIT extends ElasticsearchIntegrationTest { diff --git a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java index 6de8d6c310f..6a5ab527328 100644 --- a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java @@ -19,7 +19,6 @@ 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; @@ -36,7 +35,6 @@ import java.util.concurrent.ExecutionException; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -@Slow public class ZenUnicastDiscoveryIT extends ElasticsearchIntegrationTest { private ClusterDiscoveryConfiguration discoveryConfig; diff --git a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java index 4e3108ed280..d8e6ea415e8 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.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; @@ -42,7 +41,11 @@ import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction; import org.elasticsearch.test.ElasticsearchIntegrationTest; 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,12 +57,15 @@ 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 ZenDiscoveryIT extends ElasticsearchIntegrationTest { @Test 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 761f900829a..f3e3612ee5b 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 @@ -43,10 +43,7 @@ import java.net.MulticastSocket; import static org.hamcrest.Matchers.equalTo; -/** - * - */ -public class MulticastZenPingTests extends ElasticsearchTestCase { +public class MulticastZenPingIT extends ElasticsearchTestCase { 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 f7c897de140..e0788e9506e 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 @@ -36,16 +36,11 @@ import org.elasticsearch.test.ElasticsearchTestCase; 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 ElasticsearchTestCase { @Test public void testSimplePings() throws InterruptedException { diff --git a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java index f889200ef67..13d42b0a91f 100644 --- a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.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; @@ -46,11 +45,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; -/** - * - */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -@Slow public class GatewayIndexStateIT extends ElasticsearchIntegrationTest { private final ESLogger logger = Loggers.getLogger(GatewayIndexStateIT.class); diff --git a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java index e625f7e98db..54637f0f9ee 100644 --- a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.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; @@ -43,10 +42,6 @@ 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 MetaDataWriteDataNodesIT extends ElasticsearchIntegrationTest { diff --git a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java index c6d8332cc23..042827b6328 100644 --- a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java @@ -53,7 +53,6 @@ public class QuorumGatewayIT 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 QuorumGatewayIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testQuorumRecovery() throws Exception { logger.info("--> starting 3 nodes"); diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java index ff319e479c7..0ce25091580 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java @@ -20,8 +20,6 @@ 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; @@ -36,11 +34,7 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasItem; -/** - * - */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -@Slow public class RecoverAfterNodesIT extends ElasticsearchIntegrationTest { private final static TimeValue BLOCK_WAIT_TIMEOUT = TimeValue.timeValueSeconds(10); diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java index 6b17bb6fb2c..390829acad0 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java @@ -62,9 +62,7 @@ public class RecoveryBackwardsCompatibilityIT extends ElasticsearchBackwardsComp 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/RecoveryFromGatewayIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java index 78455f136cc..17947135918 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.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; @@ -50,17 +49,15 @@ import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.elasticsearch.test.ElasticsearchIntegrationTest.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 RecoveryFromGatewayIT extends ElasticsearchIntegrationTest { @Test - @Slow public void testOneNodeRecoverFromGateway() throws Exception { internalCluster().startNode(); @@ -103,7 +100,6 @@ public class RecoveryFromGatewayIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testSingleNodeNoFlush() throws Exception { internalCluster().startNode(); @@ -188,10 +184,8 @@ public class RecoveryFromGatewayIT 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 RecoveryFromGatewayIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testTwoNodeFirstNodeCleared() throws Exception { final String firstNode = internalCluster().startNode(); @@ -265,7 +258,6 @@ public class RecoveryFromGatewayIT 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 RecoveryFromGatewayIT 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 RecoveryFromGatewayIT 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/index/engine/InternalEngineMergeIT.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java index c0b21d685ae..1274df7ebc5 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java +++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java @@ -40,13 +40,10 @@ import static org.elasticsearch.test.ElasticsearchIntegrationTest.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 InternalEngineMergeIT extends ElasticsearchIntegrationTest { @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/InternalEngineTests.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java index befd7b94f2d..7e9906087f4 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java +++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java @@ -1378,7 +1378,6 @@ public class InternalEngineTests extends ElasticsearchTestCase { } } - @Slow @Test public void testEnableGcDeletes() throws Exception { try (Store store = createStore(); diff --git a/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java index 1af1cd58891..55f99e9a7f6 100644 --- a/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java +++ b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java @@ -49,7 +49,7 @@ public class IndexActionIT extends ElasticsearchIntegrationTest { * 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/IndexLifecycleActionIT.java b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java index 8077d21642e..4521bd93dd5 100644 --- a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java +++ b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java @@ -55,7 +55,6 @@ import static org.hamcrest.Matchers.*; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) public class IndexLifecycleActionIT extends ElasticsearchIntegrationTest { - @Slow @Test public void testIndexLifecycleActionsWith11Shards1Backup() throws Exception { Settings settings = settingsBuilder() diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java index fcabd5d9271..d456501848c 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java @@ -22,14 +22,10 @@ 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; -/** - */ -@Slow @ClusterScope(scope = Scope.TEST, numDataNodes = 0) public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT { diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java index df73f01cf0e..0aff442fe87 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java +++ b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java @@ -138,7 +138,6 @@ public class UpdateSettingsIT 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: diff --git a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java index c844e52bb93..aad99cfe318 100644 --- a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.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; @@ -92,7 +98,6 @@ public class IndicesStoreIntegrationIT 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 IndicesStoreIntegrationIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testShardActiveElseWhere() throws Exception { List nodes = internalCluster().startNodesAsync(2).get(); diff --git a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java index 3ed323229bb..839300c5d27 100644 --- a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java +++ b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java @@ -46,12 +46,21 @@ 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.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.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.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 RecoveryPercolatorIT extends ElasticsearchIntegrationTest { @@ -62,7 +71,6 @@ public class RecoveryPercolatorIT 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 RecoveryPercolatorIT 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 RecoveryPercolatorIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testLoadingPercolateQueriesDuringCloseAndOpen() throws Exception { internalCluster().startNode(); internalCluster().startNode(); @@ -221,13 +227,11 @@ public class RecoveryPercolatorIT 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/recovery/FullRollingRestartIT.java b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java index 29dd39681ee..882b445c86c 100644 --- a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java +++ b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java @@ -53,7 +53,6 @@ public class FullRollingRestartIT 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/RecoveryWhileUnderLoadIT.java b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java index 8570ac3e9a3..a0c37439a30 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java +++ b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java @@ -42,7 +42,10 @@ 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 RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { @@ -50,7 +53,6 @@ public class RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { 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 RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void recoverWhileUnderLoadAllocateReplicasRelocatePrimariesTest() throws Exception { logger.info("--> creating test index ..."); int numberOfShards = numberOfShards(); @@ -158,7 +159,6 @@ public class RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void recoverWhileUnderLoadWithReducedAllowedNodes() throws Exception { logger.info("--> creating test index ..."); int numberOfShards = numberOfShards(); @@ -229,7 +229,6 @@ public class RecoveryWhileUnderLoadIT 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/RelocationIT.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java index c59729fba8f..e2954442715 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.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.ElasticsearchIntegrationTest.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; @@ -79,8 +84,13 @@ 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.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; /** */ @@ -145,7 +155,6 @@ public class RelocationIT 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 RelocationIT 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 RelocationIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testCancellationCleansTempFiles() throws Exception { final String indexName = "test"; diff --git a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java index 4b5b787756b..417108bb2ab 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java +++ b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java @@ -37,7 +37,6 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; @ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE) -@LuceneTestCase.Slow public class SearchWithRejectionsIT extends ElasticsearchIntegrationTest { @Override public Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java index 748959319c9..cd760b5f612 100644 --- a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java +++ b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java @@ -44,7 +44,6 @@ public class StressSearchServiceReaperIT 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/EquivalenceIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java index 02f81c18ce0..438dd9f3236 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.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; @@ -71,7 +69,6 @@ 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 EquivalenceIT extends ElasticsearchIntegrationTest { // Make sure that unordered, reversed, disjoint and/or overlapping ranges are supported diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java index a4438f11794..7031a02367d 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java @@ -19,7 +19,6 @@ 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; @@ -39,25 +38,21 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; public class SearchWhileCreatingIndexIT extends ElasticsearchIntegrationTest { @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/SearchWithRandomExceptionsIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java index 8810d67b389..98f37091dc9 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java @@ -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 SearchWithRandomExceptionsIT extends ElasticsearchIntegrationTest { @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/functionscore/FunctionScoreIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java index fbf5d04c56b..7ac7f45211a 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.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; @@ -61,7 +60,6 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -@Slow public class FunctionScoreIT extends ElasticsearchIntegrationTest { static final String TYPE = "type"; diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java index b3f10ea912c..3267d22d83b 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java @@ -28,7 +28,10 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest; 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; @@ -50,7 +53,6 @@ import static org.hamcrest.Matchers.nullValue; public class RandomScoreFunctionIT extends ElasticsearchIntegrationTest { - @Slow public void testConsistentHitsWithSameSeed() throws Exception { createIndex("test"); ensureGreen(); // make sure we are done otherwise preference could change? diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java index d4a81d0a7ef..431819ade18 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java +++ b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java @@ -388,7 +388,6 @@ public class GeoFilterIT 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/highlight/HighlighterSearchIT.java b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java index 72843eabffe..f279b2cf338 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java @@ -21,16 +21,20 @@ 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; 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.BoostableQueryBuilder; +import org.elasticsearch.index.query.IdsQueryBuilder; +import org.elasticsearch.index.query.MatchQueryBuilder; import org.elasticsearch.index.query.MatchQueryBuilder.Operator; 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; @@ -47,15 +51,40 @@ 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.ElasticsearchAssertions.assertAcked; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFailures; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHighlight; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNotHighlighted; import static org.elasticsearch.test.hamcrest.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 HighlighterSearchIT extends ElasticsearchIntegrationTest { @Test @@ -990,7 +1019,6 @@ public class HighlighterSearchIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testFastVectorHighlighterManyDocs() throws Exception { assertAcked(prepareCreate("test").addMapping("type1", type1TermVectorMapping())); ensureGreen(); @@ -2498,7 +2526,6 @@ public class HighlighterSearchIT 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/query/SearchQueryIT.java b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java index 1872b823fde..5ad7eeca4c7 100644 --- a/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.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.ElasticsearchException; import org.elasticsearch.Version; import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder; @@ -33,9 +32,15 @@ import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.mapper.MapperParsingException; -import org.elasticsearch.index.query.*; +import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.CommonTermsQueryBuilder.Operator; +import org.elasticsearch.index.query.MatchQueryBuilder; import org.elasticsearch.index.query.MatchQueryBuilder.Type; +import org.elasticsearch.index.query.MultiMatchQueryBuilder; +import org.elasticsearch.index.query.QueryBuilders; +import org.elasticsearch.index.query.QueryStringQueryBuilder; +import org.elasticsearch.index.query.TermQueryBuilder; +import org.elasticsearch.index.query.WrapperQueryBuilder; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.script.Script; import org.elasticsearch.search.SearchHit; @@ -59,10 +64,25 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.*; import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.scriptFunction; import static org.elasticsearch.test.VersionUtils.randomVersion; -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.assertFailures; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertFirstHit; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHit; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchHits; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSecondHit; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertThirdHit; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasId; +import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.hasScore; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.closeTo; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.is; -@Slow public class SearchQueryIT extends ElasticsearchIntegrationTest { @Override diff --git a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java index 2cfd817f5f3..fce8bb7e24c 100644 --- a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java +++ b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java @@ -582,7 +582,7 @@ public class QueryRescorerIT 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/SearchScanIT.java b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java index 64f3e783a98..45cd36d6767 100644 --- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java +++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java @@ -20,7 +20,6 @@ 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; @@ -38,7 +37,6 @@ import static org.hamcrest.Matchers.equalTo; public class SearchScanIT extends ElasticsearchIntegrationTest { @Test - @Slow public void testNarrowingQuery() throws Exception { createIndex("test"); ensureGreen(); diff --git a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java index 8321b3b64c4..599d65c2069 100644 --- a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java +++ b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java @@ -1023,7 +1023,7 @@ public class SimpleSortIT 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/suggest/SuggestSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java index e16df6388e4..27cc57c6257 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java @@ -470,7 +470,6 @@ public class SuggestSearchIT extends ElasticsearchIntegrationTest { } @Test - @Slow @Nightly public void testMarvelHerosPhraseSuggest() throws IOException { CreateIndexRequestBuilder builder = prepareCreate("test").setSettings(settingsBuilder() diff --git a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index 144a2d34cf4..70607aa1e3c 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.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,10 +85,25 @@ 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 SharedClusterSnapshotRestoreIT extends AbstractSnapshotIT { @Test diff --git a/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java b/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java index 790c088cc02..9f08eb7ff0e 100644 --- a/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java +++ b/core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java @@ -195,25 +195,9 @@ 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 { - } - /** * Property that controls whether ThirdParty Integration tests are run (not the default). */ diff --git a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java index 049c6f58bc6..ddcef10b806 100644 --- a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java +++ b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java @@ -21,7 +21,6 @@ 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.InternalTestCluster; @@ -31,7 +30,6 @@ import org.junit.Test; import java.io.IOException; -@LuceneTestCase.Slow public class NetworkPartitionIT extends ElasticsearchIntegrationTest { @Override diff --git a/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java b/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java index b9449d03db3..2aa2d43aedc 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java +++ b/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.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; @@ -80,7 +78,6 @@ import java.util.Set; * Runs the clients test suite against an elasticsearch cluster. */ @ElasticsearchRestTestCase.Rest -@Slow @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) 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 663e928e529..cca84a14097 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.network.NetworkService; @@ -31,7 +30,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/TribeIT.java b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java index a1aba983219..9e0d1bb10fa 100644 --- a/core/src/test/java/org/elasticsearch/tribe/TribeIT.java +++ b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java @@ -38,7 +38,6 @@ import org.elasticsearch.node.NodeBuilder; import org.elasticsearch.test.ElasticsearchIntegrationTest; 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,7 +56,6 @@ 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 TribeIT extends ElasticsearchIntegrationTest { diff --git a/core/src/test/java/org/elasticsearch/update/UpdateIT.java b/core/src/test/java/org/elasticsearch/update/UpdateIT.java index 12498a81161..5d7eb7777af 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateIT.java +++ b/core/src/test/java/org/elasticsearch/update/UpdateIT.java @@ -568,7 +568,6 @@ public class UpdateIT extends ElasticsearchIntegrationTest { } @Test - @Slow public void testConcurrentUpdateWithRetryOnConflict() throws Exception { final boolean useBulkApi = randomBoolean(); createTestIndex(); @@ -627,7 +626,6 @@ public class UpdateIT 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/versioning/SimpleVersioningIT.java b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java index d2c1c8bd662..a1cec0cbadc 100644 --- a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java +++ b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java @@ -537,7 +537,6 @@ public class SimpleVersioningIT extends ElasticsearchIntegrationTest { @Test - @Slow public void testRandomIDsAndVersions() throws Exception { createIndex("test"); ensureGreen(); @@ -757,7 +756,6 @@ public class SimpleVersioningIT 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/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..14084d33a73 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 @@ -25,7 +25,6 @@ import org.elasticsearch.cloud.azure.management.AzureComputeServiceSimpleMock; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.junit.Test; -import org.apache.lucene.util.LuceneTestCase.Slow; import static org.hamcrest.Matchers.notNullValue; @@ -33,7 +32,6 @@ import static org.hamcrest.Matchers.notNullValue; 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..3bb539d4e35 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 @@ -25,7 +25,6 @@ import org.elasticsearch.cloud.azure.management.AzureComputeServiceTwoNodesMock; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.junit.Test; -import org.apache.lucene.util.LuceneTestCase.Slow; import static org.hamcrest.Matchers.notNullValue; @@ -33,7 +32,6 @@ import static org.hamcrest.Matchers.notNullValue; numDataNodes = 0, transportClientRatio = 0.0, numClientNodes = 0) -@Slow public class AzureTwoStartedNodesTest extends AbstractAzureComputeServiceTest { public AzureTwoStartedNodesTest() { 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..3960cfe8a51 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; @@ -50,8 +49,6 @@ 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 { 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(); - } -} - From 6d0c106178db2a9057fde2fd19ef1c57ad6856ab Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 16:32:35 -0700 Subject: [PATCH 38/49] Fix testing docs to not mention @Slow or @Integration --- TESTING.asciidoc | 2 -- 1 file changed, 2 deletions(-) diff --git a/TESTING.asciidoc b/TESTING.asciidoc index 87af991eb5b..c7c6fe34c5d 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) From 32a5c20b33434ff4da1ab464fa98cc937f706460 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 16:43:09 -0700 Subject: [PATCH 39/49] Tests: Forbid @Slow Now that all uses of @Slow are gone, we can forbid this annotations use so tests are not confusing. Follow up to #12617. --- dev-tools/src/main/resources/forbidden/test-signatures.txt | 1 + .../elasticsearch/cloud/aws/blobstore/S3OutputStreamTest.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-tools/src/main/resources/forbidden/test-signatures.txt b/dev-tools/src/main/resources/forbidden/test-signatures.txt index 7289edcd755..07ebf1712eb 100644 --- a/dev-tools/src/main/resources/forbidden/test-signatures.txt +++ b/dev-tools/src/main/resources/forbidden/test-signatures.txt @@ -19,3 +19,4 @@ 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 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..3b1ecb83103 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 @@ -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; From d7544fb5a8e87dbf829b15b5901327b3b074e9aa Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 16:48:53 -0700 Subject: [PATCH 40/49] Tests: Remove references to tests.slow and tests.integration Another follow up to #12617. --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index a59ed99a38d..31855078886 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,6 @@ ${project.basedir}/backwards random random - false ERROR 512m ${basedir}/logs/ @@ -89,7 +88,6 @@ - @@ -633,10 +631,8 @@ ${tests.weekly} ${tests.failfast} ${tests.awaitsfix} - ${tests.slow} ${tests.timeoutSuite} ${tests.showSuccess} - ${tests.integration} ${tests.thirdparty} ${tests.config} ${tests.client.ratio} @@ -746,8 +742,6 @@ **/*IT.class - - true true From 127a04ef43d199b9de27522bba30dfe78116ba60 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Mon, 3 Aug 2015 17:52:24 -0600 Subject: [PATCH 41/49] Don't access pgp.mit.edu over HTTP --- docs/reference/setup/repositories.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 1e12d03252590bb44ae0cc3771c82c63730de212 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 3 Aug 2015 17:43:00 -0700 Subject: [PATCH 42/49] Tests: Rename base tests cases to use "TestCase" suffix Most of the abstract base test classes we have were previously @Ignored. However, there were also some other tests ignored. Having two ways to quiet tests is confusing, and clearly it has caused some tests to get lost in the fold. This change moves all base test classes to use the "TestCase" suffix, which is not picked up by the test class name pattern. It also removes @Ignore from (almost) all tests, and adds it to forbidden apis. And since we were renaming, I shorted base test class names to use "ES" instead of "Elasticsearch". I type this a lot of types a day, and I have heard others express a similar desire for a shorter name. closes #10659 --- .../TruncateTokenFilterTests.java | 4 +- .../miscellaneous/UniqueTokenFilterTests.java | 4 +- .../lucene/queries/BlendedTermQueryTest.java | 4 +- .../CustomPassageFormatterTests.java | 4 +- .../CustomPostingsHighlighterTests.java | 4 +- .../CustomSeparatorBreakIteratorTests.java | 4 +- .../apache/lucene/util/SloppyMathTests.java | 4 +- ...eptionTests.java => ESExceptionTests.java} | 4 +- .../ExceptionSerializationTests.java | 4 +- .../elasticsearch/NamingConventionTests.java | 26 ++++++------ .../java/org/elasticsearch/VersionTests.java | 4 +- .../action/IndicesRequestIT.java | 8 ++-- .../action/ListenerActionIT.java | 4 +- .../action/OriginalIndicesTests.java | 4 +- .../action/RejectionActionIT.java | 8 ++-- .../action/admin/HotThreadsIT.java | 4 +- .../repositories/RepositoryBlocksIT.java | 8 ++-- .../cluster/snapshots/SnapshotBlocksIT.java | 9 ++--- .../state/ClusterStateRequestTest.java | 4 +- .../admin/cluster/stats/ClusterStatsIT.java | 8 ++-- .../cluster/tasks/PendingTasksBlocksIT.java | 8 ++-- .../clear/ClearIndicesCacheBlocksIT.java | 8 ++-- .../admin/indices/create/CreateIndexIT.java | 8 ++-- .../create/CreateIndexRequestBuilderTest.java | 5 +-- .../indices/delete/DeleteIndexBlocksIT.java | 8 ++-- .../admin/indices/flush/FlushBlocksIT.java | 8 ++-- .../action/admin/indices/get/GetIndexIT.java | 7 ++-- .../mapping/put/PutMappingRequestTests.java | 4 +- .../indices/optimize/OptimizeBlocksIT.java | 8 ++-- .../indices/refresh/RefreshBlocksIT.java | 8 ++-- .../segments/IndicesSegmentsBlocksIT.java | 8 ++-- .../segments/IndicesSegmentsRequestTests.java | 4 +- .../shards/IndicesShardStoreRequestIT.java | 7 ++-- .../shards/IndicesShardStoreResponseTest.java | 6 +-- .../indices/stats/IndicesStatsBlocksIT.java | 8 ++-- .../indices/stats/IndicesStatsTests.java | 4 +- .../warmer/put/PutWarmerRequestTests.java | 4 +- .../action/bulk/BulkIntegrationIT.java | 4 +- .../bulk/BulkProcessorClusterSettingsIT.java | 8 ++-- .../action/bulk/BulkProcessorIT.java | 4 +- .../action/bulk/BulkRequestTests.java | 4 +- .../count/CountRequestBuilderTests.java | 4 +- .../action/count/CountRequestTests.java | 4 +- .../action/count/CountResponseTests.java | 4 +- .../fieldstats/FieldStatsRequestTest.java | 4 +- .../action/get/MultiGetShardRequestTests.java | 4 +- .../action/index/IndexRequestBuilderTest.java | 4 +- .../action/index/IndexRequestTests.java | 4 +- .../get/GetIndexedScriptRequestTests.java | 4 +- .../MultiPercolatorRequestTests.java | 4 +- .../search/MultiSearchRequestTests.java | 4 +- .../search/SearchRequestBuilderTests.java | 4 +- .../action/support/IndicesOptionsTests.java | 4 +- .../support/ListenableActionFutureTests.java | 4 +- .../TransportActionFilterChainTests.java | 4 +- .../replication/ShardReplicationTests.java | 4 +- .../termvectors/AbstractTermVectorsTests.java | 5 +-- .../GetTermVectorsCheckDocFreqIT.java | 4 +- .../termvectors/TermVectorsUnitTests.java | 4 +- .../action/update/UpdateRequestTests.java | 4 +- .../elasticsearch/aliases/IndexAliasesIT.java | 4 +- .../ClusterAllocationRerouteBenchmark.java | 10 ++--- .../elasticsearch/blocks/SimpleBlocksIT.java | 6 +-- .../bootstrap/JNANativesTests.java | 4 +- .../elasticsearch/bootstrap/JarHellTests.java | 4 +- .../bootstrap/SecurityTests.java | 4 +- .../broadcast/BroadcastActionsIT.java | 4 +- .../BasicAnalysisBackwardCompatibilityIT.java | 8 ++-- .../BasicBackwardsCompatibilityIT.java | 5 +-- .../ClusterStateBackwardsCompatIT.java | 4 +- .../GetIndexBackwardsCompatibilityIT.java | 4 +- .../NodesStatsBasicBackwardsCompatIT.java | 8 ++-- .../OldIndexBackwardsCompatibilityIT.java | 6 +-- .../bwcompat/RestoreBackwardsCompatIT.java | 8 ++-- .../StaticIndexBackwardCompatibilityIT.java | 6 +-- ...ansportClientBackwardsCompatibilityIT.java | 4 +- .../UnicastBackwardsCompatibilityIT.java | 4 +- .../client/AbstractClientHeadersTests.java | 4 +- .../client/node/NodeClientIT.java | 8 ++-- .../client/transport/TransportClientIT.java | 8 ++-- .../TransportClientNodesServiceTests.java | 4 +- .../transport/TransportClientRetryIT.java | 9 ++--- .../cluster/ClusterHealthIT.java | 4 +- .../cluster/ClusterHealthResponsesTests.java | 4 +- .../cluster/ClusterInfoServiceIT.java | 6 +-- .../cluster/ClusterServiceIT.java | 8 ++-- .../cluster/ClusterStateDiffIT.java | 6 +-- .../ClusterStateDiffPublishingTests.java | 4 +- .../elasticsearch/cluster/DiskUsageTests.java | 4 +- .../cluster/MinimumMasterNodesIT.java | 9 ++--- .../elasticsearch/cluster/NoMasterNodeIT.java | 8 ++-- .../cluster/SimpleClusterStateIT.java | 4 +- .../cluster/SimpleDataNodesIT.java | 8 ++-- .../cluster/SpecificMasterNodesIT.java | 8 ++-- .../cluster/UpdateSettingsValidationIT.java | 8 ++-- .../ack/AckClusterUpdateSettingsIT.java | 8 ++-- .../org/elasticsearch/cluster/ack/AckIT.java | 6 +-- .../allocation/AwarenessAllocationIT.java | 8 ++-- .../cluster/allocation/ClusterRerouteIT.java | 8 ++-- .../allocation/FilteringAllocationIT.java | 8 ++-- .../allocation/ShardsAllocatorModuleIT.java | 8 ++-- .../allocation/SimpleAllocationIT.java | 4 +- .../cluster/block/ClusterBlockTests.java | 4 +- .../DateMathExpressionResolverTests.java | 4 +- .../HumanReadableIndexSettingsTests.java | 4 +- .../IndexNameExpressionResolverTests.java | 4 +- .../metadata/MappingMetaDataParserTests.java | 4 +- .../metadata/ToAndFromJsonMetaDataTests.java | 4 +- .../WildcardExpressionResolverTests.java | 4 +- .../node/DiscoveryNodeFiltersTests.java | 4 +- .../cluster/routing/AllocationIdTests.java | 4 +- .../cluster/routing/DelayedAllocationIT.java | 6 +-- .../RoutingBackwardCompatibilityTests.java | 4 +- ...ingBackwardCompatibilityUponUpgradeIT.java | 6 +-- .../cluster/routing/RoutingServiceTests.java | 4 +- .../cluster/routing/RoutingTableTest.java | 4 +- .../cluster/routing/ShardRoutingTests.java | 4 +- .../cluster/routing/TestShardRouting.java | 4 +- .../cluster/routing/UnassignedInfoTests.java | 4 +- .../allocation/AddIncrementallyTests.java | 4 +- .../allocation/AllocationCommandsTests.java | 4 +- .../allocation/AwarenessAllocationTests.java | 4 +- .../allocation/BalanceConfigurationTests.java | 4 +- .../BalanceUnbalancedClusterTest.java | 2 +- ...stBase.java => CatAllocationTestCase.java} | 5 +-- .../ClusterRebalanceRoutingTests.java | 4 +- .../ConcurrentRebalanceRoutingTests.java | 4 +- .../allocation/DeadNodesAllocationTests.java | 4 +- .../allocation/DisableAllocationTests.java | 4 +- ...ReplicaAsPrimaryDuringRelocationTests.java | 4 +- .../allocation/FailedNodeRoutingTests.java | 4 +- .../allocation/FailedShardsRoutingTests.java | 5 +-- .../allocation/FilterRoutingTests.java | 4 +- .../routing/allocation/IndexBalanceTests.java | 4 +- .../NodeVersionAllocationDeciderTests.java | 4 +- ...alPrimariesToRelocatingPrimariesTests.java | 4 +- .../PreferPrimaryAllocationTests.java | 4 +- .../PrimaryElectionRoutingTests.java | 4 +- ...yNotRelocatedWhileBeingRecoveredTests.java | 4 +- .../RandomAllocationDeciderTests.java | 4 +- .../allocation/RebalanceAfterActiveTests.java | 4 +- .../ReplicaAllocatedAfterPrimaryTests.java | 4 +- .../RoutingNodesIntegrityTests.java | 4 +- .../allocation/SameShardRoutingTests.java | 4 +- .../allocation/ShardVersioningTests.java | 4 +- .../ShardsLimitAllocationTests.java | 4 +- .../SingleShardNoReplicasRoutingTests.java | 4 +- .../SingleShardOneReplicaRoutingTests.java | 4 +- .../allocation/StartedShardsRoutingTests.java | 6 +-- .../TenShardsOneReplicaRoutingTests.java | 4 +- .../allocation/ThrottlingAllocationTests.java | 4 +- .../UpdateNumberOfReplicasTests.java | 4 +- .../decider/DiskThresholdDeciderTests.java | 4 +- .../DiskThresholdDeciderUnitTests.java | 4 +- .../decider/EnableAllocationDeciderIT.java | 6 +-- .../decider/EnableAllocationTests.java | 4 +- .../allocation/decider/MockDiskUsagesIT.java | 6 +-- .../murmur3/Murmur3HashFunctionTests.java | 4 +- .../ClusterSerializationTests.java | 4 +- .../ClusterStateToStringTests.java | 4 +- .../cluster/serialization/DiffableTests.java | 4 +- .../cluster/settings/ClusterSettingsIT.java | 8 ++-- .../cluster/settings/SettingsFilteringIT.java | 8 ++-- .../settings/SettingsValidatorTests.java | 4 +- .../cluster/shards/ClusterSearchShardsIT.java | 8 ++-- .../structure/RoutingIteratorTests.java | 4 +- .../org/elasticsearch/codecs/CodecTests.java | 4 +- .../org/elasticsearch/common/Base64Test.java | 4 +- .../elasticsearch/common/BooleansTests.java | 4 +- .../elasticsearch/common/ChannelsTests.java | 6 +-- .../elasticsearch/common/ParseFieldTests.java | 4 +- .../elasticsearch/common/PidFileTests.java | 4 +- .../elasticsearch/common/StringsTests.java | 4 +- .../org/elasticsearch/common/TableTests.java | 4 +- .../org/elasticsearch/common/UUIDTests.java | 5 +-- .../common/blobstore/BlobStoreTest.java | 5 +-- .../breaker/MemoryCircuitBreakerTests.java | 4 +- .../common/bytes/BytesReferenceTests.java | 4 +- .../common/bytes/PagedBytesReferenceTest.java | 4 +- .../common/cli/CheckFileCommandTests.java | 4 +- .../common/cli/CliToolTestCase.java | 8 +--- .../collect/CopyOnWriteHashMapTests.java | 4 +- .../collect/CopyOnWriteHashSetTests.java | 4 +- .../AbstractCompressedStreamTests.java | 5 +-- .../AbstractCompressedXContentTests.java | 4 +- .../lzf/CorruptedCompressorTests.java | 4 +- .../common/geo/GeoHashTests.java | 4 +- .../common/geo/GeoJSONShapeParserTests.java | 4 +- .../common/geo/ShapeBuilderTests.java | 5 +-- .../common/hashing/MurmurHash3Tests.java | 4 +- .../common/hppc/HppcMapsTests.java | 4 +- .../common/io/FileSystemUtilsTests.java | 4 +- .../elasticsearch/common/io/StreamsTests.java | 4 +- .../common/io/streams/BytesStreamsTests.java | 6 +-- .../common/joda/DateMathParserTests.java | 4 +- .../common/logging/jdk/JDKESLoggerTests.java | 4 +- .../logging/log4j/Log4jESLoggerTests.java | 4 +- .../log4j/LoggingConfigurationTests.java | 4 +- .../lucene/IndexCacheableQueryTests.java | 4 +- .../common/lucene/LuceneTest.java | 4 +- .../common/lucene/ShardCoreKeyMapTests.java | 4 +- .../common/lucene/all/SimpleAllTests.java | 4 +- ...Tests.java => ESDirectoryReaderTests.java} | 4 +- .../lucene/index/FreqTermsEnumTests.java | 9 +---- .../search/MultiPhrasePrefixQueryTests.java | 4 +- .../function/ScriptScoreFunctionTests.java | 4 +- .../morelikethis/MoreLikeThisQueryTests.java | 4 +- .../morelikethis/XMoreLikeThisTests.java | 4 +- .../store/ByteArrayIndexInputTests.java | 4 +- .../store/InputStreamIndexInputTests.java | 4 +- .../common/lucene/uid/VersionsTests.java | 4 +- .../common/math/MathUtilsTests.java | 4 +- .../common/path/PathTrieTests.java | 4 +- .../property/PropertyPlaceholderTest.java | 4 +- .../recycler/AbstractRecyclerTests.java | 4 +- .../common/regex/RegexTests.java | 4 +- .../common/rounding/RoundingTests.java | 4 +- .../rounding/TimeZoneRoundingTests.java | 4 +- .../common/settings/SettingsFilterTests.java | 4 +- .../common/settings/SettingsTests.java | 4 +- .../loader/JsonSettingsLoaderTests.java | 4 +- .../loader/YamlSettingsLoaderTests.java | 4 +- .../common/unit/ByteSizeUnitTests.java | 4 +- .../common/unit/ByteSizeValueTests.java | 4 +- .../common/unit/DistanceUnitTests.java | 4 +- .../common/unit/FuzzinessTests.java | 4 +- .../common/unit/RatioValueTests.java | 4 +- .../common/unit/SizeValueTests.java | 4 +- .../common/unit/TimeValueTests.java | 4 +- .../common/util/ArrayUtilsTests.java | 4 +- .../common/util/BigArraysTests.java | 6 +-- .../common/util/ByteUtilsTests.java | 4 +- .../common/util/BytesRefHashTests.java | 4 +- .../common/util/CancellableThreadsTest.java | 4 +- .../common/util/CollectionUtilsTests.java | 4 +- .../common/util/LongHashTests.java | 4 +- .../common/util/LongObjectHashMapTests.java | 4 +- .../util/MultiDataPathUpgraderTests.java | 5 +-- .../common/util/SingleObjectCacheTests.java | 4 +- .../common/util/URIPatternTests.java | 4 +- .../common/util/concurrent/CountDownTest.java | 4 +- .../util/concurrent/EsExecutorsTests.java | 4 +- .../concurrent/PrioritizedExecutorsTests.java | 4 +- .../util/concurrent/RefCountedTest.java | 4 +- .../common/xcontent/XContentFactoryTests.java | 4 +- .../builder/BuilderRawFieldTests.java | 4 +- .../builder/XContentBuilderTests.java | 4 +- .../cbor/CborXContentParserTests.java | 4 +- .../common/xcontent/cbor/JsonVsCborTests.java | 9 +---- .../xcontent/smile/JsonVsSmileTests.java | 4 +- .../xcontent/support/XContentHelperTests.java | 4 +- .../support/XContentMapValuesTests.java | 4 +- .../AbstractFilteringJsonGeneratorTests.java | 4 +- .../WriteConsistencyLevelIT.java | 4 +- .../count/simple/SimpleCountIT.java | 4 +- .../deps/jackson/JacksonLocationTests.java | 4 +- .../deps/joda/SimpleJodaTests.java | 6 +-- .../deps/lucene/SimpleLuceneTests.java | 4 +- .../deps/lucene/VectorHighlighterTests.java | 4 +- ...usterStatePublishResponseHandlerTests.java | 4 +- .../DiscoveryWithServiceDisruptionsIT.java | 11 +++-- .../discovery/ZenFaultDetectionTests.java | 4 +- .../discovery/ZenUnicastDiscoveryIT.java | 8 ++-- .../discovery/zen/ElectMasterServiceTest.java | 4 +- .../zen/NodeJoinControllerTests.java | 4 +- .../discovery/zen/ZenDiscoveryIT.java | 6 +-- .../discovery/zen/ZenDiscoveryUnitTest.java | 4 +- .../discovery/zen/ZenPingTests.java | 4 +- .../ping/multicast/MulticastZenPingIT.java | 4 +- .../zen/ping/unicast/UnicastZenPingIT.java | 4 +- .../org/elasticsearch/document/BulkIT.java | 4 +- .../document/DocumentActionsIT.java | 4 +- .../elasticsearch/document/ShardInfoIT.java | 4 +- .../elasticsearch/env/EnvironmentTests.java | 4 +- .../env/NodeEnvironmentTests.java | 4 +- .../elasticsearch/exists/SimpleExistsIT.java | 4 +- .../explain/ExplainActionIT.java | 4 +- .../fieldstats/FieldStatsIntegrationIT.java | 4 +- .../fieldstats/FieldStatsTests.java | 4 +- .../gateway/AsyncShardFetchTests.java | 4 +- .../gateway/DanglingIndicesStateTests.java | 4 +- .../gateway/GatewayIndexStateIT.java | 8 ++-- .../gateway/GatewayMetaStateTests.java | 4 +- .../gateway/GatewayServiceTests.java | 4 +- .../gateway/MetaDataStateFormatTest.java | 4 +- .../gateway/MetaDataWriteDataNodesIT.java | 8 ++-- .../gateway/MetaStateServiceTests.java | 4 +- .../gateway/PrimaryShardAllocatorTests.java | 4 +- .../gateway/PriorityComparatorTests.java | 4 +- .../gateway/QuorumGatewayIT.java | 8 ++-- .../gateway/RecoverAfterNodesIT.java | 8 ++-- .../RecoveryBackwardsCompatibilityIT.java | 9 ++--- .../gateway/RecoveryFromGatewayIT.java | 8 ++-- .../gateway/ReplicaShardAllocatorTests.java | 4 +- .../org/elasticsearch/get/GetActionIT.java | 4 +- .../http/netty/HttpPublishPortIT.java | 8 ++-- .../http/netty/NettyHttpChannelTests.java | 4 +- .../netty/NettyHttpServerPipeliningTest.java | 4 +- .../http/netty/NettyPipeliningDisabledIT.java | 8 ++-- .../http/netty/NettyPipeliningEnabledIT.java | 8 ++-- .../pipelining/HttpPipeliningHandlerTest.java | 5 +-- .../index/IndexRequestBuilderIT.java | 4 +- .../index/IndexWithShadowReplicasIT.java | 6 +-- .../index/TransportIndexFailuresIT.java | 6 +-- .../elasticsearch/index/VersionTypeTests.java | 4 +- .../aliases/IndexAliasesServiceTests.java | 4 +- .../ASCIIFoldingTokenFilterFactoryTests.java | 4 +- .../index/analysis/AnalysisFactoryTests.java | 4 +- .../index/analysis/AnalysisModuleTests.java | 4 +- .../index/analysis/AnalysisTests.java | 4 +- .../AnalyzerBackwardsCompatTests.java | 16 +++----- .../index/analysis/CJKFilterFactoryTests.java | 4 +- .../index/analysis/CharFilterTests.java | 4 +- .../index/analysis/CompoundAnalysisTests.java | 4 +- .../HunspellTokenFilterFactoryTests.java | 4 +- .../analysis/KeepFilterFactoryTests.java | 4 +- .../analysis/KeepTypesFilterFactoryTests.java | 4 +- .../LimitTokenCountFilterFactoryTests.java | 4 +- .../analysis/NGramTokenizerFactoryTests.java | 4 +- .../index/analysis/NumericAnalyzerTests.java | 4 +- .../index/analysis/PatternAnalyzerTest.java | 4 +- .../PatternCaptureTokenFilterTests.java | 4 +- .../PreBuiltAnalyzerProviderFactoryTests.java | 4 +- .../index/analysis/PreBuiltAnalyzerTests.java | 4 +- ...PreBuiltCharFilterFactoryFactoryTests.java | 4 +- ...reBuiltTokenFilterFactoryFactoryTests.java | 4 +- .../PreBuiltTokenizerFactoryFactoryTests.java | 4 +- .../ShingleTokenFilterFactoryTests.java | 4 +- .../index/analysis/SnowballAnalyzerTests.java | 4 +- .../StemmerTokenFilterFactoryTests.java | 4 +- .../index/analysis/StopAnalyzerTests.java | 4 +- .../index/analysis/StopTokenFilterTests.java | 4 +- .../WordDelimiterTokenFilterFactoryTests.java | 4 +- .../CommonGramsTokenFilterFactoryTests.java | 4 +- .../synonyms/SynonymsAnalysisTest.java | 4 +- .../cache/bitset/BitSetFilterCacheTest.java | 4 +- .../elasticsearch/index/codec/CodecTests.java | 4 +- ...ormatTest.java => PostingsFormatTest.java} | 2 +- .../SnapshotDeletionPolicyTests.java | 4 +- .../index/engine/CommitStatsTests.java | 4 +- .../index/engine/InternalEngineIT.java | 4 +- .../index/engine/InternalEngineMergeIT.java | 10 ++--- .../engine/InternalEngineSettingsTest.java | 4 +- .../index/engine/InternalEngineTests.java | 4 +- .../index/engine/ShadowEngineTests.java | 4 +- .../fielddata/AbstractFieldDataTests.java | 4 +- .../DisabledFieldDataFormatTests.java | 4 +- .../FieldDataFilterIntegrationIT.java | 5 +-- .../index/fielddata/FieldDataLoadingIT.java | 4 +- .../index/fielddata/FieldDataTests.java | 4 +- .../fielddata/IndexFieldDataServiceTests.java | 4 +- .../index/fielddata/ScriptDocValuesTests.java | 4 +- .../fieldcomparator/ReplaceMissingTests.java | 4 +- .../ordinals/MultiOrdinalsTests.java | 4 +- .../ordinals/SingleOrdinalsTests.java | 4 +- .../ParentChildFilteredTermsEnumTests.java | 4 +- .../mapper/DynamicMappingIntegrationIT.java | 4 +- .../index/mapper/DynamicMappingTests.java | 4 +- .../index/mapper/FieldTypeLookupTests.java | 4 +- .../index/mapper/FieldTypeTestCase.java | 4 +- .../mapper/TransformOnIndexMapperIT.java | 4 +- .../elasticsearch/index/mapper/UidTests.java | 4 +- .../mapper/all/SimpleAllMapperTests.java | 5 +-- .../mapper/binary/BinaryMappingTests.java | 4 +- .../mapper/boost/CustomBoostMappingTests.java | 4 +- .../mapper/boost/FieldLevelBoostTests.java | 4 +- .../camelcase/CamelCaseFieldNameTests.java | 4 +- .../CompletionFieldMapperTests.java | 4 +- .../mapper/compound/CompoundTypesTests.java | 4 +- .../copyto/CopyToMapperIntegrationIT.java | 4 +- .../mapper/copyto/CopyToMapperTests.java | 6 +-- .../mapper/core/BooleanFieldMapperTests.java | 4 +- .../mapper/core/Murmur3FieldMapperTests.java | 4 +- .../TokenCountFieldMapperIntegrationIT.java | 5 +-- .../core/TokenCountFieldMapperTests.java | 4 +- .../date/DateBackwardsCompatibilityTests.java | 4 +- .../mapper/date/SimpleDateMappingTests.java | 4 +- .../GenericStoreDynamicTemplateTests.java | 5 +-- .../PathMatchDynamicTemplateTests.java | 6 +-- .../simple/SimpleDynamicTemplatesTests.java | 4 +- .../ExternalValuesMapperIntegrationIT.java | 4 +- .../SimpleExternalMappingTests.java | 4 +- .../index/mapper/geo/GeoEncodingTests.java | 4 +- .../mapper/geo/GeoPointFieldMapperTests.java | 4 +- .../mapper/geo/GeoShapeFieldMapperTests.java | 4 +- .../geo/GeohashMappingGeoPointTests.java | 4 +- .../index/mapper/id/IdMappingTests.java | 4 +- .../mapper/index/IndexTypeMapperTests.java | 4 +- .../internal/FieldNamesFieldMapperTests.java | 4 +- .../index/mapper/ip/SimpleIpMappingTests.java | 4 +- .../mapper/lucene/DoubleIndexingDocTest.java | 6 +-- .../lucene/StoredNumericValuesTest.java | 4 +- .../mapper/merge/TestMergeMapperTests.java | 6 +-- .../mapper/multifield/MultiFieldTests.java | 4 +- .../multifield/MultiFieldsIntegrationIT.java | 4 +- .../merge/JavaMultiFieldMergeTests.java | 6 +-- .../mapper/nested/NestedMappingTests.java | 4 +- .../mapper/null_value/NullValueTests.java | 4 +- .../mapper/numeric/SimpleNumericTests.java | 4 +- .../object/NullValueObjectMappingTests.java | 4 +- .../object/SimpleObjectMappingTests.java | 5 +-- .../mapper/parent/ParentMappingTests.java | 4 +- .../index/mapper/path/PathMapperTests.java | 4 +- .../routing/RoutingTypeMapperTests.java | 4 +- .../mapper/simple/SimpleMapperTests.java | 4 +- .../mapper/size/SizeMappingIntegrationIT.java | 4 +- .../index/mapper/size/SizeMappingTests.java | 4 +- .../source/CompressSourceMappingTests.java | 4 +- .../source/DefaultSourceMappingTests.java | 4 +- .../string/SimpleStringMappingTests.java | 9 +---- .../timestamp/TimestampMappingTests.java | 4 +- .../index/mapper/ttl/TTLMappingTests.java | 5 +-- .../ParseDocumentTypeLevelsTests.java | 4 +- .../ParseMappingTypeLevelTests.java | 4 +- .../update/UpdateMappingOnClusterIT.java | 4 +- .../mapper/update/UpdateMappingTests.java | 4 +- .../query/GeoShapeQueryBuilderTests.java | 4 +- ...QueryParserFilterDateRangeFormatTests.java | 4 +- ...eryParserFilterDateRangeTimezoneTests.java | 4 +- .../query/SimpleIndexQueryParserTests.java | 5 +-- .../index/query/TemplateQueryBuilderTest.java | 4 +- .../index/query/TemplateQueryIT.java | 6 +-- .../index/query/TemplateQueryParserTest.java | 6 +-- .../query/plugin/CustomQueryParserIT.java | 4 +- ...dTests.java => AbstractChildTestCase.java} | 6 +-- .../ChildrenConstantScoreQueryTests.java | 2 +- .../search/child/ChildrenQueryTests.java | 2 +- .../child/ParentConstantScoreQueryTests.java | 2 +- .../index/search/child/ParentQueryTests.java | 2 +- .../index/search/child/ScoreTypeTests.java | 4 +- .../index/search/geo/GeoDistanceTests.java | 4 +- .../index/search/geo/GeoHashUtilsTests.java | 4 +- .../search/geo/GeoPointParsingTests.java | 4 +- .../index/search/geo/GeoUtilsTests.java | 4 +- .../index/shard/CommitPointsTests.java | 4 +- .../index/shard/IndexShardModuleTests.java | 4 +- .../index/shard/IndexShardTests.java | 7 +--- .../index/shard/MergePolicySettingsTest.java | 13 +----- .../index/shard/ShardPathTests.java | 4 +- .../index/shard/ShardUtilsTests.java | 4 +- .../index/shard/VersionFieldUpgraderTest.java | 5 +-- .../index/similarity/SimilarityTests.java | 4 +- .../snapshots/blobstore/FileInfoTest.java | 4 +- .../blobstore/SlicedInputStreamTest.java | 4 +- .../index/store/CorruptedFileIT.java | 6 +-- .../index/store/CorruptedTranslogIT.java | 6 +-- .../index/store/DirectoryUtilsTest.java | 4 +- .../index/store/ExceptionRetryIT.java | 6 +-- .../index/store/IndexStoreTests.java | 4 +- .../index/store/LegacyVerificationTests.java | 4 +- .../elasticsearch/index/store/StoreTest.java | 4 +- .../index/suggest/stats/SuggestStatsIT.java | 6 +-- .../index/translog/TranslogTests.java | 4 +- .../index/translog/TranslogVersionTests.java | 4 +- .../elasticsearch/indexing/IndexActionIT.java | 4 +- .../IndexLifecycleActionIT.java | 8 ++-- ...DateMathIndexExpressionsIntegrationIT.java | 4 +- .../indices/IndicesCustomDataPathIT.java | 4 +- .../indices/IndicesLifecycleListenerIT.java | 8 ++-- ...dicesLifecycleListenerSingleNodeTests.java | 4 +- .../indices/IndicesOptionsIntegrationIT.java | 5 +-- .../indices/IndicesServiceTest.java | 4 +- .../PreBuiltAnalyzerIntegrationIT.java | 10 ++--- .../indices/analyze/AnalyzeActionIT.java | 4 +- .../indices/analyze/HunspellServiceIT.java | 8 ++-- .../cache/query/IndicesRequestCacheIT.java | 4 +- .../exists/indices/IndicesExistsIT.java | 4 +- .../indices/exists/types/TypesExistsIT.java | 5 +-- .../elasticsearch/indices/flush/FlushIT.java | 4 +- .../flush/SyncedFlushSingleNodeTest.java | 5 +-- .../indices/flush/SyncedFlushUnitTests.java | 4 +- .../indices/leaks/IndicesLeaksIT.java | 8 ++-- .../mapping/ConcurrentDynamicTemplateIT.java | 9 ++--- .../DedicatedMasterGetFieldMappingIT.java | 4 +- .../mapping/SimpleGetFieldMappingsIT.java | 4 +- .../indices/mapping/SimpleGetMappingsIT.java | 6 +-- .../mapping/UpdateMappingIntegrationIT.java | 6 +-- .../memory/IndexingMemoryControllerIT.java | 6 +-- .../memory/breaker/CircuitBreakerNoopIT.java | 6 +-- .../breaker/CircuitBreakerServiceIT.java | 12 ++---- .../breaker/CircuitBreakerUnitTests.java | 4 +- .../RandomExceptionCircuitBreakerIT.java | 4 +- .../indices/recovery/IndexRecoveryIT.java | 8 ++-- .../indices/recovery/RecoveryStateTest.java | 4 +- .../indices/recovery/RecoveryStatusTests.java | 4 +- .../recovery/StartRecoveryRequestTest.java | 9 +---- .../indices/settings/GetSettingsBlocksIT.java | 4 +- .../settings/UpdateNumberOfReplicasIT.java | 6 +-- .../indices/settings/UpdateSettingsIT.java | 6 +-- .../state/CloseIndexDisableCloseAllIT.java | 8 ++-- .../indices/state/OpenCloseIndexIT.java | 5 +-- .../indices/state/RareClusterStateIT.java | 6 +-- .../indices/state/SimpleIndexStateIT.java | 6 +-- .../indices/stats/IndexStatsIT.java | 10 ++--- .../store/IndicesStoreIntegrationIT.java | 8 ++-- .../indices/store/IndicesStoreTests.java | 4 +- .../template/IndexTemplateBlocksIT.java | 8 ++-- .../template/IndexTemplateFilteringIT.java | 8 ++-- .../template/SimpleIndexTemplateIT.java | 4 +- .../warmer/GatewayIndicesWarmerIT.java | 8 ++-- .../indices/warmer/IndicesWarmerBlocksIT.java | 8 ++-- .../indices/warmer/SimpleIndicesWarmerIT.java | 4 +- .../org/elasticsearch/mget/SimpleMgetIT.java | 4 +- .../monitor/fs/FsProbeTests.java | 4 +- .../monitor/os/OsProbeTests.java | 5 +-- .../monitor/process/ProcessProbeTests.java | 4 +- .../elasticsearch/nested/SimpleNestedIT.java | 9 +---- .../network/DirectBufferNetworkIT.java | 4 +- .../InternalSettingsPreparerTests.java | 4 +- .../nodesinfo/SimpleNodesInfoTests.java | 13 +----- .../DestructiveOperationsIntegrationIT.java | 6 +-- .../DetailedErrorsDisabledIT.java | 8 ++-- .../DetailedErrorsEnabledIT.java | 8 ++-- .../percolator/ConcurrentPercolatorIT.java | 4 +- .../percolator/MultiPercolatorIT.java | 4 +- .../PercolatorBackwardsCompatibilityIT.java | 4 +- .../PercolatorFacetsAndAggregationsIT.java | 4 +- .../percolator/PercolatorIT.java | 4 +- .../percolator/RecoveryPercolatorIT.java | 8 ++-- .../percolator/TTLPercolatorIT.java | 8 ++-- .../plugins/PluggableTransportModuleIT.java | 8 ++-- .../plugins/PluginInfoTests.java | 6 +-- .../plugins/PluginManagerIT.java | 8 ++-- .../plugins/PluginManagerUnitTests.java | 4 +- .../elasticsearch/plugins/PluginTestCase.java | 6 +-- .../plugins/ResponseHeaderPluginIT.java | 8 ++-- .../elasticsearch/plugins/SitePluginIT.java | 8 ++-- .../SitePluginRelativePathConfigIT.java | 8 ++-- .../recovery/FullRollingRestartIT.java | 8 ++-- .../recovery/RecoveriesCollectionTests.java | 4 +- .../recovery/RecoverySettingsTest.java | 4 +- .../recovery/RecoveryWhileUnderLoadIT.java | 4 +- .../elasticsearch/recovery/RelocationIT.java | 8 ++-- .../recovery/SimpleRecoveryIT.java | 4 +- .../recovery/TruncatedRecoveryIT.java | 6 +-- .../rest/BytesRestResponseTests.java | 4 +- .../rest/CorsRegexDefaultIT.java | 4 +- .../org/elasticsearch/rest/CorsRegexIT.java | 8 ++-- .../HeadersAndContextCopyClientTests.java | 4 +- .../rest/RestFilterChainTests.java | 4 +- .../elasticsearch/rest/RestRequestTests.java | 4 +- .../admin/indices/upgrade/UpgradeIT.java | 8 ++-- .../rest/action/support/RestTableTest.java | 4 +- .../rest/util/RestUtilsTests.java | 4 +- .../routing/AliasResolveRoutingIT.java | 4 +- .../elasticsearch/routing/AliasRoutingIT.java | 4 +- .../routing/SimpleRoutingIT.java | 5 +-- .../script/CustomScriptContextIT.java | 4 +- .../elasticsearch/script/GroovyScriptIT.java | 4 +- .../script/GroovySecurityIT.java | 6 +-- .../elasticsearch/script/IndexLookupIT.java | 4 +- .../elasticsearch/script/IndexedScriptIT.java | 4 +- .../script/NativeScriptTests.java | 4 +- .../elasticsearch/script/OnDiskScriptIT.java | 6 +-- .../script/ScriptContextRegistryTests.java | 4 +- .../elasticsearch/script/ScriptFieldIT.java | 9 ++--- .../script/ScriptIndexSettingsIT.java | 6 +-- .../script/ScriptModesTests.java | 4 +- .../script/ScriptParameterParserTest.java | 4 +- .../script/ScriptServiceTests.java | 4 +- .../script/expression/ExpressionScriptIT.java | 4 +- .../mustache/MustacheScriptEngineTest.java | 4 +- .../script/mustache/MustacheTest.java | 4 +- .../elasticsearch/search/CountSearchIT.java | 4 +- .../search/MultiValueModeTests.java | 4 +- .../search/SearchServiceTests.java | 4 +- .../search/SearchWithRejectionsIT.java | 8 ++-- .../search/StressSearchServiceReaperIT.java | 8 ++-- .../AggregationCollectorTests.java | 4 +- .../aggregations/AggregationsBinaryIT.java | 6 +-- .../AggregationsIntegrationIT.java | 6 +-- .../search/aggregations/CombiIT.java | 4 +- .../search/aggregations/EquivalenceIT.java | 4 +- .../search/aggregations/MetaDataIT.java | 4 +- .../search/aggregations/MissingValueIT.java | 6 +-- .../search/aggregations/ParsingIT.java | 4 +- .../bucket/AbstractTermsTests.java | 6 +-- .../aggregations/bucket/BooleanTermsIT.java | 6 +-- .../aggregations/bucket/ChildrenIT.java | 6 +-- .../aggregations/bucket/DateHistogramIT.java | 6 +-- .../bucket/DateHistogramOffsetIT.java | 8 ++-- .../aggregations/bucket/DateRangeIT.java | 6 +-- .../bucket/DedicatedAggregationIT.java | 4 +- .../aggregations/bucket/DoubleTermsTests.java | 4 +- .../search/aggregations/bucket/FilterIT.java | 6 +-- .../search/aggregations/bucket/FiltersIT.java | 6 +-- .../aggregations/bucket/GeoDistanceIT.java | 6 +-- .../aggregations/bucket/GeoHashGridIT.java | 6 +-- .../search/aggregations/bucket/GlobalIT.java | 6 +-- .../aggregations/bucket/HistogramIT.java | 6 +-- .../aggregations/bucket/IPv4RangeIT.java | 6 +-- .../aggregations/bucket/LongTermsTests.java | 4 +- .../aggregations/bucket/MinDocCountTests.java | 4 +- .../search/aggregations/bucket/MissingIT.java | 6 +-- .../aggregations/bucket/NaNSortingIT.java | 6 +-- .../search/aggregations/bucket/NestedIT.java | 6 +-- .../aggregations/bucket/ParentIdAggIT.java | 4 +- .../search/aggregations/bucket/RangeIT.java | 6 +-- .../aggregations/bucket/ReverseNestedIT.java | 6 +-- .../search/aggregations/bucket/SamplerIT.java | 6 +-- .../aggregations/bucket/ShardReduceIT.java | 6 +-- .../bucket/ShardSizeTermsTests.java | 2 +- ...dSizeTests.java => ShardSizeTestCase.java} | 10 ++--- ...gnificantTermsBackwardCompatibilityIT.java | 4 +- .../bucket/SignificantTermsIT.java | 6 +-- .../SignificantTermsSignificanceScoreIT.java | 6 +-- .../aggregations/bucket/StringTermsTests.java | 4 +- .../bucket/TermsDocCountErrorIT.java | 6 +-- .../bucket/TermsShardMinDocCountIT.java | 4 +- .../search/aggregations/bucket/TopHitsIT.java | 6 +-- .../bucket/nested/NestedAggregatorTest.java | 4 +- .../SignificanceHeuristicTests.java | 4 +- .../metrics/AbstractNumericTests.java | 6 +-- .../aggregations/metrics/CardinalityIT.java | 6 +-- .../aggregations/metrics/GeoBoundsIT.java | 6 +-- .../metrics/ScriptedMetricIT.java | 10 ++--- .../aggregations/metrics/ValueCountIT.java | 6 +-- .../cardinality/HyperLogLogPlusPlusTests.java | 4 +- .../aggregations/pipeline/AvgBucketIT.java | 7 ++-- .../aggregations/pipeline/BucketScriptIT.java | 6 +-- .../pipeline/BucketSelectorIT.java | 6 +-- .../pipeline/CumulativeSumIT.java | 6 +-- .../pipeline/DateDerivativeIT.java | 7 ++-- .../aggregations/pipeline/DerivativeIT.java | 6 +-- .../aggregations/pipeline/MaxBucketIT.java | 6 +-- .../aggregations/pipeline/MinBucketIT.java | 6 +-- .../PipelineAggregationHelperTests.java | 4 +- .../aggregations/pipeline/SumBucketIT.java | 7 ++-- .../pipeline/moving/avg/MovAvgIT.java | 6 +-- .../pipeline/moving/avg/MovAvgUnitTests.java | 4 +- .../pipeline/serialdiff/SerialDiffIT.java | 6 +-- .../support/MissingValuesTests.java | 4 +- .../aggregations/support/PathTests.java | 4 +- .../support/ScriptValuesTests.java | 4 +- .../basic/SearchWhileCreatingIndexIT.java | 4 +- .../search/basic/SearchWhileRelocatingIT.java | 6 +-- .../basic/SearchWithRandomExceptionsIT.java | 4 +- .../basic/TransportSearchFailuresIT.java | 4 +- .../basic/TransportTwoNodesSearchIT.java | 4 +- .../builder/SearchSourceBuilderTest.java | 4 +- .../search/child/ChildQuerySearchBwcIT.java | 4 +- .../search/child/ChildQuerySearchIT.java | 8 ++-- .../search/child/ParentFieldLoadingBwcIT.java | 4 +- .../search/child/ParentFieldLoadingIT.java | 5 +-- .../compress/SearchSourceCompressTests.java | 4 +- .../search/fetch/FetchSubPhasePluginIT.java | 8 ++-- .../innerhits/NestedChildrenFilterTest.java | 4 +- .../search/fields/SearchFieldsIT.java | 4 +- .../functionscore/DecayFunctionScoreIT.java | 4 +- .../functionscore/ExplainableScriptIT.java | 8 ++-- .../FunctionScoreBackwardCompatibilityIT.java | 5 +-- .../FunctionScoreFieldValueIT.java | 4 +- .../search/functionscore/FunctionScoreIT.java | 4 +- .../functionscore/FunctionScorePluginIT.java | 8 ++-- .../functionscore/RandomScoreFunctionIT.java | 5 +-- .../search/geo/GeoBoundingBoxIT.java | 4 +- .../search/geo/GeoDistanceIT.java | 4 +- .../elasticsearch/search/geo/GeoFilterIT.java | 6 +-- .../search/geo/GeoPolygonIT.java | 6 +-- .../search/geo/GeoShapeIntegrationIT.java | 5 +-- .../highlight/CustomHighlighterSearchIT.java | 8 ++-- .../search/highlight/HighlighterSearchIT.java | 4 +- .../SimpleIndicesBoostSearchIT.java | 4 +- .../search/innerhits/InnerHitsIT.java | 4 +- .../matchedqueries/MatchedQueriesIT.java | 4 +- .../morelikethis/ItemSerializationTests.java | 4 +- .../search/morelikethis/MoreLikeThisIT.java | 4 +- .../search/msearch/SimpleMultiSearchIT.java | 4 +- .../search/preference/SearchPreferenceIT.java | 6 +-- .../search/query/ExistsMissingIT.java | 4 +- .../search/query/MultiMatchQueryIT.java | 4 +- .../search/query/SearchQueryIT.java | 4 +- .../search/query/SimpleQueryStringIT.java | 4 +- .../search/rescore/QueryRescorerIT.java | 4 +- .../search/scan/ScanContextTests.java | 4 +- .../search/scan/SearchScanIT.java | 4 +- .../search/scan/SearchScanScrollingIT.java | 4 +- .../scriptfilter/ScriptQuerySearchIT.java | 7 ++-- .../search/scroll/DuelScrollIT.java | 4 +- .../search/scroll/SearchScrollIT.java | 4 +- .../SearchScrollWithFailingNodesIT.java | 6 +-- .../search/simple/SimpleSearchIT.java | 4 +- .../search/sort/SimpleSortIT.java | 4 +- .../search/sort/SortParserTests.java | 4 +- .../search/source/SourceFetchingIT.java | 4 +- .../search/stats/SearchStatsIT.java | 6 +-- .../search/stats/SearchStatsUnitTests.java | 4 +- .../suggest/CompletionSuggestSearchIT.java | 4 +- .../suggest/CompletionTokenStreamTest.java | 4 +- .../suggest/ContextSuggestSearchIT.java | 4 +- .../suggest/CustomSuggesterSearchIT.java | 8 ++-- .../search/suggest/SuggestSearchIT.java | 4 +- .../CompletionPostingsFormatTest.java | 4 +- .../GeoLocationContextMappingTest.java | 4 +- .../phrase/NoisyChannelSpellCheckerTests.java | 5 +-- .../search/timeout/SearchTimeoutIT.java | 6 +-- .../similarity/SimilarityIT.java | 4 +- ...ava => AbstractSnapshotIntegTestCase.java} | 17 ++++---- .../snapshots/BlobStoreFormatTests.java | 2 +- .../DedicatedClusterSnapshotRestoreIT.java | 9 ++--- .../snapshots/RepositoriesTests.java | 6 +-- .../SharedClusterSnapshotRestoreIT.java | 2 +- .../SnapshotBackwardsCompatibilityIT.java | 5 +-- .../snapshots/SnapshotUtilsTests.java | 4 +- ...ncurrentSearchSerializationBenchmark.java} | 3 +- ...sTest.java => Search1StressBenchmark.java} | 34 +++++++--------- ...estCase.java => ESAllocationTestCase.java} | 2 +- ...ionTest.java => ESBackcompatTestCase.java} | 12 +++--- ...egrationTest.java => ESIntegTestCase.java} | 40 +++++++++---------- ...odeTest.java => ESSingleNodeTestCase.java} | 3 +- ...ticsearchTestCase.java => ESTestCase.java} | 6 +-- ...stCase.java => ESTokenStreamTestCase.java} | 2 +- .../org/elasticsearch/test/ExternalNode.java | 2 +- .../test/InternalTestCluster.java | 7 ++-- .../org/elasticsearch/test/TestCluster.java | 2 +- .../test/cache/recycler/MockBigArrays.java | 4 +- .../cache/recycler/MockPageCacheRecycler.java | 4 +- .../test/disruption/NetworkPartitionIT.java | 4 +- .../test/engine/MockEngineSupport.java | 4 +- .../hamcrest/ElasticsearchAssertions.java | 2 +- .../junit/listeners/ReproduceInfoPrinter.java | 14 +++---- ...hRestTestCase.java => ESRestTestCase.java} | 12 +++--- .../org/elasticsearch/test/rest/Rest0IT.java | 2 +- .../org/elasticsearch/test/rest/Rest1IT.java | 2 +- .../org/elasticsearch/test/rest/Rest2IT.java | 2 +- .../org/elasticsearch/test/rest/Rest3IT.java | 2 +- .../org/elasticsearch/test/rest/Rest4IT.java | 2 +- .../org/elasticsearch/test/rest/Rest5IT.java | 2 +- .../org/elasticsearch/test/rest/Rest6IT.java | 2 +- .../org/elasticsearch/test/rest/Rest7IT.java | 2 +- .../test/rest/support/Features.java | 4 +- ...Tests.java => AbstractParserTestCase.java} | 5 +-- .../test/rest/test/AssertionParsersTests.java | 2 +- .../test/rest/test/DoSectionParserTests.java | 2 +- .../test/rest/test/FileUtilsTests.java | 4 +- .../test/rest/test/JsonPathTests.java | 4 +- .../rest/test/RestApiParserFailingTests.java | 4 +- .../test/rest/test/RestApiParserTests.java | 2 +- .../test/rest/test/RestTestParserTests.java | 5 +-- .../test/rest/test/SetSectionParserTests.java | 2 +- .../rest/test/SetupSectionParserTests.java | 2 +- .../rest/test/SkipSectionParserTests.java | 2 +- .../rest/test/TestSectionParserTests.java | 2 +- .../test/store/MockFSDirectoryService.java | 10 ++--- .../test/test/InternalTestClusterTests.java | 4 +- .../test/test/LoggingListenerTests.java | 4 +- .../test/test/SuiteScopeClusterIT.java | 6 +-- .../test/test/TestScopeClusterIT.java | 6 +-- .../test/test/VersionUtilsTests.java | 4 +- .../transport/AssertingLocalTransport.java | 4 +- .../threadpool/SimpleThreadPoolIT.java | 18 ++++----- .../ThreadPoolSerializationTests.java | 4 +- .../UpdateThreadPoolSettingsTests.java | 4 +- .../timestamp/SimpleTimestampIT.java | 4 +- .../AbstractSimpleTransportTests.java | 4 +- .../transport/ActionNamesIT.java | 4 +- .../ContextAndHeaderTransportIT.java | 8 ++-- .../NettySizeHeaderFrameDecoderTests.java | 4 +- .../transport/TransportMessageTests.java | 4 +- .../transport/netty/KeyedLockTests.java | 4 +- .../netty/NettyScheduledPingTests.java | 4 +- .../transport/netty/NettyTransportIT.java | 8 ++-- .../NettyTransportMultiPortIntegrationIT.java | 8 ++-- .../netty/NettyTransportMultiPortTests.java | 4 +- .../java/org/elasticsearch/tribe/TribeIT.java | 6 +-- .../elasticsearch/tribe/TribeUnitTests.java | 7 ++-- .../org/elasticsearch/ttl/SimpleTTLIT.java | 8 ++-- .../update/UpdateByNativeScriptIT.java | 8 ++-- .../org/elasticsearch/update/UpdateIT.java | 4 +- .../elasticsearch/update/UpdateNoopIT.java | 4 +- .../validate/RenderSearchTemplateIT.java | 6 +-- .../validate/SimpleValidateQueryIT.java | 8 ++-- .../ConcurrentDocumentOperationIT.java | 4 +- .../versioning/SimpleVersioningIT.java | 4 +- .../watcher/FileWatcherTest.java | 4 +- .../watcher/ResourceWatcherServiceTests.java | 4 +- .../resources/forbidden/test-signatures.txt | 1 + .../org/elasticsearch/test/rest/RestIT.java | 2 +- .../org/elasticsearch/test/rest/RestIT.java | 2 +- .../org/elasticsearch/test/rest/RestIT.java | 2 +- .../index/analysis/AnalysisICURestIT.java | 6 +-- .../analysis/SimpleIcuAnalysisTests.java | 4 +- .../SimpleIcuCollationTokenFilterTests.java | 4 +- .../SimpleIcuNormalizerCharFilterTests.java | 4 +- .../analysis/AnalysisKuromojiRestIT.java | 6 +-- .../index/analysis/KuromojiAnalysisTests.java | 4 +- .../analysis/AnalysisPhoneticRestIT.java | 6 +-- .../analysis/SimplePhoneticAnalysisTests.java | 4 +- .../analysis/AnalysisSmartChineseRestIT.java | 6 +-- .../SimpleSmartChineseAnalysisTests.java | 4 +- .../index/analysis/AnalysisPolishRestIT.java | 6 +-- .../index/analysis/PolishAnalysisTests.java | 4 +- .../SimplePolishTokenFilterTests.java | 4 +- .../cloud/aws/AWSSignersTest.java | 4 +- .../cloud/aws/AbstractAwsTest.java | 13 ++---- .../cloud/aws/CloudAWSRestIT.java | 6 +-- .../aws/blobstore/S3OutputStreamTest.java | 4 +- .../discovery/ec2/Ec2DiscoveryITest.java | 5 +-- .../ec2/Ec2DiscoveryUpdateSettingsITest.java | 5 +-- .../s3/AbstractS3SnapshotRestoreTest.java | 5 +-- ...Case.java => ESBaseDirectoryTestCase.java} | 2 +- .../lucene/store/SmbMMapDirectoryTest.java | 2 +- .../store/SmbSimpleFSDirectoryTest.java | 2 +- .../azure/itest/AzureSimpleITest.java | 6 +-- .../cloud/azure/AbstractAzureTest.java | 6 +-- .../cloud/azure/CloudAzureRestIT.java | 6 +-- .../AbstractAzureComputeServiceTest.java | 4 +- .../azure/AzureMinimumMasterNodesTest.java | 4 +- .../discovery/azure/AzureSimpleTest.java | 4 +- .../azure/AzureTwoStartedNodesTest.java | 4 +- .../index/store/AbstractAzureFsTest.java | 4 +- .../azure/AzureSnapshotRestoreITest.java | 6 +-- .../azure/AzureSnapshotRestoreTest.java | 6 +-- .../cloud/gce/AbstractGceTest.java | 7 ++-- .../cloud/gce/CloudGCERestIT.java | 6 +-- .../discovery/gce/GceComputeEngineTest.java | 33 +++++++-------- .../gce/itest/GceSimpleITest.java | 7 ++-- .../IndexDeleteByQueryResponseTests.java | 4 +- .../TransportDeleteByQueryActionTests.java | 4 +- .../deletebyquery/DeleteByQueryTests.java | 8 ++-- .../test/rest/DeleteByQueryRestIT.java | 6 +-- .../JavaScriptScriptEngineTests.java | 4 +- .../JavaScriptScriptMultiThreadedTest.java | 4 +- .../javascript/LangJavaScriptRestIT.java | 6 +-- .../script/python/LangPythonScriptRestIT.java | 6 +-- .../python/PythonScriptEngineTests.java | 4 +- .../python/PythonScriptMultiThreadedTest.java | 4 +- .../org/elasticsearch/example/SiteRestIT.java | 6 +-- 828 files changed, 2013 insertions(+), 2173 deletions(-) rename core/src/test/java/org/elasticsearch/{ElasticsearchExceptionTests.java => ESExceptionTests.java} (99%) rename core/src/test/java/org/elasticsearch/cluster/routing/allocation/{CatAllocationTestBase.java => CatAllocationTestCase.java} (97%) rename core/src/test/java/org/elasticsearch/common/lucene/index/{ElasticsearchDirectoryReaderTests.java => ESDirectoryReaderTests.java} (95%) rename core/src/test/java/org/elasticsearch/index/codec/postingformat/{ElasticsearchPostingsFormatTest.java => PostingsFormatTest.java} (95%) rename core/src/test/java/org/elasticsearch/index/search/child/{AbstractChildTests.java => AbstractChildTestCase.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ShardSizeTests.java => ShardSizeTestCase.java} (93%) rename core/src/test/java/org/elasticsearch/snapshots/{AbstractSnapshotIT.java => AbstractSnapshotIntegTestCase.java} (96%) rename core/src/test/java/org/elasticsearch/stresstest/search1/{ConcurrentSearchSerializationTests.java => ConcurrentSearchSerializationBenchmark.java} (98%) rename core/src/test/java/org/elasticsearch/stresstest/search1/{Search1StressTest.java => Search1StressBenchmark.java} (91%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchAllocationTestCase.java => ESAllocationTestCase.java} (98%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchBackwardsCompatIntegrationTest.java => ESBackcompatTestCase.java} (95%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchIntegrationTest.java => ESIntegTestCase.java} (98%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchSingleNodeTest.java => ESSingleNodeTestCase.java} (99%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchTestCase.java => ESTestCase.java} (99%) rename core/src/test/java/org/elasticsearch/test/{ElasticsearchTokenStreamTestCase.java => ESTokenStreamTestCase.java} (96%) rename core/src/test/java/org/elasticsearch/test/rest/{ElasticsearchRestTestCase.java => ESRestTestCase.java} (97%) rename core/src/test/java/org/elasticsearch/test/rest/test/{AbstractParserTests.java => AbstractParserTestCase.java} (90%) rename plugins/cloud-azure/src/test/java/org/apache/lucene/store/{ElasticSearchBaseDirectoryTestCase.java => ESBaseDirectoryTestCase.java} (94%) 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..1187a1e2635 100644 --- a/core/src/test/java/org/elasticsearch/NamingConventionTests.java +++ b/core/src/test/java/org/elasticsearch/NamingConventionTests.java @@ -24,10 +24,10 @@ 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.ESTestCase; +import org.elasticsearch.test.ESTokenStreamTestCase; import org.junit.Ignore; import org.junit.Test; @@ -41,9 +41,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() @@ -107,7 +107,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,11 +140,11 @@ 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(), @@ -157,14 +157,16 @@ public class NamingConventionTests extends ElasticsearchTestCase { * 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/IndicesRequestIT.java b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java index fdb2f5478b5..1b956656093 100644 --- a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java +++ b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java @@ -91,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; @@ -122,7 +122,7 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.instanceOf; @ClusterScope(scope = Scope.SUITE, numClientNodes = 1, minNumDataNodes = 2) -public class IndicesRequestIT extends ElasticsearchIntegrationTest { +public class IndicesRequestIT extends ESIntegTestCase { private final List indices = new ArrayList<>(); diff --git a/core/src/test/java/org/elasticsearch/action/ListenerActionIT.java b/core/src/test/java/org/elasticsearch/action/ListenerActionIT.java index d371fd5b611..7d52c6c77ca 100644 --- a/core/src/test/java/org/elasticsearch/action/ListenerActionIT.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 ListenerActionIT 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/RejectionActionIT.java b/core/src/test/java/org/elasticsearch/action/RejectionActionIT.java index 7ca17b1a398..ff094e09a4c 100644 --- a/core/src/test/java/org/elasticsearch/action/RejectionActionIT.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 RejectionActionIT 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/HotThreadsIT.java b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java index fb71a1c1708..8d88be38e8d 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java +++ b/core/src/test/java/org/elasticsearch/action/admin/HotThreadsIT.java @@ -23,7 +23,7 @@ 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; @@ -41,7 +41,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.Matchers.lessThan; -public class HotThreadsIT 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/RepositoryBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.java index 90189204f73..caa88ddfb78 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/repositories/RepositoryBlocksIT.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 RepositoryBlocksIT 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/SnapshotBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.java index b3566013f64..2516310c7a3 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/snapshots/SnapshotBlocksIT.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 SnapshotBlocksIT 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/ClusterStatsIT.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.java index 7a6c4294527..2be808ebef8 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsIT.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 ClusterStatsIT 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/PendingTasksBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java index 5a9ccd6a0b4..a02860e8a8f 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/tasks/PendingTasksBlocksIT.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 PendingTasksBlocksIT 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/ClearIndicesCacheBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.java index 8aa22ee915a..deb57cfa241 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheBlocksIT.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 ClearIndicesCacheBlocksIT 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/CreateIndexIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.java index c105450c1cc..ed2b503c37d 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/create/CreateIndexIT.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 CreateIndexIT 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/DeleteIndexBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.java index f5993c4b134..85e0072bfe3 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexBlocksIT.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 DeleteIndexBlocksIT 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/FlushBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.java index df2321af5dd..cf03bf798d5 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/flush/FlushBlocksIT.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 FlushBlocksIT 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/GetIndexIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.java index 2926ed80b80..ce214dd5a9d 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/get/GetIndexIT.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 GetIndexIT 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/OptimizeBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksIT.java index d4122e3ebf4..06c19564c3e 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/optimize/OptimizeBlocksIT.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 OptimizeBlocksIT 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/RefreshBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.java index 6143d933508..65c37c686b7 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/refresh/RefreshBlocksIT.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 RefreshBlocksIT 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/IndicesSegmentsBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.java index efe632d190c..fcb7a509d5c 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsBlocksIT.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 IndicesSegmentsBlocksIT 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/IndicesShardStoreRequestIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.java index 13c273b93b0..396e442b804 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestIT.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 IndicesShardStoreRequestIT 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/IndicesStatsBlocksIT.java b/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.java index fa8ff594dc1..125c4e46021 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsBlocksIT.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 IndicesStatsBlocksIT 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/BulkIntegrationIT.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.java index cd52f6a3a77..fe5c0821330 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkIntegrationIT.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 BulkIntegrationIT extends ElasticsearchIntegrationTest { +public class BulkIntegrationIT extends ESIntegTestCase { @Test public void testBulkIndexCreatesMapping() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.java index be6fcca12d0..b26a10f100e 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorClusterSettingsIT.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 BulkProcessorClusterSettingsIT extends ElasticsearchIntegrationTest { +public class BulkProcessorClusterSettingsIT extends ESIntegTestCase { @Test public void testBulkProcessorAutoCreateRestrictions() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java index 0e50dfdcc47..dd39f85338b 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.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 BulkProcessorIT 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/AbstractTermVectorsTests.java index 06b21bbaabc..23dd7562d14 100644 --- a/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.java +++ b/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.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 AbstractTermVectorsTests extends ESIntegTestCase { protected static class TestFieldSetting { final public String name; diff --git a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.java index 0dca5ab5e01..0e1c978dda8 100644 --- a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsCheckDocFreqIT.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 GetTermVectorsCheckDocFreqIT extends ElasticsearchIntegrationTest { +public class GetTermVectorsCheckDocFreqIT extends ESIntegTestCase { @Override protected int numberOfShards() { 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/IndexAliasesIT.java b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java index 071355ee89a..8f8759e45d2 100644 --- a/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java +++ b/core/src/test/java/org/elasticsearch/aliases/IndexAliasesIT.java @@ -45,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; @@ -81,7 +81,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class IndexAliasesIT 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/SimpleBlocksIT.java b/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.java index f9ad7749d68..d256c6a2c98 100644 --- a/core/src/test/java/org/elasticsearch/blocks/SimpleBlocksIT.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 SimpleBlocksIT 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 38780ec0cac..664b677fe7f 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -23,7 +23,7 @@ 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; @@ -33,7 +33,7 @@ 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 { diff --git a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java b/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.java index f961acc2b83..4196a8dde8f 100644 --- a/core/src/test/java/org/elasticsearch/broadcast/BroadcastActionsIT.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 BroadcastActionsIT extends ElasticsearchIntegrationTest { +public class BroadcastActionsIT extends ESIntegTestCase { @Override protected int maximumNumberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.java index 359b6228f34..aec57c57816 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/BasicAnalysisBackwardCompatibilityIT.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 BasicAnalysisBackwardCompatibilityIT 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/BasicBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.java index 19593b07717..8faccc5c885 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/BasicBackwardsCompatibilityIT.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 BasicBackwardsCompatibilityIT 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/ClusterStateBackwardsCompatIT.java b/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.java index 9964c64e0bb..1fe1dbb0637 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/ClusterStateBackwardsCompatIT.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 ClusterStateBackwardsCompatIT extends ElasticsearchBackwardsCompatIntegrationTest { +public class ClusterStateBackwardsCompatIT extends ESBackcompatTestCase { @Test public void testClusterState() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.java index b8cc47242ca..d26d0491095 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/GetIndexBackwardsCompatibilityIT.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 GetIndexBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { +public class GetIndexBackwardsCompatibilityIT extends ESBackcompatTestCase { @Test public void testGetAliases() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java b/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.java index 14eccf20f2e..8cb9fc7566b 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/NodesStatsBasicBackwardsCompatIT.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 NodesStatsBasicBackwardsCompatIT 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/OldIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index e2e948eece6..c2ba057f9e9 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java @@ -48,7 +48,7 @@ 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; @@ -78,9 +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") -public class OldIndexBackwardsCompatibilityIT 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. diff --git a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java index 68d6faeaeac..2130ea57267 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/RestoreBackwardsCompatIT.java @@ -28,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.AbstractSnapshotIT; +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; @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.notNullValue; @ClusterScope(scope = Scope.TEST) -public class RestoreBackwardsCompatIT extends AbstractSnapshotIT { +public class RestoreBackwardsCompatIT extends AbstractSnapshotIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.java index 4f90be1d4d4..37961c3d353 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/StaticIndexBackwardCompatibilityIT.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 StaticIndexBackwardCompatibilityIT 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/TransportClientBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.java index 26f8a126ad3..e071c17b948 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/TransportClientBackwardsCompatibilityIT.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 TransportClientBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { +public class TransportClientBackwardsCompatibilityIT extends ESBackcompatTestCase { @Test public void testSniffMode() throws ExecutionException, InterruptedException { diff --git a/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.java index fb4c5424a68..f90eae446d5 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/UnicastBackwardsCompatibilityIT.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 UnicastBackwardsCompatibilityIT 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/NodeClientIT.java b/core/src/test/java/org/elasticsearch/client/node/NodeClientIT.java index 7d8f15ffd8d..499998096b1 100644 --- a/core/src/test/java/org/elasticsearch/client/node/NodeClientIT.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 NodeClientIT extends ElasticsearchIntegrationTest { +public class NodeClientIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.java index 0c0d1c2a973..144d79db35b 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientIT.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 TransportClientIT 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/TransportClientRetryIT.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.java index 8e7a378a809..307cc0dbe16 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientRetryIT.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 TransportClientRetryIT 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/ClusterHealthIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.java index 6c1e4d20265..f34f693af95 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterHealthIT.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 ClusterHealthIT 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/ClusterInfoServiceIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.java index 96caf287487..70e425e10e2 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceIT.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,8 +61,8 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; /** * Integration tests for the ClusterInfoService collecting information */ -@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, numDataNodes = 0) -public class ClusterInfoServiceIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +public class ClusterInfoServiceIT extends ESIntegTestCase { public static class Plugin extends AbstractPlugin { diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.java index 5cf95f5da5a..a174215a174 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterServiceIT.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 ClusterServiceIT extends ElasticsearchIntegrationTest { +public class ClusterServiceIT extends ESIntegTestCase { @Test public void testTimeoutUpdateTask() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java index f8dd1320f0e..a33730b8342 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.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 ClusterStateDiffIT 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 275f3bd96e0..3006e3f5228 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java +++ b/core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffPublishingTests.java @@ -37,7 +37,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; @@ -59,7 +59,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/MinimumMasterNodesIT.java b/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.java index 7dda2aad4d3..6939df28dcd 100644 --- a/core/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesIT.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 MinimumMasterNodesIT extends ElasticsearchIntegrationTest { +public class MinimumMasterNodesIT extends ESIntegTestCase { @Test @TestLogging("cluster.service:TRACE,discovery.zen:TRACE,gateway:TRACE,transport.tracer:TRACE") diff --git a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java b/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java index 514015df546..de0952e5c63 100644 --- a/core/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.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 NoMasterNodeIT extends ElasticsearchIntegrationTest { +public class NoMasterNodeIT extends ESIntegTestCase { @Test public void testNoMasterActions() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java b/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.java index 250aca5b5ef..4088b693468 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SimpleClusterStateIT.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 SimpleClusterStateIT extends ElasticsearchIntegrationTest { +public class SimpleClusterStateIT extends ESIntegTestCase { @Before public void indexData() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java b/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.java index 9f2dea3229a..2979b1eac85 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SimpleDataNodesIT.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 SimpleDataNodesIT extends ElasticsearchIntegrationTest { +public class SimpleDataNodesIT extends ESIntegTestCase { @Test public void testDataNodes() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java index 3f3b5f3e92c..2876f7911e2 100644 --- a/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/SpecificMasterNodesIT.java @@ -23,18 +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) -public class SpecificMasterNodesIT 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/UpdateSettingsValidationIT.java b/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.java index 69cda15e00e..c91915bd9cf 100644 --- a/core/src/test/java/org/elasticsearch/cluster/UpdateSettingsValidationIT.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 UpdateSettingsValidationIT extends ElasticsearchIntegrationTest { +public class UpdateSettingsValidationIT extends ESIntegTestCase { @Test public void testUpdateSettingsValidation() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java b/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.java index 608461b2eb6..9e3a1127e05 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ack/AckClusterUpdateSettingsIT.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 AckClusterUpdateSettingsIT extends ElasticsearchIntegrationTest { +public class AckClusterUpdateSettingsIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java b/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.java index f1eb4850f02..de05f40aa59 100644 --- a/core/src/test/java/org/elasticsearch/cluster/ack/AckIT.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 AckIT extends ElasticsearchIntegrationTest { +public class AckIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.java index 205abf29804..f15232db192 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/AwarenessAllocationIT.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,8 +44,8 @@ import static org.hamcrest.Matchers.equalTo; /** */ -@ClusterScope(scope= ElasticsearchIntegrationTest.Scope.TEST, numDataNodes =0, minNumDataNodes = 2) -public class AwarenessAllocationIT extends ElasticsearchIntegrationTest { +@ClusterScope(scope= ESIntegTestCase.Scope.TEST, numDataNodes =0, minNumDataNodes = 2) +public class AwarenessAllocationIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(AwarenessAllocationIT.class); diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.java index 00a5dc3800b..c9643d8601b 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/ClusterRerouteIT.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,7 +61,7 @@ import static org.hamcrest.Matchers.hasSize; /** */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ClusterRerouteIT extends ElasticsearchIntegrationTest { +public class ClusterRerouteIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(ClusterRerouteIT.class); diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java index ab242d487a4..80eaf296558 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/allocation/FilteringAllocationIT.java @@ -27,18 +27,18 @@ 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 FilteringAllocationIT extends ElasticsearchIntegrationTest { +public class FilteringAllocationIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(FilteringAllocationIT.class); diff --git a/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.java index a539c598735..edb6235b815 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/ShardsAllocatorModuleIT.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 ShardsAllocatorModuleIT 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/SimpleAllocationIT.java b/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.java index 7c06a3ad8d4..5b07daa6ba8 100644 --- a/core/src/test/java/org/elasticsearch/cluster/allocation/SimpleAllocationIT.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 SimpleAllocationIT 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/DelayedAllocationIT.java b/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.java index c162142c2ab..26ba7e12679 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/DelayedAllocationIT.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 DelayedAllocationIT 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/RoutingBackwardCompatibilityUponUpgradeIT.java b/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.java index 3545f3d2364..bff1977545a 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/RoutingBackwardCompatibilityUponUpgradeIT.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 RoutingBackwardCompatibilityUponUpgradeIT 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 a7d6bc33354..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 @@ -40,7 +40,7 @@ import static org.elasticsearch.common.settings.Settings.settingsBuilder; /** * see issue #9023 */ -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/EnableAllocationDeciderIT.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIT.java index 5d2f3bcd087..940634a4657 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/EnableAllocationDeciderIT.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 EnableAllocationDeciderIT 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/MockDiskUsagesIT.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.java index 20b1577ace9..863031a3499 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/decider/MockDiskUsagesIT.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 MockDiskUsagesIT 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/ClusterSettingsIT.java b/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.java index 926a4e12a91..6112fe04025 100644 --- a/core/src/test/java/org/elasticsearch/cluster/settings/ClusterSettingsIT.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 ClusterSettingsIT extends ElasticsearchIntegrationTest { +public class ClusterSettingsIT extends ESIntegTestCase { @Test public void clusterNonExistingSettingsUpdate() { diff --git a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java b/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.java index 8bce603658d..8b3b871113e 100644 --- a/core/src/test/java/org/elasticsearch/cluster/settings/SettingsFilteringIT.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 SettingsFilteringIT 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/ClusterSearchShardsIT.java b/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.java index 94635db1ab7..422846fc48a 100644 --- a/core/src/test/java/org/elasticsearch/cluster/shards/ClusterSearchShardsIT.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 ClusterSearchShardsIT 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 94cbf351fcf..697365151f7 100644 --- a/core/src/test/java/org/elasticsearch/codecs/CodecTests.java +++ b/core/src/test/java/org/elasticsearch/codecs/CodecTests.java @@ -27,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; @@ -35,7 +35,7 @@ import java.io.IOException; import static org.hamcrest.Matchers.containsString; -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..62ea9b6070a 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; 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 74a97ecc5f9..bc25a9f5919 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 @@ -24,7 +24,7 @@ import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.lucene.BytesRefs; import org.elasticsearch.common.util.BigArrays; -import org.elasticsearch.test.ElasticsearchTestCase; +import org.elasticsearch.test.ESTestCase; import org.junit.Ignore; import org.junit.Test; @@ -34,7 +34,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 { @@ -306,7 +306,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 324d0f2fc37..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,7 +18,6 @@ */ 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; @@ -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()) { 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/WriteConsistencyLevelIT.java b/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.java index bbeef21e05d..50637cb801a 100644 --- a/core/src/test/java/org/elasticsearch/consistencylevel/WriteConsistencyLevelIT.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 WriteConsistencyLevelIT extends ElasticsearchIntegrationTest { +public class WriteConsistencyLevelIT extends ESIntegTestCase { @Test diff --git a/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java b/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.java index de2bb6f0e6c..344abee3da7 100644 --- a/core/src/test/java/org/elasticsearch/count/simple/SimpleCountIT.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 SimpleCountIT 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/DiscoveryWithServiceDisruptionsIT.java b/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java index 4386b20685b..2db457c4084 100644 --- a/core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.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,13 +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.*; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, transportClientRatio = 0) -public class DiscoveryWithServiceDisruptionsIT 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. @@ -972,7 +971,7 @@ public class DiscoveryWithServiceDisruptionsIT extends ElasticsearchIntegrationT } // 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 ae240b68477..1471b5b9b6f 100644 --- a/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java +++ b/core/src/test/java/org/elasticsearch/discovery/ZenFaultDetectionTests.java @@ -29,7 +29,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; @@ -46,7 +46,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/ZenUnicastDiscoveryIT.java b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java index 6a5ab527328..891d538a679 100644 --- a/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/ZenUnicastDiscoveryIT.java @@ -22,9 +22,9 @@ package org.elasticsearch.discovery; 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; @@ -35,7 +35,7 @@ import java.util.concurrent.ExecutionException; import static org.hamcrest.Matchers.equalTo; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class ZenUnicastDiscoveryIT 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/ZenDiscoveryIT.java b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java index d8e6ea415e8..943b0549a27 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/zen/ZenDiscoveryIT.java @@ -38,7 +38,7 @@ 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.BytesTransportRequest; @@ -65,8 +65,8 @@ 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) -public class ZenDiscoveryIT 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/MulticastZenPingIT.java b/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java index f3e3612ee5b..73ba27ddc42 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/zen/ping/multicast/MulticastZenPingIT.java @@ -31,7 +31,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; @@ -43,7 +43,7 @@ import java.net.MulticastSocket; import static org.hamcrest.Matchers.equalTo; -public class MulticastZenPingIT 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/UnicastZenPingIT.java b/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java index e0788e9506e..d3a0ac82d92 100644 --- a/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java +++ b/core/src/test/java/org/elasticsearch/discovery/zen/ping/unicast/UnicastZenPingIT.java @@ -32,7 +32,7 @@ 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; @@ -40,7 +40,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.equalTo; -public class UnicastZenPingIT extends ElasticsearchTestCase { +public class UnicastZenPingIT extends ESTestCase { @Test public void testSimplePings() throws InterruptedException { diff --git a/core/src/test/java/org/elasticsearch/document/BulkIT.java b/core/src/test/java/org/elasticsearch/document/BulkIT.java index 77cbf00565e..3c13b3fe31e 100644 --- a/core/src/test/java/org/elasticsearch/document/BulkIT.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 BulkIT extends ElasticsearchIntegrationTest { +public class BulkIT extends ESIntegTestCase { @Test public void testBulkUpdate_simple() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java b/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.java index 404f27224a4..dc64ffd2dea 100644 --- a/core/src/test/java/org/elasticsearch/document/DocumentActionsIT.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 DocumentActionsIT extends ElasticsearchIntegrationTest { +public class DocumentActionsIT extends ESIntegTestCase { protected void createIndex() { createIndex(getConcreteIndexName()); diff --git a/core/src/test/java/org/elasticsearch/document/ShardInfoIT.java b/core/src/test/java/org/elasticsearch/document/ShardInfoIT.java index 0cd41570ec9..f1c6d476eb5 100644 --- a/core/src/test/java/org/elasticsearch/document/ShardInfoIT.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 ShardInfoIT 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/SimpleExistsIT.java b/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.java index 4da69fa51be..3046a85be0e 100644 --- a/core/src/test/java/org/elasticsearch/exists/SimpleExistsIT.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 SimpleExistsIT extends ElasticsearchIntegrationTest { +public class SimpleExistsIT extends ESIntegTestCase { @Test diff --git a/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java b/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.java index 685c19c6884..be998b18a2b 100644 --- a/core/src/test/java/org/elasticsearch/explain/ExplainActionIT.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 ExplainActionIT extends ElasticsearchIntegrationTest { +public class ExplainActionIT extends ESIntegTestCase { @Test public void testSimple() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java b/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.java index b8823b0e00c..d3d1d8b46c1 100644 --- a/core/src/test/java/org/elasticsearch/fieldstats/FieldStatsIntegrationIT.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 FieldStatsIntegrationIT 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/GatewayIndexStateIT.java b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java index 13d42b0a91f..8c6e7a1dbf4 100644 --- a/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java @@ -32,21 +32,21 @@ 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) -public class GatewayIndexStateIT extends ElasticsearchIntegrationTest { +public class GatewayIndexStateIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(GatewayIndexStateIT.class); 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/MetaDataWriteDataNodesIT.java b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java index 54637f0f9ee..abe4ac3ff4a 100644 --- a/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/MetaDataWriteDataNodesIT.java @@ -28,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; @@ -37,13 +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; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class MetaDataWriteDataNodesIT 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/QuorumGatewayIT.java b/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.java index 042827b6328..fb7a255f876 100644 --- a/core/src/test/java/org/elasticsearch/gateway/QuorumGatewayIT.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 QuorumGatewayIT extends ElasticsearchIntegrationTest { +public class QuorumGatewayIT extends ESIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java index 0ce25091580..458bb69c2bd 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoverAfterNodesIT.java @@ -25,17 +25,17 @@ 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) -public class RecoverAfterNodesIT 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/RecoveryBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.java index 390829acad0..745c98f664e 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryBackwardsCompatibilityIT.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 RecoveryBackwardsCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { +@ESIntegTestCase.ClusterScope(numDataNodes = 0, scope = ESIntegTestCase.Scope.TEST, numClientNodes = 0, transportClientRatio = 0.0) +public class RecoveryBackwardsCompatibilityIT extends ESBackcompatTestCase { @Override diff --git a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java index 17947135918..aa229305a2f 100644 --- a/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java +++ b/core/src/test/java/org/elasticsearch/gateway/RecoveryFromGatewayIT.java @@ -33,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; @@ -46,7 +46,7 @@ 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.equalTo; @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; @ClusterScope(numDataNodes = 0, scope = Scope.TEST) -public class RecoveryFromGatewayIT extends ElasticsearchIntegrationTest { +public class RecoveryFromGatewayIT extends ESIntegTestCase { @Test public void testOneNodeRecoverFromGateway() throws Exception { 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/GetActionIT.java b/core/src/test/java/org/elasticsearch/get/GetActionIT.java index c76c77e2f17..15242ab6fb9 100644 --- a/core/src/test/java/org/elasticsearch/get/GetActionIT.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 GetActionIT extends ElasticsearchIntegrationTest { +public class GetActionIT extends ESIntegTestCase { @Test public void simpleGetTests() { diff --git a/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java b/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.java index 4df65284c60..687c01520d0 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/HttpPublishPortIT.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 HttpPublishPortIT 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/NettyPipeliningDisabledIT.java b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.java index 0c789b860a4..55879671993 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningDisabledIT.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 NettyPipeliningDisabledIT extends ElasticsearchIntegrationTest { +public class NettyPipeliningDisabledIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java b/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.java index 1901bdaec08..84a0f9b3642 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/NettyPipeliningEnabledIT.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 NettyPipeliningEnabledIT 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/IndexRequestBuilderIT.java b/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.java index 6ffb789c49a..5db3e546697 100644 --- a/core/src/test/java/org/elasticsearch/index/IndexRequestBuilderIT.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 IndexRequestBuilderIT extends ElasticsearchIntegrationTest { +public class IndexRequestBuilderIT extends ESIntegTestCase { @Test diff --git a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java b/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.java index d0a7e3f9f6b..5c6f7b376c7 100644 --- a/core/src/test/java/org/elasticsearch/index/IndexWithShadowReplicasIT.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 IndexWithShadowReplicasIT 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/TransportIndexFailuresIT.java b/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.java index 6d3d63a8ef3..9426f39c100 100644 --- a/core/src/test/java/org/elasticsearch/index/TransportIndexFailuresIT.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 TransportIndexFailuresIT 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/InternalEngineIT.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.java index ebd6965eb3c..bae6be5ad4f 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineIT.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 InternalEngineIT extends ElasticsearchIntegrationTest { +public class InternalEngineIT extends ESIntegTestCase { @Test public void testSetIndexCompoundOnFlush() { diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.java index 1274df7ebc5..8f8ce8c8482 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineMergeIT.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,13 +33,13 @@ 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 InternalEngineMergeIT extends ElasticsearchIntegrationTest { +public class InternalEngineMergeIT extends ESIntegTestCase { @Test public void testMergesHappening() throws InterruptedException, IOException, ExecutionException { 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 7e9906087f4..52de4859ffb 100644 --- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java +++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java @@ -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))?$"); 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/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/FieldDataFilterIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.java index 602ab03498f..393f481e170 100644 --- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataFilterIntegrationIT.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 FieldDataFilterIntegrationIT extends ElasticsearchIntegrationTest { +public class FieldDataFilterIntegrationIT extends ESIntegTestCase { @Override protected int numberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java b/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.java index 07fa7e44c3d..12aeb70df21 100644 --- a/core/src/test/java/org/elasticsearch/index/fielddata/FieldDataLoadingIT.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 FieldDataLoadingIT 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/DynamicMappingIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.java index 9d0ae62a315..8afdea27451 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/DynamicMappingIntegrationIT.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 DynamicMappingIntegrationIT 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/TransformOnIndexMapperIT.java b/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.java index fb0bdf88551..8e88cbb3d3c 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/TransformOnIndexMapperIT.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 TransformOnIndexMapperIT 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/CopyToMapperIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationIT.java index 5265b1b6401..5919c52bc31 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/copyto/CopyToMapperIntegrationIT.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 CopyToMapperIntegrationIT 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/TokenCountFieldMapperIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.java index d9f02ec1234..837a7a060c1 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.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 TokenCountFieldMapperIntegrationIT extends ElasticsearchIntegrationTest { +public class TokenCountFieldMapperIntegrationIT extends ESIntegTestCase { @ParametersFactory public static Iterable buildParameters() { List parameters = new ArrayList<>(); 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/ExternalValuesMapperIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.java index 4eed5a677b6..101b3d6b16b 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/externalvalues/ExternalValuesMapperIntegrationIT.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 ExternalValuesMapperIntegrationIT 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/MultiFieldsIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationIT.java index ee38e42b83a..f3636bf4c47 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/multifield/MultiFieldsIntegrationIT.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 MultiFieldsIntegrationIT 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/SizeMappingIntegrationIT.java b/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationIT.java index 9d574574ed3..6e004c4d0e9 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/size/SizeMappingIntegrationIT.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 SizeMappingIntegrationIT 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/UpdateMappingOnClusterIT.java b/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterIT.java index 923473c8b70..7478b79bf7b 100644 --- a/core/src/test/java/org/elasticsearch/index/mapper/update/UpdateMappingOnClusterIT.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 UpdateMappingOnClusterIT 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 d2ed0425eb5..b17282ee412 100644 --- a/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java @@ -30,7 +30,6 @@ import org.apache.lucene.queries.ExtendedCommonTermsQuery; import org.apache.lucene.queries.TermsQuery; import org.apache.lucene.search.*; import org.apache.lucene.search.BooleanClause.Occur; -import org.apache.lucene.search.MultiTermQuery.RewriteMethod; import org.apache.lucene.search.join.ToParentBlockJoinQuery; import org.apache.lucene.search.spans.*; import org.apache.lucene.spatial.prefix.IntersectsPrefixTreeFilter; @@ -64,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; @@ -81,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/TemplateQueryIT.java b/core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java index d1fb07e7140..51fd769110c 100644 --- a/core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.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 TemplateQueryIT 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/CustomQueryParserIT.java b/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.java index 080998c97a2..e4d345e80b0 100644 --- a/core/src/test/java/org/elasticsearch/index/query/plugin/CustomQueryParserIT.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 CustomQueryParserIT 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/CorruptedFileIT.java b/core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.java index 5a37666da75..c80621c9861 100644 --- a/core/src/test/java/org/elasticsearch/index/store/CorruptedFileIT.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 CorruptedFileIT 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/CorruptedTranslogIT.java b/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.java index 1e35a9656ee..5b3227c8a8e 100644 --- a/core/src/test/java/org/elasticsearch/index/store/CorruptedTranslogIT.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 CorruptedTranslogIT 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/ExceptionRetryIT.java b/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.java index d1beafd8278..c42e320c6d8 100644 --- a/core/src/test/java/org/elasticsearch/index/store/ExceptionRetryIT.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 ExceptionRetryIT 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/SuggestStatsIT.java b/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.java index ed189eb54a3..02d5279abb3 100644 --- a/core/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsIT.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 SuggestStatsIT 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 26b444764ef..06fa074b05b 100644 --- a/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java +++ b/core/src/test/java/org/elasticsearch/index/translog/TranslogTests.java @@ -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))?$"); 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/IndexActionIT.java b/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.java index 55f99e9a7f6..970084146a5 100644 --- a/core/src/test/java/org/elasticsearch/indexing/IndexActionIT.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,7 +43,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo; /** * */ -public class IndexActionIT extends ElasticsearchIntegrationTest { +public class IndexActionIT extends ESIntegTestCase { /** * This test tries to simulate load while creating an index and indexing documents diff --git a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java b/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.java index 4521bd93dd5..e2991159a87 100644 --- a/core/src/test/java/org/elasticsearch/indexlifecycle/IndexLifecycleActionIT.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,7 +53,7 @@ import static org.hamcrest.Matchers.*; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndexLifecycleActionIT extends ElasticsearchIntegrationTest { +public class IndexLifecycleActionIT extends ESIntegTestCase { @Test public void testIndexLifecycleActionsWith11Shards1Backup() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.java index 0531e3942ab..6868137dcda 100644 --- a/core/src/test/java/org/elasticsearch/indices/DateMathIndexExpressionsIntegrationIT.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 DateMathIndexExpressionsIntegrationIT 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/IndicesCustomDataPathIT.java b/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.java index b3deb7de470..22a0d897134 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesCustomDataPathIT.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 IndicesCustomDataPathIT extends ElasticsearchIntegrationTest { +public class IndicesCustomDataPathIT extends ESIntegTestCase { private String path; diff --git a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java b/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.java index a2e8fbaf7e3..115642aed00 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesLifecycleListenerIT.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 IndicesLifecycleListenerIT 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/IndicesOptionsIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.java index f9eeb7fef43..9cf2034e05a 100644 --- a/core/src/test/java/org/elasticsearch/indices/IndicesOptionsIntegrationIT.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 IndicesOptionsIntegrationIT 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/PreBuiltAnalyzerIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.java index 74143af2522..839fc598d01 100644 --- a/core/src/test/java/org/elasticsearch/indices/analysis/PreBuiltAnalyzerIntegrationIT.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 PreBuiltAnalyzerIntegrationIT 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/AnalyzeActionIT.java b/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.java index 119d5d2f9fc..db46e8201d4 100644 --- a/core/src/test/java/org/elasticsearch/indices/analyze/AnalyzeActionIT.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 AnalyzeActionIT extends ElasticsearchIntegrationTest { +public class AnalyzeActionIT extends ESIntegTestCase { @Test public void simpleAnalyzerTests() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java b/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.java index da813f96b6e..d21a840c42b 100644 --- a/core/src/test/java/org/elasticsearch/indices/analyze/HunspellServiceIT.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 HunspellServiceIT 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/IndicesRequestCacheIT.java b/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheIT.java index 5332959fbce..ffb86c77c72 100644 --- a/core/src/test/java/org/elasticsearch/indices/cache/query/IndicesRequestCacheIT.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 IndicesRequestCacheIT 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/IndicesExistsIT.java b/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.java index 5f65990ffe9..199f4b6f77c 100644 --- a/core/src/test/java/org/elasticsearch/indices/exists/indices/IndicesExistsIT.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 IndicesExistsIT 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/TypesExistsIT.java b/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.java index 261698d1d8d..ffb2e2e186a 100644 --- a/core/src/test/java/org/elasticsearch/indices/exists/types/TypesExistsIT.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 TypesExistsIT extends ElasticsearchIntegrationTest { +public class TypesExistsIT extends ESIntegTestCase { @Test public void testSimple() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java b/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.java index f3c29776852..96b145a9bef 100644 --- a/core/src/test/java/org/elasticsearch/indices/flush/FlushIT.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 FlushIT 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/IndicesLeaksIT.java b/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.java index 50c9827c2d6..422fee6879f 100644 --- a/core/src/test/java/org/elasticsearch/indices/leaks/IndicesLeaksIT.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 IndicesLeaksIT extends ElasticsearchIntegrationTest { +public class IndicesLeaksIT extends ESIntegTestCase { @SuppressWarnings({"ConstantConditions", "unchecked"}) diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.java index a418325e36a..f9d597cdc62 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/ConcurrentDynamicTemplateIT.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 ConcurrentDynamicTemplateIT 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/DedicatedMasterGetFieldMappingIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java index d456501848c..62745a64245 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java +++ b/core/src/test/java/org/elasticsearch/indices/mapping/DedicatedMasterGetFieldMappingIT.java @@ -23,8 +23,8 @@ import org.elasticsearch.common.settings.Settings; import org.junit.Before; 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; @ClusterScope(scope = Scope.TEST, numDataNodes = 0) public class DedicatedMasterGetFieldMappingIT extends SimpleGetFieldMappingsIT { diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.java index 1cdd3689615..974599f069c 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetFieldMappingsIT.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 SimpleGetFieldMappingsIT extends ElasticsearchIntegrationTest { +public class SimpleGetFieldMappingsIT extends ESIntegTestCase { public void testGetMappingsWhereThereAreNone() { createIndex("index"); diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.java index 90437638a96..504d9a5840a 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/SimpleGetMappingsIT.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 SimpleGetMappingsIT extends ElasticsearchIntegrationTest { +public class SimpleGetMappingsIT extends ESIntegTestCase { @Test public void getMappingsWhereThereAreNone() { diff --git a/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.java index 080a65b82c8..71ccf68e41a 100644 --- a/core/src/test/java/org/elasticsearch/indices/mapping/UpdateMappingIntegrationIT.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 UpdateMappingIntegrationIT extends ElasticsearchIntegrationTest { +public class UpdateMappingIntegrationIT extends ESIntegTestCase { @Test public void dynamicUpdates() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java b/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.java index 850d8993437..ca13c07d6b7 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/IndexingMemoryControllerIT.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 IndexingMemoryControllerIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0) +public class IndexingMemoryControllerIT extends ESIntegTestCase { @Test public void testIndexBufferSizeUpdateAfterCreationRemoval() throws InterruptedException { diff --git a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.java index 3d96ff9a1e5..29e057d612c 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerNoopIT.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 CircuitBreakerNoopIT 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/CircuitBreakerServiceIT.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.java index 6bbd5673dac..fb9e9cb935f 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/CircuitBreakerServiceIT.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 CircuitBreakerServiceIT 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/RandomExceptionCircuitBreakerIT.java b/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.java index 9703d36a64b..053b2391536 100644 --- a/core/src/test/java/org/elasticsearch/indices/memory/breaker/RandomExceptionCircuitBreakerIT.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 RandomExceptionCircuitBreakerIT 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/IndexRecoveryIT.java b/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java index e1f1d7ec0a9..084862acf7a 100644 --- a/core/src/test/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.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 IndexRecoveryIT 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/GetSettingsBlocksIT.java b/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.java index 3e0d1282957..357e87f0692 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/GetSettingsBlocksIT.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 GetSettingsBlocksIT extends ElasticsearchIntegrationTest { +public class GetSettingsBlocksIT extends ESIntegTestCase { @Test public void testGetSettingsWithBlocks() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java index ac6ba50d237..9d3a6773c3d 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.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 UpdateNumberOfReplicasIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class UpdateNumberOfReplicasIT extends ESIntegTestCase { @Override protected int maximumNumberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java b/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.java index 0aff442fe87..f26a5b25862 100644 --- a/core/src/test/java/org/elasticsearch/indices/settings/UpdateSettingsIT.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 UpdateSettingsIT extends ElasticsearchIntegrationTest { +public class UpdateSettingsIT extends ESIntegTestCase { @Test public void testOpenCloseUpdateSettings() throws Exception { @@ -261,7 +261,7 @@ public class UpdateSettingsIT 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/CloseIndexDisableCloseAllIT.java b/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.java index 419d850ce7e..daebe71ac56 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/CloseIndexDisableCloseAllIT.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 CloseIndexDisableCloseAllIT 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/OpenCloseIndexIT.java b/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.java index 11cb30e9550..9f2dca3d9e9 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/OpenCloseIndexIT.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 OpenCloseIndexIT extends ElasticsearchIntegrationTest { +public class OpenCloseIndexIT extends ESIntegTestCase { @Test public void testSimpleCloseOpen() { diff --git a/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java b/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java index 36144b0fcd5..24a438bbe65 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.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 RareClusterStateIT 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/SimpleIndexStateIT.java b/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.java index b6f24e5c6ce..3001c038486 100644 --- a/core/src/test/java/org/elasticsearch/indices/state/SimpleIndexStateIT.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,8 +44,8 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -@ElasticsearchIntegrationTest.ClusterScope(minNumDataNodes = 2) -public class SimpleIndexStateIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SimpleIndexStateIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(SimpleIndexStateIT.class); diff --git a/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java b/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.java index 5a2885f4a95..8aeb6f65b9b 100644 --- a/core/src/test/java/org/elasticsearch/indices/stats/IndexStatsIT.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 IndexStatsIT extends ElasticsearchIntegrationTest { +public class IndexStatsIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -354,7 +354,7 @@ public class IndexStatsIT 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/IndicesStoreIntegrationIT.java b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java index aad99cfe318..5886e9b91d4 100644 --- a/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java +++ b/core/src/test/java/org/elasticsearch/indices/store/IndicesStoreIntegrationIT.java @@ -47,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; @@ -70,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; @@ -78,7 +78,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) -public class IndicesStoreIntegrationIT extends ElasticsearchIntegrationTest { +public class IndicesStoreIntegrationIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { // simplify this and only use a single data path 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/IndexTemplateBlocksIT.java b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.java index 28a6043479a..c1c41cf6c37 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateBlocksIT.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 IndexTemplateBlocksIT 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/IndexTemplateFilteringIT.java b/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.java index 5c8582287f8..fdabe10888b 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/IndexTemplateFilteringIT.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 IndexTemplateFilteringIT extends ElasticsearchIntegrationTest{ +public class IndexTemplateFilteringIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java b/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.java index 0d5921f115a..1cbe5eb56dc 100644 --- a/core/src/test/java/org/elasticsearch/indices/template/SimpleIndexTemplateIT.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 SimpleIndexTemplateIT extends ElasticsearchIntegrationTest { +public class SimpleIndexTemplateIT extends ESIntegTestCase { @Test public void simpleIndexTemplateTests() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java b/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java index 381141e2d67..1c1b1939868 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java +++ b/core/src/test/java/org/elasticsearch/indices/warmer/GatewayIndicesWarmerIT.java @@ -26,20 +26,20 @@ 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 GatewayIndicesWarmerIT extends ElasticsearchIntegrationTest { +public class GatewayIndicesWarmerIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(GatewayIndicesWarmerIT.class); diff --git a/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java b/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.java index 8337307e2be..e6afa4c259c 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/IndicesWarmerBlocksIT.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 IndicesWarmerBlocksIT 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/SimpleIndicesWarmerIT.java b/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.java index 98ee75cc2f0..6179af72d34 100644 --- a/core/src/test/java/org/elasticsearch/indices/warmer/SimpleIndicesWarmerIT.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 SimpleIndicesWarmerIT extends ElasticsearchIntegrationTest { +public class SimpleIndicesWarmerIT extends ESIntegTestCase { @Test public void simpleWarmerTests() { diff --git a/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java b/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.java index cf67024ad98..7716bf7300b 100644 --- a/core/src/test/java/org/elasticsearch/mget/SimpleMgetIT.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 SimpleMgetIT 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/SimpleNestedIT.java b/core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.java index 1329537cdd2..c876ebf0900 100644 --- a/core/src/test/java/org/elasticsearch/nested/SimpleNestedIT.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 SimpleNestedIT extends ElasticsearchIntegrationTest { +public class SimpleNestedIT extends ESIntegTestCase { @Test public void simpleNested() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java b/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.java index 6ebf02bea17..6d79de93770 100644 --- a/core/src/test/java/org/elasticsearch/network/DirectBufferNetworkIT.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 DirectBufferNetworkIT 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/SimpleNodesInfoTests.java index 68f0281b621..21d292e4d63 100644 --- a/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java +++ b/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java @@ -19,26 +19,17 @@ 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.*; /** diff --git a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java b/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.java index bfd2dc59153..3e2d0e70d9f 100644 --- a/core/src/test/java/org/elasticsearch/operateAllIndices/DestructiveOperationsIntegrationIT.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 DestructiveOperationsIntegrationIT 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/DetailedErrorsDisabledIT.java b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.java index 1835226ca6e..e6282d803b3 100644 --- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsDisabledIT.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 DetailedErrorsDisabledIT extends ElasticsearchIntegrationTest { +public class DetailedErrorsDisabledIT extends ESIntegTestCase { // Build our cluster settings @Override diff --git a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java b/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.java index 5422f0103ab..af3e57075c5 100644 --- a/core/src/test/java/org/elasticsearch/options/detailederrors/DetailedErrorsEnabledIT.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 DetailedErrorsEnabledIT extends ElasticsearchIntegrationTest { +public class DetailedErrorsEnabledIT extends ESIntegTestCase { // Build our cluster settings @Override diff --git a/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.java index 08eb692b1cf..9efd001b98e 100644 --- a/core/src/test/java/org/elasticsearch/percolator/ConcurrentPercolatorIT.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; @@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.*; /** * */ -public class ConcurrentPercolatorIT extends ElasticsearchIntegrationTest { +public class ConcurrentPercolatorIT extends ESIntegTestCase { @Test public void testSimpleConcurrentPercolator() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java index d72e0f8ffe8..77a4b63cfce 100644 --- a/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java +++ b/core/src/test/java/org/elasticsearch/percolator/MultiPercolatorIT.java @@ -27,7 +27,7 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.query.MatchQueryBuilder; import org.elasticsearch.index.query.QueryBuilders; -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.*; /** */ -public class MultiPercolatorIT extends ElasticsearchIntegrationTest { +public class MultiPercolatorIT extends ESIntegTestCase { @Test public void testBasics() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.java index ada19158421..ecee1933fb8 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorBackwardsCompatibilityIT.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 PercolatorBackwardsCompatibilityIT extends ElasticsearchIntegrationTest { +public class PercolatorBackwardsCompatibilityIT extends ESIntegTestCase { @Test public void testPercolatorUpgrading() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.java index a6246bcae3c..c1326845b49 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorFacetsAndAggregationsIT.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 PercolatorFacetsAndAggregationsIT 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/PercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java index 2b1eb762e98..b75eb093b3f 100644 --- a/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java +++ b/core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java @@ -50,7 +50,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; @@ -95,7 +95,7 @@ import static org.hamcrest.Matchers.nullValue; /** * */ -public class PercolatorIT extends ElasticsearchIntegrationTest { +public class PercolatorIT extends ESIntegTestCase { @Test public void testSimple1() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.java index 839300c5d27..617c964364f 100644 --- a/core/src/test/java/org/elasticsearch/percolator/RecoveryPercolatorIT.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; @@ -50,8 +50,8 @@ 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.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.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertMatchCount; @@ -63,7 +63,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.nullValue; @ClusterScope(scope = Scope.TEST, numDataNodes = 0, numClientNodes = 0, transportClientRatio = 0) -public class RecoveryPercolatorIT extends ElasticsearchIntegrationTest { +public class RecoveryPercolatorIT extends ESIntegTestCase { @Override protected int numberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java b/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.java index 066409be0e9..af77b029e62 100644 --- a/core/src/test/java/org/elasticsearch/percolator/TTLPercolatorIT.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; @@ -46,8 +46,8 @@ import static org.hamcrest.Matchers.*; /** */ -@ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST) -public class TTLPercolatorIT 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/PluggableTransportModuleIT.java b/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java index da0f6471009..b418081c898 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluggableTransportModuleIT.java @@ -22,7 +22,7 @@ import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.inject.Inject; 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.*; @@ -32,15 +32,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 PluggableTransportModuleIT 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/PluginManagerIT.java b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java index 34bcbb6d852..31f088498bc 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.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 PluginManagerIT extends ElasticsearchIntegrationTest { +public class PluginManagerIT extends ESIntegTestCase { private Tuple initialSettings; private CaptureOutputTerminal terminal = new CaptureOutputTerminal(); 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/ResponseHeaderPluginIT.java b/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.java index 1b3260ae5e5..b171278d659 100644 --- a/core/src/test/java/org/elasticsearch/plugins/ResponseHeaderPluginIT.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 ResponseHeaderPluginIT extends ElasticsearchIntegrationTest { +public class ResponseHeaderPluginIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java b/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.java index 505d3ee3222..6e62fd9e675 100644 --- a/core/src/test/java/org/elasticsearch/plugins/SitePluginIT.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 SitePluginIT extends ElasticsearchIntegrationTest { +public class SitePluginIT extends ESIntegTestCase { @Override diff --git a/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java b/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.java index 86e39bb43cc..ed3062620bc 100644 --- a/core/src/test/java/org/elasticsearch/plugins/SitePluginRelativePathConfigIT.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 SitePluginRelativePathConfigIT 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/FullRollingRestartIT.java b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java index 882b445c86c..c0d64533725 100644 --- a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.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 FullRollingRestartIT extends ElasticsearchIntegrationTest { +public class FullRollingRestartIT extends ESIntegTestCase { protected void assertTimeout(ClusterHealthRequestBuilder requestBuilder) { ClusterHealthResponse clusterHealth = requestBuilder.get(); 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/RecoveryWhileUnderLoadIT.java b/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.java index a0c37439a30..60a6acb7ed9 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RecoveryWhileUnderLoadIT.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; @@ -48,7 +48,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitC import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoTimeout; import static org.hamcrest.Matchers.equalTo; -public class RecoveryWhileUnderLoadIT extends ElasticsearchIntegrationTest { +public class RecoveryWhileUnderLoadIT extends ESIntegTestCase { private final ESLogger logger = Loggers.getLogger(RecoveryWhileUnderLoadIT.class); diff --git a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java index e2954442715..54afe037ca5 100644 --- a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java +++ b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java @@ -57,8 +57,8 @@ 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; -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.elasticsearch.test.transport.MockTransportService; import org.elasticsearch.transport.Transport; @@ -83,7 +83,7 @@ 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.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; @@ -96,7 +96,7 @@ import static org.hamcrest.Matchers.startsWith; */ @ClusterScope(scope = Scope.TEST, numDataNodes = 0) @TestLogging("indices.recovery:TRACE,index.shard.service:TRACE") -public class RelocationIT extends ElasticsearchIntegrationTest { +public class RelocationIT extends ESIntegTestCase { private final TimeValue ACCEPTABLE_RELOCATION_TIME = new TimeValue(5, TimeUnit.MINUTES); @Override diff --git a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java b/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.java index 208dfb275fb..d19117e1d23 100644 --- a/core/src/test/java/org/elasticsearch/recovery/SimpleRecoveryIT.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 SimpleRecoveryIT extends ElasticsearchIntegrationTest { +public class SimpleRecoveryIT extends ESIntegTestCase { @Override public Settings indexSettings() { diff --git a/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java b/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.java index c407ae64b8a..335da8601d9 100644 --- a/core/src/test/java/org/elasticsearch/recovery/TruncatedRecoveryIT.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 TruncatedRecoveryIT 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/CorsRegexDefaultIT.java b/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.java index feb57e87408..fa7eccd6658 100644 --- a/core/src/test/java/org/elasticsearch/rest/CorsRegexDefaultIT.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 CorsRegexDefaultIT extends ElasticsearchIntegrationTest { +public class CorsRegexDefaultIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java b/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.java index 8ef8217e5be..d0e0282f2ca 100644 --- a/core/src/test/java/org/elasticsearch/rest/CorsRegexIT.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,7 +38,7 @@ import static org.hamcrest.Matchers.is; * */ @ClusterScope(scope = Scope.SUITE, numDataNodes = 1) -public class CorsRegexIT extends ElasticsearchIntegrationTest { +public class CorsRegexIT extends ESIntegTestCase { protected static final ESLogger logger = Loggers.getLogger(CorsRegexIT.class); 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/UpgradeIT.java b/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeIT.java index e93296175bf..82d88aeb950 100644 --- a/core/src/test/java/org/elasticsearch/rest/action/admin/indices/upgrade/UpgradeIT.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 UpgradeIT 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() { 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/AliasResolveRoutingIT.java b/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.java index b79ec6a9262..a3868e33ab7 100644 --- a/core/src/test/java/org/elasticsearch/routing/AliasResolveRoutingIT.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 AliasResolveRoutingIT extends ElasticsearchIntegrationTest { +public class AliasResolveRoutingIT extends ESIntegTestCase { @Test public void testResolveIndexRouting() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java b/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.java index b596f75f4ba..b7b44afd437 100644 --- a/core/src/test/java/org/elasticsearch/routing/AliasRoutingIT.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 AliasRoutingIT extends ElasticsearchIntegrationTest { +public class AliasRoutingIT extends ESIntegTestCase { @Override protected int minimumNumberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java b/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.java index f288a756091..24f0df4f5d8 100644 --- a/core/src/test/java/org/elasticsearch/routing/SimpleRoutingIT.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 SimpleRoutingIT extends ElasticsearchIntegrationTest { +public class SimpleRoutingIT extends ESIntegTestCase { @Override protected int minimumNumberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java b/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.java index fc92731b28b..ef9c4e3ced4 100644 --- a/core/src/test/java/org/elasticsearch/script/CustomScriptContextIT.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 CustomScriptContextIT 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/GroovyScriptIT.java b/core/src/test/java/org/elasticsearch/script/GroovyScriptIT.java index 155d0a9cd84..8df2c205b38 100644 --- a/core/src/test/java/org/elasticsearch/script/GroovyScriptIT.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 GroovyScriptIT extends ElasticsearchIntegrationTest { +public class GroovyScriptIT extends ESIntegTestCase { @Test public void testGroovyBigDecimalTransformation() { diff --git a/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java b/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.java index 0ab1a874301..847fe28fbbf 100644 --- a/core/src/test/java/org/elasticsearch/script/GroovySecurityIT.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 GroovySecurityIT 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/IndexLookupIT.java b/core/src/test/java/org/elasticsearch/script/IndexLookupIT.java index 5e4788bdbdc..36128824a9c 100644 --- a/core/src/test/java/org/elasticsearch/script/IndexLookupIT.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 IndexLookupIT 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/IndexedScriptIT.java b/core/src/test/java/org/elasticsearch/script/IndexedScriptIT.java index 78be0b6fa5c..1142206ee8a 100644 --- a/core/src/test/java/org/elasticsearch/script/IndexedScriptIT.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 IndexedScriptIT 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/OnDiskScriptIT.java b/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.java index 4d556b7a99b..636c8335df2 100644 --- a/core/src/test/java/org/elasticsearch/script/OnDiskScriptIT.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 OnDiskScriptIT 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/ScriptFieldIT.java b/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.java index eaddeeba78d..2acfb553e4f 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptFieldIT.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 ScriptFieldIT extends ElasticsearchIntegrationTest { +public class ScriptFieldIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java b/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.java index 7b86ea5ba47..0c0bf9aeea3 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptIndexSettingsIT.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 ScriptIndexSettingsIT 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/ExpressionScriptIT.java b/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.java index 056d1853863..70d958de88f 100644 --- a/core/src/test/java/org/elasticsearch/script/expression/ExpressionScriptIT.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 ExpressionScriptIT 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/CountSearchIT.java b/core/src/test/java/org/elasticsearch/search/CountSearchIT.java index 4ecbff7c1a0..61d887da366 100644 --- a/core/src/test/java/org/elasticsearch/search/CountSearchIT.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 CountSearchIT 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/SearchWithRejectionsIT.java b/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.java index 417108bb2ab..b5b4b94a8a1 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchWithRejectionsIT.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,10 +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) -public class SearchWithRejectionsIT 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/StressSearchServiceReaperIT.java b/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.java index cd760b5f612..c97e29a0f9c 100644 --- a/core/src/test/java/org/elasticsearch/search/StressSearchServiceReaperIT.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 StressSearchServiceReaperIT extends ElasticsearchIntegrationTest { +public class StressSearchServiceReaperIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { 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/AggregationsBinaryIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.java index 8cd52c3f801..631f705bf5b 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsBinaryIT.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 AggregationsBinaryIT 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/AggregationsIntegrationIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.java index 50302a731a7..8944294fd42 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/AggregationsIntegrationIT.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 AggregationsIntegrationIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.SuiteScopeTestCase +public class AggregationsIntegrationIT extends ESIntegTestCase { static int numDocs; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.java index a2b24b3d1a6..8282a538bec 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/CombiIT.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 CombiIT 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/EquivalenceIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java index 438dd9f3236..abe88af10aa 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/EquivalenceIT.java @@ -40,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; @@ -69,7 +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. */ -public class EquivalenceIT 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/MetaDataIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.java index a18893f80da..c83ad5777bc 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/MetaDataIT.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 MetaDataIT 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/MissingValueIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.java index e14f2ee7b7e..f76e1ad9e56 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/MissingValueIT.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 MissingValueIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.SuiteScopeTestCase +public class MissingValueIT extends ESIntegTestCase { @Override protected int maximumNumberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.java index 4c5232c2328..64f80d66e18 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/ParsingIT.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 ParsingIT 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/AbstractTermsTests.java index 23947956466..f12e8db5cbe 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTests.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 AbstractTermsTests extends ESIntegTestCase { public String randomExecutionHint() { return randomBoolean() ? null : randomFrom(ExecutionMode.values()).toString(); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.java index c96f65f7e89..b4c28ac3521 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/BooleanTermsIT.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 BooleanTermsIT 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/ChildrenIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenIT.java index 4cfe02eab00..169901aad59 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ChildrenIT.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 ChildrenIT 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/DateHistogramIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.java index 36a29f49fb2..4e81448ab6d 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramIT.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 DateHistogramIT 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/DateHistogramOffsetIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.java index 284c130797f..d0d91b8d66a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateHistogramOffsetIT.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 DateHistogramOffsetIT 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/DateRangeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.java index 0b82296710f..caef65714fc 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DateRangeIT.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 DateRangeIT 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/DedicatedAggregationIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationIT.java index 3e073c53bcc..941cf238d5a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DedicatedAggregationIT.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 DedicatedAggregationIT 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/DoubleTermsTests.java index c7d38ad53ed..a7791f84378 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/DoubleTermsTests.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,7 +65,7 @@ import static org.hamcrest.core.IsNull.notNullValue; /** * */ -@ElasticsearchIntegrationTest.SuiteScopeTest +@ESIntegTestCase.SuiteScopeTestCase public class DoubleTermsTests extends AbstractTermsTests { private static final int NUM_DOCS = 5; // TODO: randomize the size? diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.java index b2544727246..e881200d528 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FilterIT.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 FilterIT 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/FiltersIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.java index b0640c25297..cd66d34b22a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/FiltersIT.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 FiltersIT 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/GeoDistanceIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.java index 254b6e16fc6..f6dff6ecf92 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoDistanceIT.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 GeoDistanceIT 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/GeoHashGridIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.java index 1c35a776ef1..d385ea9f29e 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridIT.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 GeoHashGridIT 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/GlobalIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.java index e03b7925bef..a313d157214 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/GlobalIT.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 GlobalIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.SuiteScopeTestCase +public class GlobalIT extends ESIntegTestCase { static int numDocs; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.java index ee698b25c22..e244d97cb7e 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/HistogramIT.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 HistogramIT 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/IPv4RangeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeIT.java index 78b4192f6e7..ddbc885cb1d 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/IPv4RangeIT.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 IPv4RangeIT 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/LongTermsTests.java index dee56814e70..2d27ad4c7af 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/LongTermsTests.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,7 +63,7 @@ import static org.hamcrest.core.IsNull.notNullValue; /** * */ -@ElasticsearchIntegrationTest.SuiteScopeTest +@ESIntegTestCase.SuiteScopeTestCase public class LongTermsTests extends AbstractTermsTests { private static final int NUM_DOCS = 5; // TODO randomize the size? diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java index 6afcd455051..76b1ca5ae0a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MinDocCountTests.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,7 +53,7 @@ import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful; -@ElasticsearchIntegrationTest.SuiteScopeTest +@ESIntegTestCase.SuiteScopeTestCase public class MinDocCountTests extends AbstractTermsTests { private static final QueryBuilder QUERY = QueryBuilders.termQuery("match", true); diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.java index 04c0653aa30..9b5df37cd8c 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/MissingIT.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 MissingIT 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/NaNSortingIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.java index 0764e94d4e6..3825901d54e 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NaNSortingIT.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 NaNSortingIT 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/NestedIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.java index 7484c6a8944..7842fd847a0 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/NestedIT.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 NestedIT 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/ParentIdAggIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggIT.java index 116bec9a558..75751c1fa48 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ParentIdAggIT.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 ParentIdAggIT 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/RangeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.java index 391c22a9cfc..567844b727b 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/RangeIT.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 RangeIT 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/ReverseNestedIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.java index 4e1a8b7c956..2a7be3b8b0a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ReverseNestedIT.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 ReverseNestedIT 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/SamplerIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.java index 9891290431c..58987220909 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SamplerIT.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 SamplerIT 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/ShardReduceIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.java index 108c57cc269..3436b4ccfa4 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardReduceIT.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 ShardReduceIT 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/ShardSizeTermsTests.java index df449ea7c2a..25c7ae3df75 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/ShardSizeTermsTests.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 ShardSizeTermsTests 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/SignificantTermsBackwardCompatibilityIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.java index 4134da233a7..556c012c98b 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsBackwardCompatibilityIT.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 SignificantTermsBackwardCompatibilityIT 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/SignificantTermsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsIT.java index 147699e89b6..882f2b7318f 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsIT.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 SignificantTermsIT 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/SignificantTermsSignificanceScoreIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java index e6b053d40fe..941fcb36001 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.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 SignificantTermsSignificanceScoreIT 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/StringTermsTests.java index a2daafdc13f..6975300338c 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/StringTermsTests.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,7 +71,7 @@ import static org.hamcrest.core.IsNull.nullValue; /** * */ -@ElasticsearchIntegrationTest.SuiteScopeTest +@ESIntegTestCase.SuiteScopeTestCase public class StringTermsTests extends AbstractTermsTests { private static final String SINGLE_VALUED_FIELD_NAME = "s_value"; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.java index f5c561a67e3..db6f5be9024 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsDocCountErrorIT.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 TermsDocCountErrorIT 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/TermsShardMinDocCountIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.java index 040819c8777..03aebd6058c 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TermsShardMinDocCountIT.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 TermsShardMinDocCountIT 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/TopHitsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsIT.java index 2f8b355ecf3..e0d56d1e033 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/bucket/TopHitsIT.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 TopHitsIT 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/AbstractNumericTests.java index e8c42fb9747..d36a2d6f5d5 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTests.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 AbstractNumericTests extends ESIntegTestCase { protected static long minValue, maxValue, minValues, maxValues; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.java index 2fe87192dfe..491e4f694c9 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/CardinalityIT.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 CardinalityIT 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/GeoBoundsIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.java index 93d9a27ba32..6d2d61e707d 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsIT.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 GeoBoundsIT 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/ScriptedMetricIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.java index 8944a215f9a..197da9dff86 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricIT.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 ScriptedMetricIT 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/ValueCountIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.java index 70ea3ea98a4..6fd4e833b9c 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/ValueCountIT.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 ValueCountIT 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/AvgBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.java index 909a36ee929..a18f1296ddf 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/AvgBucketIT.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 AvgBucketIT 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/BucketScriptIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.java index 05239efb757..2e3117e76ff 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketScriptIT.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 BucketScriptIT 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/BucketSelectorIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.java index 70fc2879ee9..faf43f09968 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/BucketSelectorIT.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 BucketSelectorIT 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/CumulativeSumIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumIT.java index e49172c68c1..1d844e17af2 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/CumulativeSumIT.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 CumulativeSumIT 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/DateDerivativeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.java index dadc7a7ffda..569830b0a95 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DateDerivativeIT.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 DateDerivativeIT 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/DerivativeIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java index 7134dc4ea13..fbbb173ee7f 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/DerivativeIT.java @@ -34,7 +34,7 @@ import org.elasticsearch.search.aggregations.metrics.sum.Sum; 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; @@ -56,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 DerivativeIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.SuiteScopeTestCase +public class DerivativeIT extends ESIntegTestCase { private static final String SINGLE_VALUED_FIELD_NAME = "l_value"; diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.java index 6d52cab4b02..bacb6bda9b6 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MaxBucketIT.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 MaxBucketIT 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/MinBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.java index f8ba15e7ee2..cb83f60f23a 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/MinBucketIT.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 MinBucketIT 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/SumBucketIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.java index f5f0f961249..be11f90fa62 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/SumBucketIT.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 SumBucketIT 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/MovAvgIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.java index 795eccc3845..d139e38a787 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/moving/avg/MovAvgIT.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 MovAvgIT 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/SerialDiffIT.java b/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.java index c5e7cd5c63f..af686674c75 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/pipeline/serialdiff/SerialDiffIT.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 SerialDiffIT 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/SearchWhileCreatingIndexIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java index 7031a02367d..cea6f92f3a6 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java +++ b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileCreatingIndexIT.java @@ -24,7 +24,7 @@ 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; @@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; * This test basically verifies that search with a single shard active (cause we indexed to it) and other * shards possibly not active at all (cause they haven't allocated) will still work. */ -public class SearchWhileCreatingIndexIT extends ElasticsearchIntegrationTest { +public class SearchWhileCreatingIndexIT extends ESIntegTestCase { @Test public void testIndexCausesIndexCreation() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.java index de530cd61f2..86b27f25e7d 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWhileRelocatingIT.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 SearchWhileRelocatingIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchWhileRelocatingIT extends ESIntegTestCase { @Test @Nightly diff --git a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java b/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.java index 98f37091dc9..93fbd80b52a 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsIT.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; @@ -53,7 +53,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcke import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertNoFailures; -public class SearchWithRandomExceptionsIT extends ElasticsearchIntegrationTest { +public class SearchWithRandomExceptionsIT extends ESIntegTestCase { @Test @TestLogging("action.search.type:TRACE,index.shard:TRACE") diff --git a/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java b/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.java index aaff1c9ae41..5ea8b40958f 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/TransportSearchFailuresIT.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 TransportSearchFailuresIT extends ElasticsearchIntegrationTest { +public class TransportSearchFailuresIT extends ESIntegTestCase { @Override protected int maximumNumberOfReplicas() { diff --git a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java b/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.java index 9fad1e6e11a..246da2508d8 100644 --- a/core/src/test/java/org/elasticsearch/search/basic/TransportTwoNodesSearchIT.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 TransportTwoNodesSearchIT 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/ChildQuerySearchBwcIT.java b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.java index cc6179e144c..ff6d7409713 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchBwcIT.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; diff --git a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java b/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java index 04a0dab5358..5f89af38660 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.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 ChildQuerySearchIT extends ElasticsearchIntegrationTest { +public class ChildQuerySearchIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java index c7a55ff884a..feb18286838 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java +++ b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingBwcIT.java @@ -39,7 +39,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.elasticsearch.test.ESIntegTestCase; import java.io.IOException; @@ -51,7 +51,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; -public class ParentFieldLoadingBwcIT 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/ParentFieldLoadingIT.java b/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.java index 4a79d0ca5b0..86596648c39 100644 --- a/core/src/test/java/org/elasticsearch/search/child/ParentFieldLoadingIT.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 ParentFieldLoadingIT 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 index a9cb67fb73a..c7d10df57f6 100644 --- a/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java +++ b/core/src/test/java/org/elasticsearch/search/fetch/FetchSubPhasePluginIT.java @@ -35,9 +35,9 @@ 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.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; @@ -55,7 +55,7 @@ import static org.hamcrest.Matchers.equalTo; * */ @ClusterScope(scope = Scope.SUITE, numDataNodes = 1) -public class FetchSubPhasePluginIT extends ElasticsearchIntegrationTest { +public class FetchSubPhasePluginIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { 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/SearchFieldsIT.java b/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.java index 346d5e39f72..15abcc9ef5b 100644 --- a/core/src/test/java/org/elasticsearch/search/fields/SearchFieldsIT.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 SearchFieldsIT extends ElasticsearchIntegrationTest { +public class SearchFieldsIT extends ESIntegTestCase { @Test public void testStoredFields() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.java index 9d0f54b91ff..0848c89ac3e 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/DecayFunctionScoreIT.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 DecayFunctionScoreIT extends ElasticsearchIntegrationTest { +public class DecayFunctionScoreIT extends ESIntegTestCase { @Test public void testDistanceScoreGeoLinGaussExp() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.java index efed64f2cdd..3fbc9b6ba4b 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/ExplainableScriptIT.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 ExplainableScriptIT extends ElasticsearchIntegrationTest { +public class ExplainableScriptIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.java index d2378709f05..80c4968fda8 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreBackwardCompatibilityIT.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 FunctionScoreBackwardCompatibilityIT extends ElasticsearchBackwardsCompatIntegrationTest { +public class FunctionScoreBackwardCompatibilityIT extends ESBackcompatTestCase { /** * Simple upgrade test for function score diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.java index 2f583cb3df8..577b3eaea31 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreFieldValueIT.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 FunctionScoreFieldValueIT extends ElasticsearchIntegrationTest { +public class FunctionScoreFieldValueIT extends ESIntegTestCase { @Test public void testFieldValueFactor() throws IOException { diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java index 7ac7f45211a..7e138162aa6 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScoreIT.java @@ -31,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; @@ -60,7 +60,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -public class FunctionScoreIT extends ElasticsearchIntegrationTest { +public class FunctionScoreIT extends ESIntegTestCase { static final String TYPE = "type"; static final String INDEX = "index"; diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.java index d3cd012e8ce..e78befd1791 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/FunctionScorePluginIT.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 FunctionScorePluginIT extends ElasticsearchIntegrationTest { +public class FunctionScorePluginIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java index 3267d22d83b..f00e95d6e44 100644 --- a/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java +++ b/core/src/test/java/org/elasticsearch/search/functionscore/RandomScoreFunctionIT.java @@ -24,7 +24,7 @@ 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; @@ -51,7 +51,7 @@ import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.nullValue; -public class RandomScoreFunctionIT extends ElasticsearchIntegrationTest { +public class RandomScoreFunctionIT extends ESIntegTestCase { public void testConsistentHitsWithSameSeed() throws Exception { createIndex("test"); @@ -265,7 +265,6 @@ public class RandomScoreFunctionIT extends ElasticsearchIntegrationTest { .execute().actionGet()); } - @Ignore public void checkDistribution() throws Exception { int count = 10000; diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.java index c46a238d9b6..cc8471519db 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoBoundingBoxIT.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 GeoBoundingBoxIT extends ElasticsearchIntegrationTest { +public class GeoBoundingBoxIT extends ESIntegTestCase { @Test public void simpleBoundingBoxTest() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.java index c06754d14d0..b1e959a5821 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoDistanceIT.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 GeoDistanceIT extends ElasticsearchIntegrationTest { +public class GeoDistanceIT extends ESIntegTestCase { @Test public void simpleDistanceTests() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.java index 431819ade18..325fcde4c01 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoFilterIT.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 GeoFilterIT extends ElasticsearchIntegrationTest { +public class GeoFilterIT extends ESIntegTestCase { private static boolean intersectSupport; private static boolean disjointSupport; diff --git a/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.java index c878baf2e69..d8417014210 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoPolygonIT.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 GeoPolygonIT 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/GeoShapeIntegrationIT.java b/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.java index 64b11866d1a..59282e971df 100644 --- a/core/src/test/java/org/elasticsearch/search/geo/GeoShapeIntegrationIT.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 GeoShapeIntegrationIT extends ElasticsearchIntegrationTest { +public class GeoShapeIntegrationIT extends ESIntegTestCase { @Test public void testNullShape() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java b/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.java index ad7aed2f5b0..e254b4a0808 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/CustomHighlighterSearchIT.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 CustomHighlighterSearchIT extends ElasticsearchIntegrationTest { +public class CustomHighlighterSearchIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java index f279b2cf338..d9f69de6947 100644 --- a/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java +++ b/core/src/test/java/org/elasticsearch/search/highlight/HighlighterSearchIT.java @@ -39,7 +39,7 @@ 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; @@ -85,7 +85,7 @@ import static org.hamcrest.Matchers.hasKey; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.startsWith; -public class HighlighterSearchIT extends ElasticsearchIntegrationTest { +public class HighlighterSearchIT extends ESIntegTestCase { @Test public void testHighlightingWithWildcardName() throws IOException { diff --git a/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java b/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.java index ae3f7b43a0f..589f79a876b 100644 --- a/core/src/test/java/org/elasticsearch/search/indicesboost/SimpleIndicesBoostSearchIT.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 SimpleIndicesBoostSearchIT extends ElasticsearchIntegrationTest { +public class SimpleIndicesBoostSearchIT extends ESIntegTestCase { @Test public void testIndicesBoost() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java b/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.java index 1c867bda100..1384b33bff2 100644 --- a/core/src/test/java/org/elasticsearch/search/innerhits/InnerHitsIT.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 InnerHitsIT extends ElasticsearchIntegrationTest { +public class InnerHitsIT extends ESIntegTestCase { @Test public void testSimpleNested() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java b/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.java index 158eafb27ec..c64e840bd4d 100644 --- a/core/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesIT.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 MatchedQueriesIT 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/MoreLikeThisIT.java b/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.java index 2efc1b721a7..52df8932291 100644 --- a/core/src/test/java/org/elasticsearch/search/morelikethis/MoreLikeThisIT.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 MoreLikeThisIT extends ElasticsearchIntegrationTest { +public class MoreLikeThisIT extends ESIntegTestCase { @Test public void testSimpleMoreLikeThis() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java b/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.java index 3517fdf05b3..53f7e615adf 100644 --- a/core/src/test/java/org/elasticsearch/search/msearch/SimpleMultiSearchIT.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 SimpleMultiSearchIT extends ElasticsearchIntegrationTest { +public class SimpleMultiSearchIT extends ESIntegTestCase { @Test public void simpleMultiSearch() { diff --git a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java b/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.java index 705ceeecaf3..a9cd6de06ae 100644 --- a/core/src/test/java/org/elasticsearch/search/preference/SearchPreferenceIT.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 SearchPreferenceIT extends ElasticsearchIntegrationTest { +@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class SearchPreferenceIT extends ESIntegTestCase { @Test // see #2896 public void testStopOneNodePreferenceWithRedState() throws InterruptedException, IOException { diff --git a/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java b/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.java index 595240cf007..c232a7c4a13 100644 --- a/core/src/test/java/org/elasticsearch/search/query/ExistsMissingIT.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 ExistsMissingIT 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/MultiMatchQueryIT.java b/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java index 42fea05c64d..b9099d05c54 100644 --- a/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java +++ b/core/src/test/java/org/elasticsearch/search/query/MultiMatchQueryIT.java @@ -33,7 +33,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; @@ -51,7 +51,7 @@ import static org.elasticsearch.index.query.QueryBuilders.*; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.*; import static org.hamcrest.Matchers.*; -public class MultiMatchQueryIT extends ElasticsearchIntegrationTest { +public class MultiMatchQueryIT extends ESIntegTestCase { @Before public void init() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java index 5ad7eeca4c7..f1ed9bb8e53 100644 --- a/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java +++ b/core/src/test/java/org/elasticsearch/search/query/SearchQueryIT.java @@ -46,7 +46,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; @@ -83,7 +83,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; -public class SearchQueryIT extends ElasticsearchIntegrationTest { +public class SearchQueryIT extends ESIntegTestCase { @Override protected int maximumNumberOfShards() { diff --git a/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java b/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java index a2673390644..f660decbb9d 100644 --- a/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java +++ b/core/src/test/java/org/elasticsearch/search/query/SimpleQueryStringIT.java @@ -25,7 +25,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.query.BoolQueryBuilder; 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; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.equalTo; /** * Tests for the {@code simple_query_string} query */ -public class SimpleQueryStringIT 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/QueryRescorerIT.java b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java index fce8bb7e24c..6aa31ca2773 100644 --- a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java +++ b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerIT.java @@ -39,7 +39,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; @@ -65,7 +65,7 @@ import static org.hamcrest.Matchers.notNullValue; /** * */ -public class QueryRescorerIT extends ElasticsearchIntegrationTest { +public class QueryRescorerIT extends ESIntegTestCase { @Test public void testEnforceWindowSize() { 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/SearchScanIT.java b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java index 45cd36d6767..e98a3c4d80d 100644 --- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java +++ b/core/src/test/java/org/elasticsearch/search/scan/SearchScanIT.java @@ -25,7 +25,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.common.xcontent.XContentFactory.jsonBuilder; import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.hamcrest.Matchers.equalTo; -public class SearchScanIT extends ElasticsearchIntegrationTest { +public class SearchScanIT extends ESIntegTestCase { @Test public void testNarrowingQuery() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java b/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.java index e5eefb83f7c..8c7a31140bb 100644 --- a/core/src/test/java/org/elasticsearch/search/scan/SearchScanScrollingIT.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 SearchScanScrollingIT extends ElasticsearchIntegrationTest { +public class SearchScanScrollingIT extends ESIntegTestCase { @Test public void testRandomized() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java b/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.java index 04e2bb5a387..d82e12ecc1b 100644 --- a/core/src/test/java/org/elasticsearch/search/scriptfilter/ScriptQuerySearchIT.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 ScriptQuerySearchIT 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/DuelScrollIT.java b/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.java index e2562f39434..d4e354a108b 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/DuelScrollIT.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 DuelScrollIT 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/SearchScrollIT.java b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.java index 3b592df6b73..54f6f14e514 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollIT.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 SearchScrollIT extends ElasticsearchIntegrationTest { +public class SearchScrollIT extends ESIntegTestCase { @Test public void testSimpleScrollQueryThenFetch() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java b/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.java index 9247714e85f..a037a6d9aeb 100644 --- a/core/src/test/java/org/elasticsearch/search/scroll/SearchScrollWithFailingNodesIT.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 SearchScrollWithFailingNodesIT 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/SimpleSearchIT.java b/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.java index f9c2f8a2809..ebf8b756e88 100644 --- a/core/src/test/java/org/elasticsearch/search/simple/SimpleSearchIT.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 SimpleSearchIT extends ElasticsearchIntegrationTest { +public class SimpleSearchIT extends ESIntegTestCase { @Test public void testSearchNullIndex() { diff --git a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java b/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.java index 599d65c2069..b2cdbfab588 100644 --- a/core/src/test/java/org/elasticsearch/search/sort/SimpleSortIT.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 SimpleSortIT extends ElasticsearchIntegrationTest { +public class SimpleSortIT extends ESIntegTestCase { @TestLogging("action.search.type:TRACE") @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elasticsearch/elasticsearch/issues/9421") 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/SourceFetchingIT.java b/core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.java index 73d5235e1e0..d6a8e860329 100644 --- a/core/src/test/java/org/elasticsearch/search/source/SourceFetchingIT.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 SourceFetchingIT extends ElasticsearchIntegrationTest { +public class SourceFetchingIT extends ESIntegTestCase { @Test public void testSourceDefaultBehavior() { diff --git a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java b/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.java index 79fc32b4925..3a6af88a683 100644 --- a/core/src/test/java/org/elasticsearch/search/stats/SearchStatsIT.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 SearchStatsIT 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/CompletionSuggestSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.java index 1b30598a3b3..672dc5e081f 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/CompletionSuggestSearchIT.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 CompletionSuggestSearchIT 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/ContextSuggestSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.java index a56187eef9e..83c8b362d8b 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/ContextSuggestSearchIT.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 ContextSuggestSearchIT 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/CustomSuggesterSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.java index 7bafe640071..1d7ad858321 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/CustomSuggesterSearchIT.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 CustomSuggesterSearchIT extends ElasticsearchIntegrationTest { +public class CustomSuggesterSearchIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java b/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java index 27cc57c6257..d00658709bb 100644 --- a/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.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 SuggestSearchIT extends ElasticsearchIntegrationTest { +public class SuggestSearchIT extends ESIntegTestCase { @Test // see #3196 public void testSuggestAcrossMultipleIndices() throws IOException { 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/SearchTimeoutIT.java b/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.java index 7a37ded1abf..f0cbfd65c02 100644 --- a/core/src/test/java/org/elasticsearch/search/timeout/SearchTimeoutIT.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 SearchTimeoutIT 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/SimilarityIT.java b/core/src/test/java/org/elasticsearch/similarity/SimilarityIT.java index 8b1eee953fd..229f2a8ed61 100644 --- a/core/src/test/java/org/elasticsearch/similarity/SimilarityIT.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 SimilarityIT extends ElasticsearchIntegrationTest { +public class SimilarityIT extends ESIntegTestCase { @Test diff --git a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.java b/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java similarity index 96% rename from core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.java rename to core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIntegTestCase.java index 840bc4b0edf..7aedb958630 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/AbstractSnapshotIT.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 AbstractSnapshotIT 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/BlobStoreFormatTests.java index 1e4a5f61faa..4a16d2ff17c 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/BlobStoreFormatTests.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 AbstractSnapshotIT { +public class BlobStoreFormatTests extends AbstractSnapshotIntegTestCase { private static final ParseFieldMatcher parseFieldMatcher = new ParseFieldMatcher(Settings.EMPTY); diff --git a/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java b/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java index cba9831ccae..6f4e4e217d8 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.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 DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIT { +public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase { @Test public void restorePersistentSettingsTest() throws Exception { @@ -692,7 +691,7 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIT { } @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/RepositoriesTests.java index 9c36d34b24b..ff67973a619 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.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 AbstractSnapshotIT { +@ESIntegTestCase.ClusterScope(minNumDataNodes = 2) +public class RepositoriesTests extends AbstractSnapshotIntegTestCase { @Test public void testRepositoryCreation() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index 70607aa1e3c..85fd0c7c2f5 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java +++ b/core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -104,7 +104,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.startsWith; -public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIT { +public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCase { @Test public void basicWorkFlowTest() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.java index dea168a2d7d..21401d091f0 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/SnapshotBackwardsCompatibilityIT.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 SnapshotBackwardsCompatibilityIT 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 98% rename from core/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java rename to core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java index 9f08eb7ff0e..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,9 +194,8 @@ import static org.hamcrest.Matchers.*; *

*

*/ -@Ignore @LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet -public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase { +public abstract class ESIntegTestCase extends ESTestCase { /** * Property that controls whether ThirdParty Integration tests are run (not the default). @@ -214,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 { } @@ -279,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 @@ -309,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; } @@ -1446,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 { /** @@ -1460,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; @@ -1563,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); @@ -1911,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(); @@ -1989,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/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/NetworkPartitionIT.java b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java index ddcef10b806..84aa300fb84 100644 --- a/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java +++ b/core/src/test/java/org/elasticsearch/test/disruption/NetworkPartitionIT.java @@ -22,7 +22,7 @@ package org.elasticsearch.test.disruption; 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; @@ -30,7 +30,7 @@ import org.junit.Test; import java.io.IOException; -public class NetworkPartitionIT 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 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 2aa2d43aedc..9315fff0a20 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/ElasticsearchRestTestCase.java +++ b/core/src/test/java/org/elasticsearch/test/rest/ESRestTestCase.java @@ -34,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; @@ -77,12 +77,12 @@ import java.util.Set; /** * Runs the clients test suite against an elasticsearch cluster. */ -@ElasticsearchRestTestCase.Rest +@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 @@ -95,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 { } @@ -130,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/Rest0IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java index 729d8789745..e73bf347093 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest0IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 0 */ -public class Rest0IT extends ElasticsearchRestTestCase { +public class Rest0IT extends ESRestTestCase { public Rest0IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java index af11d547a12..bc80123debc 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest1IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 1 */ -public class Rest1IT extends ElasticsearchRestTestCase { +public class Rest1IT extends ESRestTestCase { public Rest1IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java index 31a4bfb0f9f..a2fb5ad9226 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest2IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 2 */ -public class Rest2IT extends ElasticsearchRestTestCase { +public class Rest2IT extends ESRestTestCase { public Rest2IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java index 48937cdd02d..7cbc974de0d 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest3IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 3 */ -public class Rest3IT extends ElasticsearchRestTestCase { +public class Rest3IT extends ESRestTestCase { public Rest3IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java index a565171059f..3910167702a 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest4IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 4 */ -public class Rest4IT extends ElasticsearchRestTestCase { +public class Rest4IT extends ESRestTestCase { public Rest4IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java index fd69bf5cca1..748b06c2c2a 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest5IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 5 */ -public class Rest5IT extends ElasticsearchRestTestCase { +public class Rest5IT extends ESRestTestCase { public Rest5IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java index 3ec543f44bd..e8fbcd4826c 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest6IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 6 */ -public class Rest6IT extends ElasticsearchRestTestCase { +public class Rest6IT extends ESRestTestCase { public Rest6IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } diff --git a/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java b/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java index 2f0b07a84d5..cf68bdb5606 100644 --- a/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java +++ b/core/src/test/java/org/elasticsearch/test/rest/Rest7IT.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.rest.parser.RestTestParseException; import java.io.IOException; /** Rest API tests subset 7 */ -public class Rest7IT extends ElasticsearchRestTestCase { +public class Rest7IT extends ESRestTestCase { public Rest7IT(@Name("yaml") RestTestCandidate testCandidate) { super(testCandidate); } 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/SuiteScopeClusterIT.java b/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java index f17542c1125..55d86aa4c9a 100644 --- a/core/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.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 SuiteScopeClusterIT 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/TestScopeClusterIT.java b/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.java index 8130a2b4be1..5233bae7c7f 100644 --- a/core/src/test/java/org/elasticsearch/test/test/TestScopeClusterIT.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 TestScopeClusterIT 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 f5dc92ba3d1..3becbd2cf49 100644 --- a/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java +++ b/core/src/test/java/org/elasticsearch/test/transport/AssertingLocalTransport.java @@ -23,7 +23,7 @@ import org.elasticsearch.Version; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.inject.Inject; 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; @@ -47,7 +47,7 @@ public class AssertingLocalTransport extends LocalTransport { @Inject public AssertingLocalTransport(Settings settings, ThreadPool threadPool, Version version) { super(settings, threadPool, version); - 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); diff --git a/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java index 1d51b26bd53..d0f1fa2027a 100644 --- a/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java +++ b/core/src/test/java/org/elasticsearch/threadpool/SimpleThreadPoolIT.java @@ -32,9 +32,9 @@ 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; @@ -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 SimpleThreadPoolIT extends ElasticsearchIntegrationTest { +public class SimpleThreadPoolIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -111,15 +111,15 @@ public class SimpleThreadPoolIT 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(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/SimpleTimestampIT.java b/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.java index ee7886174f2..3cfbd42e2e8 100644 --- a/core/src/test/java/org/elasticsearch/timestamp/SimpleTimestampIT.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 SimpleTimestampIT 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 cf70f6ad2f3..48b9e9fcc0f 100644 --- a/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java +++ b/core/src/test/java/org/elasticsearch/transport/AbstractSimpleTransportTests.java @@ -27,7 +27,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; @@ -47,7 +47,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/ActionNamesIT.java b/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.java index 89e3323219d..d3b8533d554 100644 --- a/core/src/test/java/org/elasticsearch/transport/ActionNamesIT.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 ActionNamesIT extends ElasticsearchIntegrationTest { +public class ActionNamesIT extends ESIntegTestCase { @Test @SuppressWarnings("unchecked") diff --git a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java b/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.java index 3ed7cdf18b9..ff6a21b1cef 100644 --- a/core/src/test/java/org/elasticsearch/transport/ContextAndHeaderTransportIT.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 ContextAndHeaderTransportIT 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 0002c5f46ac..71f4885e32b 100644 --- a/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java +++ b/core/src/test/java/org/elasticsearch/transport/NettySizeHeaderFrameDecoderTests.java @@ -27,7 +27,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; @@ -47,7 +47,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 6b885c21a79..e3f515b3b4e 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyScheduledPingTests.java @@ -25,7 +25,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.*; @@ -38,7 +38,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/NettyTransportIT.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java index 227f84a3494..97515ce57e5 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportIT.java @@ -32,7 +32,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; @@ -44,8 +44,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; @@ -53,7 +53,7 @@ import static org.hamcrest.Matchers.is; * */ @ClusterScope(scope = Scope.TEST, numDataNodes = 1) -public class NettyTransportIT 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/NettyTransportMultiPortIntegrationIT.java b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.java index ae6640a32da..7e883c9fb09 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortIntegrationIT.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 NettyTransportMultiPortIntegrationIT 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 016dfe4b836..55925dbd76b 100644 --- a/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java +++ b/core/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java @@ -30,7 +30,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; @@ -49,7 +49,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/tribe/TribeIT.java b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java index 9e0d1bb10fa..5b8d8f32d97 100644 --- a/core/src/test/java/org/elasticsearch/tribe/TribeIT.java +++ b/core/src/test/java/org/elasticsearch/tribe/TribeIT.java @@ -35,7 +35,7 @@ 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.junit.After; @@ -57,7 +57,7 @@ import static org.hamcrest.Matchers.notNullValue; * does it by default. */ @LuceneTestCase.SuppressFileSystems("ExtrasFS") // doesn't work with potential multi data path from test cluster yet -public class TribeIT extends ElasticsearchIntegrationTest { +public class TribeIT extends ESIntegTestCase { public static final String SECOND_CLUSTER_NODE_PREFIX = "node_tribe2"; @@ -68,7 +68,7 @@ public class TribeIT 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/SimpleTTLIT.java b/core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java index 9240e0c0e71..6c4bd969955 100644 --- a/core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.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 SimpleTTLIT extends ElasticsearchIntegrationTest { +public class SimpleTTLIT extends ESIntegTestCase { static private final long PURGE_INTERVAL = 200; diff --git a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java b/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.java index 27a9ab6c717..0c3e7de3a61 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateByNativeScriptIT.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 UpdateByNativeScriptIT extends ElasticsearchIntegrationTest { +public class UpdateByNativeScriptIT extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { diff --git a/core/src/test/java/org/elasticsearch/update/UpdateIT.java b/core/src/test/java/org/elasticsearch/update/UpdateIT.java index 5d7eb7777af..da988b8c338 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateIT.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 UpdateIT extends ElasticsearchIntegrationTest { +public class UpdateIT extends ESIntegTestCase { private void createTestIndex() throws Exception { logger.info("--> creating index test"); diff --git a/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java b/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.java index bf9031203ec..3f0b1bcc1ec 100644 --- a/core/src/test/java/org/elasticsearch/update/UpdateNoopIT.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 UpdateNoopIT 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/RenderSearchTemplateIT.java b/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.java index b4d05aeb3c4..b22dff7c761 100644 --- a/core/src/test/java/org/elasticsearch/validate/RenderSearchTemplateIT.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 RenderSearchTemplateIT 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/SimpleValidateQueryIT.java b/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.java index edfbcf04c3f..be493cd242d 100644 --- a/core/src/test/java/org/elasticsearch/validate/SimpleValidateQueryIT.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 SimpleValidateQueryIT extends ElasticsearchIntegrationTest { +public class SimpleValidateQueryIT extends ESIntegTestCase { @Test public void simpleValidateQuery() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java index 8edf2f23350..402ec0d8dc6 100644 --- a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.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 ConcurrentDocumentOperationIT extends ElasticsearchIntegrationTest { +public class ConcurrentDocumentOperationIT extends ESIntegTestCase { @Test public void concurrentOperationOnSameDocTest() throws Exception { diff --git a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java b/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.java index a1cec0cbadc..5296e763cc3 100644 --- a/core/src/test/java/org/elasticsearch/versioning/SimpleVersioningIT.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 SimpleVersioningIT extends ElasticsearchIntegrationTest { +public class SimpleVersioningIT extends ESIntegTestCase { @Test public void testExternalVersioningInitialDelete() throws Exception { 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/forbidden/test-signatures.txt b/dev-tools/src/main/resources/forbidden/test-signatures.txt index 07ebf1712eb..3cde7352618 100644 --- a/dev-tools/src/main/resources/forbidden/test-signatures.txt +++ b/dev-tools/src/main/resources/forbidden/test-signatures.txt @@ -20,3 +20,4 @@ com.carrotsearch.randomizedtesting.annotations.Repeat @ Don't commit hardcoded r 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/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/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/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/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 3b1ecb83103..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(); 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 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 14084d33a73..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,12 +23,12 @@ 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 static org.hamcrest.Matchers.notNullValue; -@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, +@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0.0, numClientNodes = 0) 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 3bb539d4e35..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,12 +23,12 @@ 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 static org.hamcrest.Matchers.notNullValue; -@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.TEST, +@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.TEST, numDataNodes = 0, transportClientRatio = 0.0, numClientNodes = 0) 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 3960cfe8a51..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 @@ -35,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; @@ -44,13 +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; @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/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/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteRestIT.java index 5e6184670c3..e3df9ce92d9 100644 --- a/plugins/site-example/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); } } From 2fe279d2a9c85dca1798002b15eefda838b89663 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 21:07:21 -0400 Subject: [PATCH 43/49] cleanup more abstract test class -> TestCase and integ -> IT --- ...VectorsTests.java => AbstractTermVectorsTestCase.java} | 2 +- .../action/termvectors/GetTermVectorsIT.java | 2 +- ...MultiTermVectorsTests.java => MultiTermVectorsIT.java} | 8 ++++---- ...AbstractTermsTests.java => AbstractTermsTestCase.java} | 2 +- .../bucket/{DoubleTermsTests.java => DoubleTermsIT.java} | 2 +- .../bucket/{LongTermsTests.java => LongTermsIT.java} | 2 +- .../bucket/{MinDocCountTests.java => MinDocCountIT.java} | 2 +- .../{ShardSizeTermsTests.java => ShardSizeTermsIT.java} | 2 +- .../bucket/{StringTermsTests.java => StringTermsIT.java} | 2 +- ...ractNumericTests.java => AbstractNumericTestCase.java} | 2 +- .../aggregations/metrics/{AvgTests.java => AvgIT.java} | 2 +- .../{ExtendedStatsTests.java => ExtendedStatsIT.java} | 2 +- ...ercentileRanksTests.java => HDRPercentileRanksIT.java} | 4 ++-- .../{HDRPercentilesTests.java => HDRPercentilesIT.java} | 4 ++-- .../aggregations/metrics/{MaxTests.java => MaxIT.java} | 2 +- .../aggregations/metrics/{MinTests.java => MinIT.java} | 2 +- .../metrics/{StatsTests.java => StatsIT.java} | 2 +- .../aggregations/metrics/{SumTests.java => SumIT.java} | 2 +- ...ntileRanksTests.java => TDigestPercentileRanksIT.java} | 4 ++-- ...estPercentilesTests.java => TDigestPercentilesIT.java} | 4 ++-- 20 files changed, 27 insertions(+), 27 deletions(-) rename core/src/test/java/org/elasticsearch/action/termvectors/{AbstractTermVectorsTests.java => AbstractTermVectorsTestCase.java} (99%) rename core/src/test/java/org/elasticsearch/action/termvectors/{MultiTermVectorsTests.java => MultiTermVectorsIT.java} (97%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{AbstractTermsTests.java => AbstractTermsTestCase.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{DoubleTermsTests.java => DoubleTermsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{LongTermsTests.java => LongTermsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{MinDocCountTests.java => MinDocCountIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{ShardSizeTermsTests.java => ShardSizeTermsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/bucket/{StringTermsTests.java => StringTermsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{AbstractNumericTests.java => AbstractNumericTestCase.java} (98%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{AvgTests.java => AvgIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{ExtendedStatsTests.java => ExtendedStatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{HDRPercentileRanksTests.java => HDRPercentileRanksIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{HDRPercentilesTests.java => HDRPercentilesIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{MaxTests.java => MaxIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{MinTests.java => MinIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{StatsTests.java => StatsIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{SumTests.java => SumIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{TDigestPercentileRanksTests.java => TDigestPercentileRanksIT.java} (99%) rename core/src/test/java/org/elasticsearch/search/aggregations/metrics/{TDigestPercentilesTests.java => TDigestPercentilesIT.java} (99%) 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 23dd7562d14..62f4dc77060 100644 --- a/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTests.java +++ b/core/src/test/java/org/elasticsearch/action/termvectors/AbstractTermVectorsTestCase.java @@ -49,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 ESIntegTestCase { +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/GetTermVectorsIT.java b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java index 41e1be82728..47031b828b3 100644 --- a/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java +++ b/core/src/test/java/org/elasticsearch/action/termvectors/GetTermVectorsIT.java @@ -62,7 +62,7 @@ import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; -public class GetTermVectorsIT 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/search/aggregations/bucket/AbstractTermsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/bucket/AbstractTermsTestCase.java similarity index 98% 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 f12e8db5cbe..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 @@ -28,7 +28,7 @@ import org.elasticsearch.test.ESIntegTestCase; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; -public abstract class AbstractTermsTests extends ESIntegTestCase { +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/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 a7791f84378..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 @@ -66,7 +66,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ESIntegTestCase.SuiteScopeTestCase -public class DoubleTermsTests extends AbstractTermsTests { +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/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 2d27ad4c7af..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 @@ -64,7 +64,7 @@ import static org.hamcrest.core.IsNull.notNullValue; * */ @ESIntegTestCase.SuiteScopeTestCase -public class LongTermsTests extends AbstractTermsTests { +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 99% 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 76b1ca5ae0a..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 @@ -54,7 +54,7 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllS @ESIntegTestCase.SuiteScopeTestCase -public class MinDocCountTests extends AbstractTermsTests { +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/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 25c7ae3df75..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 ShardSizeTestCase { +public class ShardSizeTermsIT extends ShardSizeTestCase { @Test public void noShardSize_string() throws Exception { 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 6975300338c..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 @@ -72,7 +72,7 @@ import static org.hamcrest.core.IsNull.nullValue; * */ @ESIntegTestCase.SuiteScopeTestCase -public class StringTermsTests extends AbstractTermsTests { +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/metrics/AbstractNumericTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/AbstractNumericTestCase.java similarity index 98% 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 d36a2d6f5d5..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 @@ -30,7 +30,7 @@ import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder; * */ @ESIntegTestCase.SuiteScopeTestCase -public abstract class AbstractNumericTests extends ESIntegTestCase { +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/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/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/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; } From d7cf5cd6afcd18bb3acfa34a1a15d01c5060a6ad Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 21:34:53 -0400 Subject: [PATCH 44/49] NamingConventionTests should test subclasses of ESIntegTestCase end with IT These are integration tests. --- .../org/elasticsearch/NamingConventionTests.java | 12 +++++++++++- ...pleNodesInfoTests.java => SimpleNodesInfoIT.java} | 2 +- ...bStoreFormatTests.java => BlobStoreFormatIT.java} | 2 +- .../{RepositoriesTests.java => RepositoriesIT.java} | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) rename core/src/test/java/org/elasticsearch/nodesinfo/{SimpleNodesInfoTests.java => SimpleNodesInfoIT.java} (98%) rename core/src/test/java/org/elasticsearch/snapshots/{BlobStoreFormatTests.java => BlobStoreFormatIT.java} (99%) rename core/src/test/java/org/elasticsearch/snapshots/{RepositoriesTests.java => RepositoriesIT.java} (99%) diff --git a/core/src/test/java/org/elasticsearch/NamingConventionTests.java b/core/src/test/java/org/elasticsearch/NamingConventionTests.java index 1187a1e2635..071cd256e44 100644 --- a/core/src/test/java/org/elasticsearch/NamingConventionTests.java +++ b/core/src/test/java/org/elasticsearch/NamingConventionTests.java @@ -26,6 +26,7 @@ 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.ESIntegTestCase; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.ESTokenStreamTestCase; import org.junit.Ignore; @@ -51,6 +52,7 @@ public class NamingConventionTests extends ESTestCase { 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 ESTestCase { 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)) { @@ -151,6 +160,7 @@ public class NamingConventionTests extends ESTestCase { 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()); } /* diff --git a/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java b/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java similarity index 98% rename from core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java rename to core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java index 21d292e4d63..86b1a6a4cc3 100644 --- a/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoTests.java +++ b/core/src/test/java/org/elasticsearch/nodesinfo/SimpleNodesInfoIT.java @@ -36,7 +36,7 @@ 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/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 4a16d2ff17c..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 AbstractSnapshotIntegTestCase { +public class BlobStoreFormatIT extends AbstractSnapshotIntegTestCase { private static final ParseFieldMatcher parseFieldMatcher = new ParseFieldMatcher(Settings.EMPTY); diff --git a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java similarity index 99% rename from core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java rename to core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java index ff67973a619..1ea8c68f778 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesTests.java +++ b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java @@ -48,7 +48,7 @@ import static org.hamcrest.Matchers.notNullValue; /** */ @ESIntegTestCase.ClusterScope(minNumDataNodes = 2) -public class RepositoriesTests extends AbstractSnapshotIntegTestCase { +public class RepositoriesIT extends AbstractSnapshotIntegTestCase { @Test public void testRepositoryCreation() throws Exception { From c059101fbb91786909b25ea096fbf951de607a2b Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 21:56:43 -0400 Subject: [PATCH 45/49] Fix missed test class --- .../rpm/src/test/java/org/elasticsearch/test/rest/RestIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } From 45ad47581dae5cd12965d52df33a3646d821c30d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 22:47:24 -0400 Subject: [PATCH 46/49] tone down these stress tests --- .../compress/AbstractCompressedStreamTests.java | 12 ++++++------ .../fielddata/AbstractStringFieldDataTests.java | 6 +++--- .../index/fielddata/DuelFieldDataTests.java | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) 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 62ea9b6070a..b5800f34411 100644 --- a/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java +++ b/core/src/test/java/org/elasticsearch/common/compress/AbstractCompressedStreamTests.java @@ -48,7 +48,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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); } @@ -56,7 +56,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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++) { @@ -102,7 +102,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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++) { @@ -162,7 +162,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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++) { @@ -226,7 +226,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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++) { @@ -350,7 +350,7 @@ public abstract class AbstractCompressedStreamTests extends ESTestCase { 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/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/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; From 0e0fef81b2206c893e775291c06c053293de10ee Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 23:08:18 -0400 Subject: [PATCH 47/49] Fix coverage analysis. Two versions of jacoco were being used and creating jar hell --- TESTING.asciidoc | 33 ++++++++++++++++++++++++++++----- pom.xml | 20 ++------------------ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/TESTING.asciidoc b/TESTING.asciidoc index c7c6fe34c5d..dc7ada692f5 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -81,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. @@ -145,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. @@ -246,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 @@ -262,7 +276,7 @@ REST tests use the following command: 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: @@ -319,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/pom.xml b/pom.xml index 31855078886..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 @@ -451,14 +452,6 @@ true - - - org.jacoco - org.jacoco.agent - runtime - 0.6.4.201312101107 - - @@ -1073,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 @@ -1400,15 +1393,6 @@ org.eclipse.jdt.ui.text.custom_code_templates=true - - - - org.jacoco - org.jacoco.agent - runtime - test - - false From 64850c0539a0eea60cd25283c92bfb73d676edd0 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 23:47:36 -0400 Subject: [PATCH 48/49] Improve site-example integ test to test served contents. Closes #12578 --- .../test/rest/client/RestResponse.java | 2 +- .../elasticsearch/example/SiteContentsIT.java | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java 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/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..21b31db032a --- /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 test.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")); + } + } + } +} From a0a177222be5660aa698233b883c829ccc2ccf6a Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 3 Aug 2015 23:57:27 -0400 Subject: [PATCH 49/49] fix typo in assume() when running from IDE --- .../src/test/java/org/elasticsearch/example/SiteContentsIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 21b31db032a..b873e2909b3 100644 --- a/plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java +++ b/plugins/site-example/src/test/java/org/elasticsearch/example/SiteContentsIT.java @@ -40,7 +40,7 @@ public class SiteContentsIT extends ESIntegTestCase { // 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 test.cluster pointing to a running instance", cluster instanceof ExternalTestCluster); + 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()) {