# integTestCluster waitCondition

**URL:** <https://discuss.elastic.co/t/integtestcluster-waitcondition/107272>\
**Category:** Elasticsearch\
**Created:** [November 11, 2017, 2:51pm UTC](https://discuss.elastic.co/t/integtestcluster-waitcondition/107272 "2017-11-11T14:51:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvemugunta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvemugunta/32/23908_2.png) [@jvemugunta](https://discuss.elastic.co/u/jvemugunta)\
**Post date:** [November 11, 2017, 2:51pm UTC](https://discuss.elastic.co/t/integtestcluster-waitcondition/107272/1 "2017-11-11T14:51:04Z")

</div>

integTestCluster {  
dependsOn buildZip  
setting "xpack.monitoring.enabled", "false" // monitoring depends on painless which is not available to us  
setting "xpack.ml.enabled", "false" // ml has named writeables and the check for cluster state consistency doesn't know about them  
setting "xpack.security.authc.realms.custom.order", "0"  
setting "xpack.security.authc.realms.custom.type", "custom"  
setting "xpack.security.authc.realms.custom.users.user1.password", "changeme"  
setting "xpack.security.authc.realms.custom.users.user1.roles", "superuser"  
setting "xpack.security.authc.realms.custom.users.user2.password", "changeme"  
setting "xpack.security.authc.realms.custom.users.user2.roles", "superuser"  
setting "xpack.security.authc.realms.custom.users.user3.password", "changeme"  
setting "xpack.security.authc.realms.custom.users.user3.roles", "superuser"  
setting "xpack.security.authc.realms.file.order", "1"  
setting "xpack.security.authc.realms.file.type", "file"

```
setupCommand 'installXPackPlugin',
        'bin/elasticsearch-plugin', 'install', configurations.testRuntime.filter { File file -> file.getName().equals ("x-pack-${version}.zip".toString()) }.getSingleFile().toURI().toString()
setupCommand 'setupDummyUser',
        'bin/x-pack/users', 'useradd', 'test_user', '-p', 'changeme', '-r', 'superuser'
setupCommand 'installExtension',
        'bin/x-pack/extension', 'install', 'file:' + buildZip.archivePath
waitCondition = { node, ant ->
    File tmpFile = new File(node.cwd, 'wait.success')
    **ant.get(src: "http://${node.httpUri()}",**

```

\*\* dest: tmpFile.toString(),\*\*  
\*\* username: 'test\_user',\*\*  
\*\* password: 'changeme',\*\*  
\*\* ignoreerrors: true,\*\*  
\*\* retries: 10)\*\*  
return tmpFile.exists()  
}

is there a way to pass HTTP custom header in the ant get call? The documentation of the ant tasks says we can't pass HTTP headers. What are the other options other than ant get?

appreciate your help

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [November 17, 2017, 6:03pm UTC](https://discuss.elastic.co/t/integtestcluster-waitcondition/107272/2 "2017-11-17T18:03:19Z")

</div>

You'll need to craft your own http call, using a java http lib. The `waitCondition` closure just needs to return `true` or `false`, the logic is up to the implementor.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 15, 2017, 6:03pm UTC](https://discuss.elastic.co/t/integtestcluster-waitcondition/107272/3 "2017-12-15T18:03:25Z")

</div>

Closed on December 15, 2017, 6:03pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
