diff --git a/src/test/java/org/elasticsearch/recovery/RelocationTests.java b/src/test/java/org/elasticsearch/recovery/RelocationTests.java index a692f998956..42fe56c8339 100644 --- a/src/test/java/org/elasticsearch/recovery/RelocationTests.java +++ b/src/test/java/org/elasticsearch/recovery/RelocationTests.java @@ -337,14 +337,14 @@ public class RelocationTests extends ElasticsearchIntegrationTest { final String indexName = "test"; ListenableFuture blueFuture = internalCluster().startNodeAsync(ImmutableSettings.builder().put("node.color", "blue").build()); - internalCluster().startNodeAsync(ImmutableSettings.builder().put("node.color", "green").build()); ListenableFuture redFuture = internalCluster().startNodeAsync(ImmutableSettings.builder().put("node.color", "red").build()); + internalCluster().startNode(ImmutableSettings.builder().put("node.color", "green").build()); + final String blueNodeName = blueFuture.get(); + final String redNodeName = redFuture.get(); ClusterHealthResponse response = client().admin().cluster().prepareHealth().setWaitForNodes(">=3").get(); assertThat(response.isTimedOut(), is(false)); - String blueNodeName = blueFuture.get(); - final String redNodeName = redFuture.get(); client().admin().indices().prepareCreate(indexName) .setSettings(