[TEST] Set minimum_master_nodes for new node as well to make sure all ndoes have the same settings
This commit is contained in:
parent
5553c383bc
commit
2cd6772329
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue