You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error:No signature of method: static org.elasticsearch.client.RestClient.builder() is applicable for argument types: (org.testcontainers.shaded.org.apache.http.HttpHost)
In the following code, container.getHost() is not usable in the Elasticsearch RestClient.builder(...) because you are using a shaded dependency:
Hi @forgo,
thanks a lot for your detailed issue description.
The shading issue is a duplicate of #958 and is fixed by #959.
I have to look into the generics issue, thanks for pointing this out as well.
I checked it out, you are right, thanks.
kiview
changed the title
Shaded HttpHost in ElasticsearchContainer not usable in RestClient
ElasticsearchContainer doesn't implement generics for GenericContainer methods
Nov 7, 2018
Versions used:
1.10.0
5.5.3
Error:
No signature of method: static org.elasticsearch.client.RestClient.builder() is applicable for argument types: (org.testcontainers.shaded.org.apache.http.HttpHost)
In the following code,
container.getHost()
is not usable in the ElasticsearchRestClient.builder(...)
because you are using a shaded dependency:org.testcontainers.shaded.org.apache.http.HttpHost
Of course, I could just do as I was before
1.10.0
andElasticsearchContainer
:This defeats the utility of your new module and the
getHost()
method and forces me to assume the default port set byElasticsearchContainer
.I will also point out that I do not have the ability to supply additional configuration with
ElasticsearchContainer
as you might expect or want:If I attempt to extend the container configuration with
.withEnv("ES_JAVA_OPTS", "-Xms1g -Xmx1g")
, for example, I get the following problem:Cannot assign 'GenericContainer' to 'ElasticsearchContainer'
The text was updated successfully, but these errors were encountered: