[TEST] use existing client that is already in the cluster to wait for joining node
This commit is contained in:
parent
1493ece094
commit
9f5f11c6a2
|
@ -108,15 +108,17 @@ public class CompositeTestCluster extends TestCluster {
|
||||||
public synchronized boolean upgradeOneNode(Settings nodeSettings) throws InterruptedException, IOException {
|
public synchronized boolean upgradeOneNode(Settings nodeSettings) throws InterruptedException, IOException {
|
||||||
Collection<ExternalNode> runningNodes = runningNodes();
|
Collection<ExternalNode> runningNodes = runningNodes();
|
||||||
if (!runningNodes.isEmpty()) {
|
if (!runningNodes.isEmpty()) {
|
||||||
|
final Client existingClient = cluster.client();
|
||||||
ExternalNode externalNode = RandomPicks.randomFrom(random, runningNodes);
|
ExternalNode externalNode = RandomPicks.randomFrom(random, runningNodes);
|
||||||
externalNode.stop();
|
externalNode.stop();
|
||||||
String s = cluster.startNode(nodeSettings);
|
String s = cluster.startNode(nodeSettings);
|
||||||
ExternalNode.waitForNode(cluster.client(), s);
|
ExternalNode.waitForNode(existingClient, s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the a simple pattern that matches all "new" nodes in the cluster.
|
* Returns the a simple pattern that matches all "new" nodes in the cluster.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue