cleanup tests
This commit is contained in:
parent
977cb4a729
commit
530340fa76
|
@ -207,6 +207,7 @@ public class MinimumMasterNodesTests extends AbstractIntegrationTest {
|
|||
state = client().admin().cluster().prepareState().execute().actionGet().getState();
|
||||
assertThat(state.nodes().size(), equalTo(4));
|
||||
|
||||
createIndex("test");
|
||||
logger.info("--> indexing some data");
|
||||
for (int i = 0; i < 100; i++) {
|
||||
client().prepareIndex("test", "type1", Integer.toString(i)).setSource("field", "value").execute().actionGet();
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*
|
||||
* Licensed to ElasticSearch and Shay Banon 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.facet;
|
||||
|
||||
|
||||
/**
|
||||
* Tests for several shards case since some facets do optimizations in this case. Make sure
|
||||
* behavior remains the same.
|
||||
*/
|
||||
public class SimpleFacetsMultiShardMultiNodeTests extends SimpleFacetsTests {
|
||||
|
||||
@Override
|
||||
protected int numberOfShards() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Licensed to ElasticSearch and Shay Banon 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.facet;
|
||||
|
||||
|
||||
/**
|
||||
* Tests for several shards case since some facets do optimizations in this case. Make sure
|
||||
* behavior remains the same.
|
||||
*/
|
||||
public class SimpleFacetsMultiShardTests extends SimpleFacetsTests {
|
||||
|
||||
@Override
|
||||
protected int numberOfShards() {
|
||||
return 3;
|
||||
}
|
||||
}
|
|
@ -67,21 +67,20 @@ import static org.hamcrest.Matchers.*;
|
|||
*/
|
||||
public class SimpleFacetsTests extends AbstractIntegrationTest {
|
||||
|
||||
|
||||
private int numRuns = -1;
|
||||
@Override
|
||||
public Settings getSettings() {
|
||||
return randomSettingsBuilder()
|
||||
.put("index.number_of_shards", numberOfShards())
|
||||
.put("index.number_of_shards", between(1, 5))
|
||||
.put("index.number_of_replicas", 0)
|
||||
.build();
|
||||
}
|
||||
|
||||
protected int numberOfShards() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected int numberOfRuns() {
|
||||
return 5;
|
||||
if (numRuns == -1) {
|
||||
numRuns = atLeast(3);
|
||||
}
|
||||
return numRuns;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -790,7 +789,7 @@ public class SimpleFacetsTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testFilterFacets() throws Exception {
|
||||
createIndex("test1");
|
||||
createIndex("test");
|
||||
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().execute().actionGet();
|
||||
|
||||
client().prepareIndex("test", "type1").setSource(jsonBuilder().startObject()
|
||||
|
@ -2346,6 +2345,7 @@ public class SimpleFacetsTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test // #3479: Null pointer exception for POST mode facets if facet_filter accepts no documents
|
||||
public void testFilterFacetWithFacetFilterPostMode() throws IOException {
|
||||
createIndex("test");
|
||||
client().prepareIndex("test", "type1").setSource(jsonBuilder().startObject()
|
||||
.field("field", "xxx")
|
||||
.endObject()).execute().actionGet();
|
||||
|
|
|
@ -49,6 +49,7 @@ public class CustomSuggesterSearchTests extends AbstractIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testThatCustomSuggestersCanBeRegisteredAndWork() throws Exception {
|
||||
createIndex("test");
|
||||
client().prepareIndex("test", "test", "1").setSource(jsonBuilder()
|
||||
.startObject()
|
||||
.field("name", "arbitrary content")
|
||||
|
|
Loading…
Reference in New Issue