From dcc15a64603dd5f25cfab119cd290a3c8951abb6 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Mon, 9 Feb 2015 12:51:48 -0500 Subject: [PATCH] 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. --- .../snapshots/DedicatedClusterSnapshotRestoreTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java b/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java index a2ad49b6bae..cd3968de438 100644 --- a/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java +++ b/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java @@ -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);