From 3512860956aa28cfd10125299709fb1863342865 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Wed, 28 Jan 2015 00:22:01 +0100 Subject: [PATCH] Test: always use replicas in testClusterInfoServiceInformationClearOnError It assume the local node always has a shard --- .../org/elasticsearch/cluster/ClusterInfoServiceTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java b/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java index 3eeb405fadb..e43ce9525e1 100644 --- a/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java +++ b/src/test/java/org/elasticsearch/cluster/ClusterInfoServiceTests.java @@ -29,6 +29,7 @@ import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsAction; import org.elasticsearch.action.admin.indices.stats.IndicesStatsAction; import org.elasticsearch.action.support.ActionFilter; import org.elasticsearch.action.support.ActionFilters; +import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.Strings; import org.elasticsearch.common.inject.Inject; @@ -181,7 +182,7 @@ public class ClusterInfoServiceTests extends ElasticsearchIntegrationTest { // manually control publishing ImmutableSettings.builder().put(InternalClusterInfoService.INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL, "60m").build()) .get(); - createIndex("test"); + prepareCreate("test").setSettings(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 1).get(); ensureGreen("test"); InternalTestCluster internalTestCluster = internalCluster(); InternalClusterInfoService infoService = (InternalClusterInfoService) internalTestCluster.getInstance(ClusterInfoService.class, internalTestCluster.getMasterName());