Elasticsearch Java testing framework and plugins

Hi,

how can I run tests within the Elasticsearch Java testing framework which require a plugin (specifically lang-painless)?

I want to use Elasticsearch 5.4.0 but couldn't find any artifact of Painless for that version. Is there an official artifact for Painless I can pull in, like the unofficial org.codelibs.elasticsearch.module : lang-painless : 5.3.2?

painless is running on the server side. Which means that it must run within an elasticsearch node.
So you probably want to run integration tests here, right?

Yes, I want to use ESIntegTestCase.

Any hints how I could add plugins there?

The specific project is Jest and the code for Elasticsearch 5.3.0 is as follows:


I'd start an external elasticsearch cluster.

For example, have a look at the maven elasticsearch plugin which is really nice for that.

Thanks for your reply!

Does ESIntegTestCase work with an external Elasticsearch cluster?

If not, that's a change I'd like to avoid for now. Looks like it'll stay on Elasticsearch 5.3.x until there's a (third-party) artifact of lang-painless for ES 5.4.0.

It would work, if there was an official artifact for lang-painless. :wink:

As far as I see, that Maven plugin only supports spawning a single Elasticsearch node but not a whole cluster, is that correct?

Correct. May be you can open an issue so they will see if they can support this or not.
Although it's a corner case IMO as you would just expect that the cluster is acting correctly whatever the number of nodes you have.

I understand that in your case you want to test things like failover or such.