[TEST] Set minimum_master_nodes for new node as well to make sure all ndoes have the same settings

This commit is contained in:
Simon Willnauer 2014-03-31 17:57:33 +02:00
parent 5553c383bc
commit 2cd6772329
1 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ import org.elasticsearch.client.Client;
import org.elasticsearch.common.Priority; import org.elasticsearch.common.Priority;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.discovery.Discovery; import org.elasticsearch.discovery.Discovery;
import org.elasticsearch.discovery.zen.elect.ElectMasterService;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope; import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
@ -281,7 +282,7 @@ public class MinimumMasterNodesTests extends ElasticsearchIntegrationTest {
assertNoMasterBlockOnAllNodes(); assertNoMasterBlockOnAllNodes();
logger.info("--> bringing another node up"); 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(); clusterHealthResponse = client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForNodes("2").get();
assertThat(clusterHealthResponse.isTimedOut(), equalTo(false)); assertThat(clusterHealthResponse.isTimedOut(), equalTo(false));
} }