Add printing timestamp to wait condition for elasticsearch nodes

This commit is contained in:
Ryan Ernst 2016-01-12 11:15:11 -08:00
parent d7d3e5d441
commit cde5bb88b1
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,8 @@ import org.gradle.api.Project
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.Input
import java.time.LocalDateTime
/** Configuration for an elasticsearch cluster, used for integration tests. */
class ClusterConfiguration {
@ -55,6 +57,7 @@ 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", level: "info")
ant.get(src: "http://${node.httpUri()}",
dest: tmpFile.toString(),
ignoreerrors: true, // do not fail on error, so logging buffers can be flushed by the wait task