httpAddresses of TestCluster (ES 7.0)

the cluster method from 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

In the 6.0 version
cluster().httpAddresses() returns and

Is it expected?

1 Like

I have same problem. It is because in v7 there is actually MockHttpTransport used which is reporting 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.

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.

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

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 ...

Oh, ESIntegTestCase.addMockHttpTransport() override

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

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