Test: Make ant log for wait condition quieter by default (#21385)

This change simply makes the level of the ant timestamp for waiting on
the integ test cluster echo at the info level instead of warn (the
default) so that it is only output when running with gradle --info, or
when the wait condition fails.
This commit is contained in:
Ryan Ernst 2016-11-08 13:21:57 -08:00 committed by GitHub
parent 4f5a934d92
commit 40a6f46c13
1 changed files with 4 additions and 2 deletions

View File

@ -104,11 +104,13 @@ class ClusterConfiguration {
@Input @Input
Closure waitCondition = { NodeInfo node, AntBuilder ant -> Closure waitCondition = { NodeInfo node, AntBuilder ant ->
File tmpFile = new File(node.cwd, 'wait.success') File tmpFile = new File(node.cwd, 'wait.success')
ant.echo("==> [${new Date()}] checking health: http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow") String waitUrl = "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow"
ant.echo(message: "==> [${new Date()}] checking health: ${waitUrl}",
level: 'info')
// checking here for wait_for_nodes to be >= the number of nodes because its possible // checking here for wait_for_nodes to be >= the number of nodes because its possible
// this cluster is attempting to connect to nodes created by another task (same cluster name), // this cluster is attempting to connect to nodes created by another task (same cluster name),
// so there will be more nodes in that case in the cluster state // so there will be more nodes in that case in the cluster state
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow", ant.get(src: waitUrl,
dest: tmpFile.toString(), dest: tmpFile.toString(),
ignoreerrors: true, // do not fail on error, so logging buffers can be flushed by the wait task ignoreerrors: true, // do not fail on error, so logging buffers can be flushed by the wait task
retries: 10) retries: 10)