From 9f5f11c6a2a294716f420f2855717662219d89fb Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 4 Jul 2014 12:17:47 +0200 Subject: [PATCH] [TEST] use existing client that is already in the cluster to wait for joining node --- .../java/org/elasticsearch/test/CompositeTestCluster.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/test/CompositeTestCluster.java b/src/test/java/org/elasticsearch/test/CompositeTestCluster.java index 0d6da7205f9..21fde4ee105 100644 --- a/src/test/java/org/elasticsearch/test/CompositeTestCluster.java +++ b/src/test/java/org/elasticsearch/test/CompositeTestCluster.java @@ -108,15 +108,17 @@ public class CompositeTestCluster extends TestCluster { public synchronized boolean upgradeOneNode(Settings nodeSettings) throws InterruptedException, IOException { Collection runningNodes = runningNodes(); if (!runningNodes.isEmpty()) { + final Client existingClient = cluster.client(); ExternalNode externalNode = RandomPicks.randomFrom(random, runningNodes); externalNode.stop(); String s = cluster.startNode(nodeSettings); - ExternalNode.waitForNode(cluster.client(), s); + ExternalNode.waitForNode(existingClient, s); return true; } return false; } + /** * Returns the a simple pattern that matches all "new" nodes in the cluster. */