Remove redundant wipeIndices().
This commit is contained in:
parent
e4af8c720c
commit
16cde6f10a
|
@ -61,8 +61,7 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testAliases() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
||||
|
@ -100,7 +99,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testFailedFilter() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
@ -118,7 +116,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testFilteringAliases() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
@ -151,7 +148,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSearchingFilteringAliasesSingleIndex() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
@ -226,7 +222,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSearchingFilteringAliasesTwoIndices() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test1]");
|
||||
admin().indices().create(createIndexRequest("test1")).actionGet();
|
||||
|
@ -292,7 +287,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSearchingFilteringAliasesMultipleIndices() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating indices");
|
||||
admin().indices().create(createIndexRequest("test1")).actionGet();
|
||||
|
@ -356,7 +350,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testDeletingByQueryFilteringAliases() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test1]");
|
||||
admin().indices().create(createIndexRequest("test1")).actionGet();
|
||||
|
@ -420,7 +413,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testWaitForAliasCreationMultipleShards() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
@ -436,7 +428,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testWaitForAliasCreationSingleShard() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
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 {
|
||||
final int aliasCount = 10;
|
||||
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
@ -482,7 +472,6 @@ public class IndexAliasesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSameAlias() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
logger.info("--> creating index [test]");
|
||||
createIndex("test");
|
||||
|
|
|
@ -805,8 +805,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testBasicFilterById() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
ensureGreen();
|
||||
|
||||
client().prepareIndex("test", "type1", "1").setSource(jsonBuilder().startObject()
|
||||
|
@ -839,8 +838,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testBasicQueryById() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
ensureGreen();
|
||||
|
||||
client().prepareIndex("test", "type1", "1").setSource(jsonBuilder().startObject()
|
||||
|
@ -877,8 +875,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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")
|
||||
.startObject("num_byte").field("type", "byte").endObject()
|
||||
.startObject("num_short").field("type", "short").endObject()
|
||||
|
@ -983,8 +980,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testNumericRangeFilter_2826() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
ImmutableSettings.settingsBuilder()
|
||||
.put("index.number_of_shards", 1)
|
||||
.put("index.number_of_replicas", 0)
|
||||
|
|
|
@ -37,8 +37,7 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testDeleteAllNoIndices() {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareRefresh().execute().actionGet();
|
||||
client().admin().indices().prepareRefresh().execute().actionGet();
|
||||
DeleteByQueryRequestBuilder deleteByQueryRequestBuilder = client().prepareDeleteByQuery();
|
||||
deleteByQueryRequestBuilder.setQuery(QueryBuilders.matchAllQuery());
|
||||
DeleteByQueryResponse actionGet = deleteByQueryRequestBuilder.execute().actionGet();
|
||||
|
@ -47,8 +46,7 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testDeleteAllOneIndex() {
|
||||
wipeIndices();
|
||||
|
||||
|
||||
String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}";
|
||||
|
||||
client().prepareIndex("twitter", "tweet").setSource(json).setRefresh(true).execute().actionGet();
|
||||
|
@ -70,7 +68,6 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testMissing() {
|
||||
wipeIndices();
|
||||
|
||||
String json = "{" + "\"user\":\"kimchy\"," + "\"postDate\":\"2013-01-30\"," + "\"message\":\"trying out Elastic Search\"" + "}";
|
||||
|
||||
|
@ -101,8 +98,7 @@ public class DeleteByQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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")
|
||||
.setQuery(QueryBuilders.hasChildQuery("type", QueryBuilders.matchAllQuery()))
|
||||
|
|
|
@ -158,7 +158,6 @@ public class BulkTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testBulkUpdate_malformedScripts() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(
|
||||
|
|
|
@ -204,7 +204,6 @@ public class GetActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void realtimeGetWithCompress() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
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())
|
||||
|
@ -227,7 +226,6 @@ public class GetActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void getFieldsWithDifferentTypes() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
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())
|
||||
|
@ -399,8 +397,7 @@ public class GetActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testThatGetFromTranslogShouldWorkWithExclude() throws Exception {
|
||||
wipeIndices();
|
||||
String index = "test";
|
||||
String index = "test";
|
||||
String type = "type1";
|
||||
|
||||
String mapping = jsonBuilder()
|
||||
|
@ -435,8 +432,7 @@ public class GetActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testThatGetFromTranslogShouldWorkWithInclude() throws Exception {
|
||||
wipeIndices();
|
||||
String index = "test";
|
||||
String index = "test";
|
||||
String type = "type1";
|
||||
|
||||
String mapping = jsonBuilder()
|
||||
|
@ -472,8 +468,7 @@ public class GetActionTests extends AbstractIntegrationTest {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testThatGetFromTranslogShouldWorkWithIncludeExcludeAndFields() throws Exception {
|
||||
wipeIndices();
|
||||
String index = "test";
|
||||
String index = "test";
|
||||
String type = "type1";
|
||||
|
||||
String mapping = jsonBuilder()
|
||||
|
|
|
@ -34,8 +34,7 @@ public class IgnoreIndicesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testMissing() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test1").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test1").execute().actionGet();
|
||||
ensureYellow();
|
||||
|
||||
try {
|
||||
|
@ -149,8 +148,7 @@ public class IgnoreIndicesTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testAllMissing() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test1").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test1").execute().actionGet();
|
||||
ensureYellow();
|
||||
try {
|
||||
client().prepareSearch("test2").setQuery(QueryBuilders.matchAllQuery()).setIgnoreIndices(IgnoreIndices.MISSING).execute().actionGet();
|
||||
|
|
|
@ -88,7 +88,6 @@ public class AnalyzeActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void analyzeWithNoIndex() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
AnalyzeResponse analyzeResponse = client().admin().indices().prepareAnalyze("THIS IS A TEST").setAnalyzer("simple").execute().actionGet();
|
||||
assertThat(analyzeResponse.getTokens().size(), equalTo(4));
|
||||
|
@ -100,7 +99,6 @@ public class AnalyzeActionTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void analyzerWithFieldOrTypeTests() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
||||
|
|
|
@ -49,8 +49,7 @@ public class CacheTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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().admin().indices().prepareRefresh().execute().actionGet();
|
||||
|
||||
|
@ -75,8 +74,7 @@ public class CacheTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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", "2").setSource("field", "value2", "field2", "value2").execute().actionGet();
|
||||
client().admin().indices().prepareRefresh().execute().actionGet();
|
||||
|
@ -120,8 +118,7 @@ public class CacheTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testClearAllCaches() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test")
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(ImmutableSettings.settingsBuilder()
|
||||
.put("index.number_of_replicas", 0)
|
||||
.put("index.number_of_shards", 1))
|
||||
|
|
|
@ -150,8 +150,7 @@ public class SimpleIndexStatsTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
ClusterHealthResponse clusterHealthResponse = client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
||||
|
@ -190,8 +189,7 @@ public class SimpleIndexStatsTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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("test2").execute().actionGet();
|
||||
|
||||
|
|
|
@ -253,7 +253,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
|
|||
}
|
||||
|
||||
private void noChildrenNestedDeleteByQuery(long total, int docToDelete) throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.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 {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.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()
|
||||
// This IncludeNestedDocsQuery also needs to be aware of the filter from alias
|
||||
public void testDeleteNestedDocsWithAlias() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(settingsBuilder().put("index.number_of_shards", 1).put("index.referesh_interval", -1).build())
|
||||
|
@ -561,7 +558,6 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testExplain() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.addMapping("type1", jsonBuilder().startObject().startObject("type1").startObject("properties")
|
||||
|
@ -606,8 +602,7 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSimpleNestedSorting() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test")
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(settingsBuilder()
|
||||
.put("index.number_of_shards", 1)
|
||||
.put("index.number_of_replicas", 0)
|
||||
|
@ -781,8 +776,7 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSimpleNestedSorting_withNestedFilterMissing() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test")
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.setSettings(settingsBuilder()
|
||||
.put("index.number_of_shards", 1)
|
||||
.put("index.number_of_replicas", 0)
|
||||
|
@ -871,8 +865,7 @@ public class SimpleNestedTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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))
|
||||
.addMapping("type1", XContentFactory.jsonBuilder().startObject()
|
||||
.startObject("type1")
|
||||
|
|
|
@ -265,7 +265,6 @@ public class SimpleRoutingTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testRequiredRoutingWithPathNumericType() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1")
|
||||
|
|
|
@ -52,8 +52,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute()
|
||||
.actionGet();
|
||||
|
@ -127,8 +126,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
ClusterHealthResponse healthResponse = client().admin().cluster().prepareHealth("test").setWaitForYellowStatus().execute()
|
||||
.actionGet();
|
||||
|
@ -200,7 +198,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testMultiValueCustomScriptBoost() throws ElasticSearchException, IOException {
|
||||
wipeIndices();
|
||||
|
||||
client().admin()
|
||||
.indices()
|
||||
|
@ -305,7 +302,6 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testMultiValueCustomScriptBoost_withFunctionScore() throws ElasticSearchException, IOException {
|
||||
wipeIndices();
|
||||
|
||||
client().admin()
|
||||
.indices()
|
||||
|
@ -420,8 +416,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().index(
|
||||
|
@ -529,8 +524,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().index(
|
||||
|
@ -638,8 +632,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().prepareIndex("test", "type", "1").setSource("field", "value1", "color", "red").execute().actionGet();
|
||||
|
@ -657,8 +650,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().prepareIndex("test", "type", "1").setSource("field", "value1", "color", "red").execute().actionGet();
|
||||
|
@ -678,8 +670,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().prepareIndex("test", "type", "1").setSource("field", "value1", "color", "red").execute().actionGet();
|
||||
|
@ -860,8 +851,7 @@ public class CustomScoreSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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();
|
||||
|
||||
client().prepareIndex("test", "type", "1").setSource("field", "value1", "color", "red").execute().actionGet();
|
||||
|
|
|
@ -430,8 +430,7 @@ public class GeoDistanceTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testDistanceSortingNestedFields() throws Exception {
|
||||
wipeIndices();
|
||||
String mapping = XContentFactory.jsonBuilder().startObject().startObject("company")
|
||||
String mapping = XContentFactory.jsonBuilder().startObject().startObject("company")
|
||||
.startObject("properties")
|
||||
.startObject("name").field("type", "string").endObject()
|
||||
.startObject("branches")
|
||||
|
|
|
@ -1101,8 +1101,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testBasicFilterById() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
ensureGreen();
|
||||
|
||||
client().prepareIndex("test", "type1", "1").setSource(jsonBuilder().startObject()
|
||||
|
@ -1154,8 +1153,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testBasicQueryById() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
client().admin().indices().prepareCreate("test").execute().actionGet();
|
||||
ensureGreen();
|
||||
|
||||
client().prepareIndex("test", "type1", "1").setSource(jsonBuilder().startObject()
|
||||
|
@ -1199,8 +1197,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
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")
|
||||
.startObject("num_byte").field("type", "byte").endObject()
|
||||
.startObject("num_short").field("type", "short").endObject()
|
||||
|
@ -1329,8 +1326,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testNumericRangeFilter_2826() throws Exception {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
ImmutableSettings.settingsBuilder()
|
||||
.put("index.number_of_shards", 1)
|
||||
.put("index.number_of_replicas", 0)
|
||||
|
@ -1407,8 +1403,7 @@ public class SimpleQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test // see #2926
|
||||
public void testMustNot() throws ElasticSearchException, IOException {
|
||||
wipeIndices();
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
client().admin().indices().prepareCreate("test").setSettings(
|
||||
ImmutableSettings.settingsBuilder()
|
||||
.put("index.number_of_shards", 2)
|
||||
.put("index.number_of_replicas", 0)
|
||||
|
|
|
@ -133,8 +133,7 @@ public abstract class AbstractIntegrationTest extends ElasticSearchTestCase {
|
|||
assert false : "Unknonw Scope: [" + currentClusterScope + "]";
|
||||
}
|
||||
currentCluster.beforeTest(getRandom(), Double.isNaN(TRANSPORT_CLIENT_RATIO) ? randomDouble() : TRANSPORT_CLIENT_RATIO);
|
||||
wipeIndices();
|
||||
wipeTemplates();
|
||||
wipeTemplates();
|
||||
randomIndexTemplate();
|
||||
logger.info("[{}#{}]: before test", getTestClass().getSimpleName(), getTestName());
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ public class SimpleTimestampTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSimpleTimestamp() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.addMapping("type1", XContentFactory.jsonBuilder().startObject().startObject("type1").startObject("_timestamp").field("enabled", true).field("store", "yes").endObject().endObject().endObject())
|
||||
|
|
|
@ -50,7 +50,6 @@ public class SimpleTTLTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testSimpleTTL() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test")
|
||||
.addMapping("type1", XContentFactory.jsonBuilder()
|
||||
|
|
|
@ -50,7 +50,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void simpleValidateQuery() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
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();
|
||||
|
@ -77,7 +76,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void explainValidateQuery() throws Exception {
|
||||
wipeIndices();
|
||||
|
||||
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();
|
||||
|
@ -189,7 +187,6 @@ public class SimpleValidateQueryTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void explainValidateQueryTwoNodes() throws IOException {
|
||||
wipeIndices();
|
||||
|
||||
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder()
|
||||
.put("index.number_of_shards", 1)
|
||||
|
|
Loading…
Reference in New Issue