Remove redundant wipeIndices().

This commit is contained in:
Andrew Raines 2013-09-23 15:02:58 -05:00
parent e4af8c720c
commit 16cde6f10a
18 changed files with 36 additions and 100 deletions

View File

@ -61,7 +61,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testAliases() throws Exception { public void testAliases() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -100,7 +99,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testFailedFilter() throws Exception { public void testFailedFilter() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -118,7 +116,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testFilteringAliases() throws Exception { public void testFilteringAliases() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -151,7 +148,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testSearchingFilteringAliasesSingleIndex() throws Exception { public void testSearchingFilteringAliasesSingleIndex() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -226,7 +222,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testSearchingFilteringAliasesTwoIndices() throws Exception { public void testSearchingFilteringAliasesTwoIndices() throws Exception {
wipeIndices();
logger.info("--> creating index [test1]"); logger.info("--> creating index [test1]");
admin().indices().create(createIndexRequest("test1")).actionGet(); admin().indices().create(createIndexRequest("test1")).actionGet();
@ -292,7 +287,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testSearchingFilteringAliasesMultipleIndices() throws Exception { public void testSearchingFilteringAliasesMultipleIndices() throws Exception {
wipeIndices();
logger.info("--> creating indices"); logger.info("--> creating indices");
admin().indices().create(createIndexRequest("test1")).actionGet(); admin().indices().create(createIndexRequest("test1")).actionGet();
@ -356,7 +350,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testDeletingByQueryFilteringAliases() throws Exception { public void testDeletingByQueryFilteringAliases() throws Exception {
wipeIndices();
logger.info("--> creating index [test1]"); logger.info("--> creating index [test1]");
admin().indices().create(createIndexRequest("test1")).actionGet(); admin().indices().create(createIndexRequest("test1")).actionGet();
@ -420,7 +413,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testWaitForAliasCreationMultipleShards() throws Exception { public void testWaitForAliasCreationMultipleShards() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -436,7 +428,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testWaitForAliasCreationSingleShard() throws Exception { public void testWaitForAliasCreationSingleShard() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
admin().indices().create(createIndexRequest("test").settings(settingsBuilder().put("index.numberOfReplicas", 0).put("index.numberOfShards", 1))).actionGet(); admin().indices().create(createIndexRequest("test").settings(settingsBuilder().put("index.numberOfReplicas", 0).put("index.numberOfShards", 1))).actionGet();
@ -453,7 +444,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
public void testWaitForAliasSimultaneousUpdate() throws Exception { public void testWaitForAliasSimultaneousUpdate() throws Exception {
final int aliasCount = 10; final int aliasCount = 10;
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");
@ -482,7 +472,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
@Test @Test
public void testSameAlias() throws Exception { public void testSameAlias() throws Exception {
wipeIndices();
logger.info("--> creating index [test]"); logger.info("--> creating index [test]");
createIndex("test"); createIndex("test");

View File

@ -805,7 +805,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testBasicFilterById() throws Exception { public void testBasicFilterById() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").execute().actionGet(); client().admin().indices().prepareCreate("test").execute().actionGet();
ensureGreen(); ensureGreen();
@ -839,7 +838,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testBasicQueryById() throws Exception { public void testBasicQueryById() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").execute().actionGet(); client().admin().indices().prepareCreate("test").execute().actionGet();
ensureGreen(); ensureGreen();
@ -877,7 +875,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testNumericTermsAndRanges() throws Exception { public void testNumericTermsAndRanges() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)) client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1))
.addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties") .addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties")
.startObject("num_byte").field("type", "byte").endObject() .startObject("num_byte").field("type", "byte").endObject()
@ -983,7 +980,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testNumericRangeFilter_2826() throws Exception { public void testNumericRangeFilter_2826() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings( client().admin().indices().prepareCreate("test").setSettings(
ImmutableSettings.settingsBuilder() ImmutableSettings.settingsBuilder()
.put("index.number_of_shards", 1) .put("index.number_of_shards", 1)

View File

@ -37,7 +37,6 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testDeleteAllNoIndices() { public void testDeleteAllNoIndices() {
wipeIndices();
client().admin().indices().prepareRefresh().execute().actionGet(); client().admin().indices().prepareRefresh().execute().actionGet();
DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery(); DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery();
deleteByQueryRequestBuilder.setQuery(QueryBuilders.matchAllQuery()); deleteByQueryRequestBuilder.setQuery(QueryBuilders.matchAllQuery());
@ -47,7 +46,6 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testDeleteAllOneIndex() { public void testDeleteAllOneIndex() {
wipeIndices();
String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}"; String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}";
@ -70,7 +68,6 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testMissing() { public void testMissing() {
wipeIndices();
String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}"; String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}";
@ -101,7 +98,6 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testFailure() throws Exception { public void testFailure() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("twitter").execute().actionGet(); client().admin().indices().prepareCreate("twitter").execute().actionGet();
DeleteByQueryResponse response = client().prepareDeleteByQuery("twitter") DeleteByQueryResponse response = client().prepareDeleteByQuery("twitter")

View File

@ -158,7 +158,6 @@ public class BulkTests extends AbstractIntegrationTest {
@Test @Test
public void testBulkUpdate_malformedScripts() throws Exception { public void testBulkUpdate_malformedScripts() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings( .setSettings(

View File

@ -204,7 +204,6 @@ public class GetActionTests extends AbstractIntegrationTest {
@Test @Test
public void realtimeGetWithCompress() throws Exception { public void realtimeGetWithCompress() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1)) client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1))
.addMapping("type", jsonBuilder().startObject().startObject("type").startObject("_source").field("compress", true).endObject().endObject().endObject()) .addMapping("type", jsonBuilder().startObject().startObject("type").startObject("_source").field("compress", true).endObject().endObject().endObject())
@ -227,7 +226,6 @@ public class GetActionTests extends AbstractIntegrationTest {
@Test @Test
public void getFieldsWithDifferentTypes() throws Exception { public void getFieldsWithDifferentTypes() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1)) client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1))
.addMapping("type1", jsonBuilder().startObject().startObject("type").startObject("_source").field("enabled", true).endObject().endObject().endObject()) .addMapping("type1", jsonBuilder().startObject().startObject("type").startObject("_source").field("enabled", true).endObject().endObject().endObject())
@ -399,7 +397,6 @@ public class GetActionTests extends AbstractIntegrationTest {
@Test @Test
public void testThatGetFromTranslogShouldWorkWithExclude() throws Exception { public void testThatGetFromTranslogShouldWorkWithExclude() throws Exception {
wipeIndices();
String index = "test"; String index = "test";
String type = "type1"; String type = "type1";
@ -435,7 +432,6 @@ public class GetActionTests extends AbstractIntegrationTest {
@Test @Test
public void testThatGetFromTranslogShouldWorkWithInclude() throws Exception { public void testThatGetFromTranslogShouldWorkWithInclude() throws Exception {
wipeIndices();
String index = "test"; String index = "test";
String type = "type1"; String type = "type1";
@ -472,7 +468,6 @@ public class GetActionTests extends AbstractIntegrationTest {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Test @Test
public void testThatGetFromTranslogShouldWorkWithIncludeExcludeAndFields() throws Exception { public void testThatGetFromTranslogShouldWorkWithIncludeExcludeAndFields() throws Exception {
wipeIndices();
String index = "test"; String index = "test";
String type = "type1"; String type = "type1";

View File

@ -34,7 +34,6 @@ public class IgnoreIndicesTests extends AbstractIntegrationTest {
@Test @Test
public void testMissing() throws Exception { public void testMissing() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test1").execute().actionGet(); client().admin().indices().prepareCreate("test1").execute().actionGet();
ensureYellow(); ensureYellow();
@ -149,7 +148,6 @@ public class IgnoreIndicesTests extends AbstractIntegrationTest {
@Test @Test
public void testAllMissing() throws Exception { public void testAllMissing() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test1").execute().actionGet(); client().admin().indices().prepareCreate("test1").execute().actionGet();
ensureYellow(); ensureYellow();
try { try {

View File

@ -88,7 +88,6 @@ public class AnalyzeActionTests extends AbstractIntegrationTest {
@Test @Test
public void analyzeWithNoIndex() throws Exception { public void analyzeWithNoIndex() throws Exception {
wipeIndices();
AnalyzeResponse analyzeResponse = client().admin().indices().prepareAnalyze("THIS IS A TEST").setAnalyzer("simple").execute().actionGet(); AnalyzeResponse analyzeResponse = client().admin().indices().prepareAnalyze("THIS IS A TEST").setAnalyzer("simple").execute().actionGet();
assertThat(analyzeResponse.getTokens().size(), equalTo(4)); assertThat(analyzeResponse.getTokens().size(), equalTo(4));
@ -100,7 +99,6 @@ public class AnalyzeActionTests extends AbstractIntegrationTest {
@Test @Test
public void analyzerWithFieldOrTypeTests() throws Exception { public void analyzerWithFieldOrTypeTests() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").execute().actionGet(); client().admin().indices().prepareCreate("test").execute().actionGet();
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet(); client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();

View File

@ -49,7 +49,6 @@ public class CacheTests extends AbstractIntegrationTest {
@Test @Test
public void testClearCacheFilterKeys() { public void testClearCacheFilterKeys() {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet(); client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepareIndex("test", "type", "1").setSource("field", "value").execute().actionGet(); client().prepareIndex("test", "type", "1").setSource("field", "value").execute().actionGet();
client().admin().indices().prepareRefresh().execute().actionGet(); client().admin().indices().prepareRefresh().execute().actionGet();
@ -75,7 +74,6 @@ public class CacheTests extends AbstractIntegrationTest {
@Test @Test
public void testFieldDataStats() { public void testFieldDataStats() {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet(); client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepareIndex("test", "type", "1").setSource("field", "value1", "field2", "value1").execute().actionGet(); client().prepareIndex("test", "type", "1").setSource("field", "value1", "field2", "value1").execute().actionGet();
client().prepareIndex("test", "type", "2").setSource("field", "value2", "field2", "value2").execute().actionGet(); client().prepareIndex("test", "type", "2").setSource("field", "value2", "field2", "value2").execute().actionGet();
@ -120,7 +118,6 @@ public class CacheTests extends AbstractIntegrationTest {
@Test @Test
public void testClearAllCaches() throws Exception { public void testClearAllCaches() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(ImmutableSettings.settingsBuilder() .setSettings(ImmutableSettings.settingsBuilder()
.put("index.number_of_replicas", 0) .put("index.number_of_replicas", 0)

View File

@ -150,7 +150,6 @@ public class SimpleIndexStatsTests extends AbstractIntegrationTest {
@Test @Test
public void testMergeStats() { public void testMergeStats() {
wipeIndices();
// rely on 1 replica for this tests // rely on 1 replica for this tests
client().admin().indices().prepareCreate("test1").execute().actionGet(); client().admin().indices().prepareCreate("test1").execute().actionGet();
@ -190,7 +189,6 @@ public class SimpleIndexStatsTests extends AbstractIntegrationTest {
@Test @Test
public void testAllFlags() throws Exception { public void testAllFlags() throws Exception {
wipeIndices();
// rely on 1 replica for this tests // rely on 1 replica for this tests
client().admin().indices().prepareCreate("test1").execute().actionGet(); client().admin().indices().prepareCreate("test1").execute().actionGet();
client().admin().indices().prepareCreate("test2").execute().actionGet(); client().admin().indices().prepareCreate("test2").execute().actionGet();

View File

@ -253,7 +253,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
} }
private void noChildrenNestedDeleteByQuery(long total, int docToDelete) throws Exception { private void noChildrenNestedDeleteByQuery(long total, int docToDelete) throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.referesh_interval", -1).build()) .setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.referesh_interval", -1).build())
@ -374,7 +373,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
} }
private void testFacets(int numberOfShards) throws Exception { private void testFacets(int numberOfShards) throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(settingsBuilder().put("index.number_of_shards", numberOfShards)) .setSettings(settingsBuilder().put("index.number_of_shards", numberOfShards))
@ -497,7 +495,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
// When IncludeNestedDocsQuery is wrapped in a FilteredQuery then a in-finite loop occurs b/c of a bug in IncludeNestedDocsQuery#advance() // When IncludeNestedDocsQuery is wrapped in a FilteredQuery then a in-finite loop occurs b/c of a bug in IncludeNestedDocsQuery#advance()
// This IncludeNestedDocsQuery also needs to be aware of the filter from alias // This IncludeNestedDocsQuery also needs to be aware of the filter from alias
public void testDeleteNestedDocsWithAlias() throws Exception { public void testDeleteNestedDocsWithAlias() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.referesh_interval", -1).build()) .setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.referesh_interval", -1).build())
@ -561,7 +558,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
@Test @Test
public void testExplain() throws Exception { public void testExplain() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties") .addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties")
@ -606,7 +602,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
@Test @Test
public void testSimpleNestedSorting() throws Exception { public void testSimpleNestedSorting() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(settingsBuilder() .setSettings(settingsBuilder()
.put("index.number_of_shards", 1) .put("index.number_of_shards", 1)
@ -781,7 +776,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
@Test @Test
public void testSimpleNestedSorting_withNestedFilterMissing() throws Exception { public void testSimpleNestedSorting_withNestedFilterMissing() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(settingsBuilder() .setSettings(settingsBuilder()
.put("index.number_of_shards", 1) .put("index.number_of_shards", 1)
@ -871,7 +865,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
@Test @Test
public void testSortNestedWithNestedFilter() throws Exception { public void testSortNestedWithNestedFilter() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1).put("index.number_of_replicas", 0)) .setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1).put("index.number_of_replicas", 0))
.addMapping("type1", XContentFactory.jsonBuilder().startObject() .addMapping("type1", XContentFactory.jsonBuilder().startObject()

View File

@ -265,7 +265,6 @@ public class SimpleRoutingTests extends AbstractIntegrationTest {
@Test @Test
public void testRequiredRoutingWithPathNumericType() throws Exception { public void testRequiredRoutingWithPathNumericType() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1") .addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1")

View File

@ -52,7 +52,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testScoreExplainBug_2283() throws Exception { public void testScoreExplainBug_2283() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute() ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute()
@ -127,7 +126,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testScoreExplainBug_2283_withFunctionScore() throws Exception { public void testScoreExplainBug_2283_withFunctionScore() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute() ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute()
@ -200,7 +198,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testMultiValueCustomScriptBoost() throws ElasticSearchException, IOException { public void testMultiValueCustomScriptBoost() throws ElasticSearchException, IOException {
wipeIndices();
client().admin() client().admin()
.indices() .indices()
@ -305,7 +302,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testMultiValueCustomScriptBoost_withFunctionScore() throws ElasticSearchException, IOException { public void testMultiValueCustomScriptBoost_withFunctionScore() throws ElasticSearchException, IOException {
wipeIndices();
client().admin() client().admin()
.indices() .indices()
@ -420,7 +416,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testCustomScriptBoost() throws Exception { public void testCustomScriptBoost() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
@ -529,7 +524,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testCustomScriptBoost_withFunctionScore() throws Exception { public void testCustomScriptBoost_withFunctionScore() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
@ -638,7 +632,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testTriggerBooleanScorer() throws Exception { public void testTriggerBooleanScorer() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
@ -657,7 +650,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testTriggerBooleanScorer_withFunctionScore() throws Exception { public void testTriggerBooleanScorer_withFunctionScore() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
@ -678,7 +670,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testCustomFiltersScore() throws Exception { public void testCustomFiltersScore() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();
@ -860,7 +851,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
@Test @Test
public void testCustomFiltersScore_withFunctionScore() throws Exception { public void testCustomFiltersScore_withFunctionScore() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute() client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute()
.actionGet(); .actionGet();

View File

@ -430,7 +430,6 @@ public class GeoDistanceTests extends AbstractIntegrationTest {
@Test @Test
public void testDistanceSortingNestedFields() throws Exception { public void testDistanceSortingNestedFields() throws Exception {
wipeIndices();
String mapping = XContentFactory.jsonBuilder().startObject().startObject("company") String mapping = XContentFactory.jsonBuilder().startObject().startObject("company")
.startObject("properties") .startObject("properties")
.startObject("name").field("type", "string").endObject() .startObject("name").field("type", "string").endObject()

View File

@ -1101,7 +1101,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testBasicFilterById() throws Exception { public void testBasicFilterById() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").execute().actionGet(); client().admin().indices().prepareCreate("test").execute().actionGet();
ensureGreen(); ensureGreen();
@ -1154,7 +1153,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testBasicQueryById() throws Exception { public void testBasicQueryById() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").execute().actionGet(); client().admin().indices().prepareCreate("test").execute().actionGet();
ensureGreen(); ensureGreen();
@ -1199,7 +1197,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testNumericTermsAndRanges() throws Exception { public void testNumericTermsAndRanges() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)) client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1))
.addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties") .addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties")
.startObject("num_byte").field("type", "byte").endObject() .startObject("num_byte").field("type", "byte").endObject()
@ -1329,7 +1326,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test @Test
public void testNumericRangeFilter_2826() throws Exception { public void testNumericRangeFilter_2826() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings( client().admin().indices().prepareCreate("test").setSettings(
ImmutableSettings.settingsBuilder() ImmutableSettings.settingsBuilder()
.put("index.number_of_shards", 1) .put("index.number_of_shards", 1)
@ -1407,7 +1403,6 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
@Test // see #2926 @Test // see #2926
public void testMustNot() throws ElasticSearchException, IOException { public void testMustNot() throws ElasticSearchException, IOException {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings( client().admin().indices().prepareCreate("test").setSettings(
ImmutableSettings.settingsBuilder() ImmutableSettings.settingsBuilder()
.put("index.number_of_shards", 2) .put("index.number_of_shards", 2)

View File

@ -133,7 +133,6 @@ public abstract class AbstractIntegrationTest extends ElasticSearchTestCase {
assert false : "Unknonw Scope: [" + currentClusterScope + "]"; assert false : "Unknonw Scope: [" + currentClusterScope + "]";
} }
currentCluster.beforeTest(getRandom(), Double.isNaN(TRANSPORT_CLIENT_RATIO) ? randomDouble() : TRANSPORT_CLIENT_RATIO); currentCluster.beforeTest(getRandom(), Double.isNaN(TRANSPORT_CLIENT_RATIO) ? randomDouble() : TRANSPORT_CLIENT_RATIO);
wipeIndices();
wipeTemplates(); wipeTemplates();
randomIndexTemplate(); randomIndexTemplate();
logger.info("[{}#{}]: before test", getTestClass().getSimpleName(), getTestName()); logger.info("[{}#{}]: before test", getTestClass().getSimpleName(), getTestName());

View File

@ -33,7 +33,6 @@ public class SimpleTimestampTests extends AbstractIntegrationTest {
@Test @Test
public void testSimpleTimestamp() throws Exception { public void testSimpleTimestamp() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").startObject("_timestamp").field("enabled", true).field("store", "yes").endObject().endObject().endObject()) .addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").startObject("_timestamp").field("enabled", true).field("store", "yes").endObject().endObject().endObject())

View File

@ -50,7 +50,6 @@ public class SimpleTTLTests extends AbstractIntegrationTest {
@Test @Test
public void testSimpleTTL() throws Exception { public void testSimpleTTL() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test") client().admin().indices().prepareCreate("test")
.addMapping("type1", XContentFactory.jsonBuilder() .addMapping("type1", XContentFactory.jsonBuilder()

View File

@ -50,7 +50,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
@Test @Test
public void simpleValidateQuery() throws Exception { public void simpleValidateQuery() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet(); client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet(); client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
@ -77,7 +76,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
@Test @Test
public void explainValidateQuery() throws Exception { public void explainValidateQuery() throws Exception {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet(); client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet(); client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
@ -189,7 +187,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
@Test @Test
public void explainValidateQueryTwoNodes() throws IOException { public void explainValidateQueryTwoNodes() throws IOException {
wipeIndices();
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder() client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder()
.put("index.number_of_shards", 1) .put("index.number_of_shards", 1)