mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
Check cluster health in integration test wait condition
With this commit we do not check only if an endpoint is up but we also check that the cluster status is green. Previously, builds sporadically failed to pass this condition.
This commit is contained in:
parent
03087cfc47
commit
871b38afcb
@ -57,12 +57,10 @@ class ClusterConfiguration {
|
||||
@Input
|
||||
Closure waitCondition = { NodeInfo node, AntBuilder ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.echo(message: "[${LocalDateTime.now()}] Waiting for elasticsearch node ${node.httpUri()}", level: "info")
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=${numNodes}",
|
||||
dest: tmpFile.toString(),
|
||||
ignoreerrors: true, // do not fail on error, so logging buffers can be flushed by the wait task
|
||||
retries: 10)
|
||||
ant.echo(message: "[${LocalDateTime.now()}] Finished waiting for elasticsearch node ${node.httpUri()}. Reachable? ${tmpFile.exists()}", level: "info")
|
||||
return tmpFile.exists()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user