[TEST] Adapt wait_for_nodes condition for ClusterFormationTasks with tribes

Companion commit for elastic/elasticsearch#24351

Original commit: elastic/x-pack-elasticsearch@0f57eecbdb
This commit is contained in:
Yannick Welsch 2017-04-27 09:57:54 +02:00
parent 983fb95a2a
commit c6b8542758
2 changed files with 11 additions and 1 deletions

View File

@ -70,6 +70,15 @@ integTestCluster {
setting 'xpack.watcher.enabled', false
setting 'xpack.graph.enabled', false
setting 'xpack.ml.enabled', false
waitCondition = { node, ant ->
File tmpFile = new File(node.cwd, 'wait.success')
// 5 nodes: tribe + clusterOne (1 node + tribe internal node) + clusterTwo (1 node + tribe internal node)
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=5&wait_for_status=yellow",
dest: tmpFile.toString(),
ignoreerrors: true,
retries: 10)
return tmpFile.exists()
}
}
integTestRunner {

View File

@ -71,7 +71,8 @@ integTestCluster {
setting 'tribe.cluster2.xpack.ml.enabled', 'false'
waitCondition = { node, ant ->
File tmpFile = new File(node.cwd, 'wait.success')
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=1&wait_for_status=yellow",
// 5 nodes: tribe + clusterOne (1 node + tribe internal node) + clusterTwo (1 node + tribe internal node)
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=5&wait_for_status=yellow",
dest: tmpFile.toString(),
username: 'test_user',
password: 'changeme',