[test] wait until master actually has applied cluster state that contains second node
If we don't wait we might retrieve the cluster state before second node was added when we try to add the delegate in which the discovery node for node_2 is null.
This commit is contained in:
parent
20f757c187
commit
6ea6876839
|
@ -179,6 +179,8 @@ public class IndicesStoreIntegrationIT extends ESIntegTestCase {
|
|||
assertThat(Files.exists(indexDirectory(node_1, "test")), equalTo(true));
|
||||
|
||||
final String node_2 = internalCluster().startDataOnlyNode(Settings.builder().build());
|
||||
assertFalse(client().admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut());
|
||||
|
||||
assertThat(Files.exists(shardDirectory(node_1, "test", 0)), equalTo(true));
|
||||
assertThat(Files.exists(indexDirectory(node_1, "test")), equalTo(true));
|
||||
assertThat(Files.exists(shardDirectory(node_2, "test", 0)), equalTo(false));
|
||||
|
|
Loading…
Reference in New Issue