Test: add wait for nodes to restorePersistentSettingsTest

Sometimes by the time update settings is called the second node is not in the cluster yet. As a result change of minimum master node settings to 2 is ignored making this test to fail.
This commit is contained in:
Igor Motov 2015-02-09 12:51:48 -05:00
parent e607e53591
commit dcc15a6460

View File

@ -93,6 +93,8 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
internalCluster().startNode(nodeSettings);
Client client = client();
String secondNode = internalCluster().startNode(nodeSettings);
logger.info("--> wait for the second node to join the cluster");
assertThat(client.admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut(), equalTo(false));
int random = randomIntBetween(10, 42);