From 2cd677232905d1e1de36619dda80e368da23aac5 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 31 Mar 2014 17:57:33 +0200 Subject: [PATCH] [TEST] Set minimum_master_nodes for new node as well to make sure all ndoes have the same settings --- .../org/elasticsearch/cluster/MinimumMasterNodesTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java b/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java index dd03765d765..23bdd32679f 100644 --- a/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java +++ b/src/test/java/org/elasticsearch/cluster/MinimumMasterNodesTests.java @@ -26,6 +26,7 @@ import org.elasticsearch.client.Client; import org.elasticsearch.common.Priority; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.Discovery; +import org.elasticsearch.discovery.zen.elect.ElectMasterService; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope; @@ -281,7 +282,7 @@ public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest { assertNoMasterBlockOnAllNodes(); logger.info("--> bringing another node up"); - cluster().startNode(settings); + cluster().startNode(settingsBuilder().put(settings).put(ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES, 2).build()); clusterHealthResponse = client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForNodes("2").get(); assertThat(clusterHealthResponse.isTimedOut(), equalTo(false)); }