From f3d90cdb170e14e81483ab82876375558b1e138d Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Thu, 12 Jun 2014 21:26:58 +0200 Subject: [PATCH] [TEST] Remove 'index.routing.allocation.total_shards_per_node' setting in data consistency test --- .../DiscoveryWithNetworkFailuresTests.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/test/java/org/elasticsearch/discovery/DiscoveryWithNetworkFailuresTests.java b/src/test/java/org/elasticsearch/discovery/DiscoveryWithNetworkFailuresTests.java index 905b45a6595..493c18e45bf 100644 --- a/src/test/java/org/elasticsearch/discovery/DiscoveryWithNetworkFailuresTests.java +++ b/src/test/java/org/elasticsearch/discovery/DiscoveryWithNetworkFailuresTests.java @@ -21,7 +21,6 @@ package org.elasticsearch.discovery; import com.google.common.base.Predicate; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; -import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.action.get.GetResponse; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.index.IndexResponse; @@ -34,7 +33,6 @@ import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Priority; import org.elasticsearch.common.settings.ImmutableSettings; @@ -84,15 +82,6 @@ public class DiscoveryWithNetworkFailuresTests extends ElasticsearchIntegrationT return 1; } - @Override - public Settings indexSettings() { - Settings settings = super.indexSettings(); - return ImmutableSettings.builder() - .put(settings) - .put(ShardsLimitAllocationDecider.INDEX_TOTAL_SHARDS_PER_NODE, 2) - .build(); - } - @Test @TestLogging("discovery.zen:TRACE") public void failWithMinimumMasterNodesConfigured() throws Exception { @@ -234,11 +223,7 @@ public class DiscoveryWithNetworkFailuresTests extends ElasticsearchIntegrationT } }, 10, TimeUnit.SECONDS); assertThat(applied, is(true)); - - ClusterHealthResponse healthResponse = client(nonIsolatedNode).admin().cluster().prepareHealth("test") - .setWaitForYellowStatus().get(); - assertThat(healthResponse.isTimedOut(), is(false)); - assertThat(healthResponse.getStatus(), equalTo(ClusterHealthStatus.YELLOW)); + ensureStableCluster(2, nonIsolatedNode); // Reads on the right side of the split must work logger.info("verifying healthy part of cluster returns data");