# httpAddresses of TestCluster (ES 7.0)

**URL:** <https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697>\
**Category:** Elasticsearch\
**Created:** [November 6, 2019, 1:00am UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697 "2019-11-06T01:00:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhongchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhongchen/32/56460_2.png) [@zhongchen](https://discuss.elastic.co/u/zhongchen)\
**Post date:** [November 6, 2019, 1:00am UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/1 "2019-11-06T01:00:11Z")

</div>

the cluster method from ESIntegTestCase.java returns a TestCluster.

It seems that the behavior of the output of httpAddresses of cluster() is different between 7.0 and 6.0.

In the 7.0 version  
cluster().httpAddresses() returns 0.0.0.0:0

In the 6.0 version  
cluster().httpAddresses() returns 127.0.0.1:49753 and 127.0.0.1:49754

Is it expected?

---

<div class="post-metadata">

**Author:** ![mbrunat](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mbrunat](https://discuss.elastic.co/u/mbrunat)\
**Post date:** [November 20, 2019, 4:13pm UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/2 "2019-11-20T16:13:15Z")

</div>

I have same problem. It is because in v7 there is actually MockHttpTransport used which is reporting 0.0.0.0:0. In v6 Netty4HttpServerTransport is used. I don't know why. Which HttpServerTransport will be used is decided in InternalTestCluster.getInstances(HttpServerTransport.class) and that is somehow related to node.  
I think MockHttpTransport should not be choosed in InternalTestCluster in ESIntegTestCase.  
Someone from elasticsearch should shed some light on this.

---

<div class="post-metadata">

**Author:** ![zhongchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhongchen/32/56460_2.png) [@zhongchen](https://discuss.elastic.co/u/zhongchen)\
**Post date:** [November 20, 2019, 6:17pm UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/3 "2019-11-20T18:17:24Z")

</div>

Hi @mbrunat

After some research, I found the root issue was ES deprecated embedded cluster in ES7.0, which made all unit tests failing.

Definitely would be helpful if someone from ES could confirm this.

---

<div class="post-metadata">

**Author:** ![mbrunat](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mbrunat](https://discuss.elastic.co/u/mbrunat)\
**Post date:** [November 21, 2019, 7:54am UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/4 "2019-11-21T07:54:35Z")

</div>

Strange, either InternalTestCluster nor TestCluster is not annotated as deprecated, even in 7.4.  
Where is that information coming from?

---

<div class="post-metadata">

**Author:** ![mbrunat](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mbrunat](https://discuss.elastic.co/u/mbrunat)\
**Post date:** [November 21, 2019, 8:00am UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/5 "2019-11-21T08:00:54Z")

</div>

InternalTestCluster.buildNode prepares MockNode which newHttpTransport() method creates MockHttpTransport if plugin MockHttpTransport.TestPlugin is enabled. So solution can be to disable this plugin. I'll try ...

---

<div class="post-metadata">

**Author:** ![mbrunat](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@mbrunat](https://discuss.elastic.co/u/mbrunat)\
**Post date:** [November 21, 2019, 8:33am UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/6 "2019-11-21T08:33:54Z")

</div>

Oh, ESIntegTestCase.addMockHttpTransport() override

---

<div class="post-metadata">

**Author:** ![zhongchen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zhongchen/32/56460_2.png) [@zhongchen](https://discuss.elastic.co/u/zhongchen)\
**Post date:** [November 21, 2019, 4:43pm UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/7 "2019-11-21T16:43:21Z")

</div>

@mbrunat I read about it from some ES Github discussion. Couldn't find the post.

---

<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 19, 2019, 4:43pm UTC](https://discuss.elastic.co/t/httpaddresses-of-testcluster-es-7-0/206697/8 "2019-12-19T16:43:28Z")

</div>

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