TransportProxyClient for custom action in tests

Hi,

We have an ElasticSearch 2.2.1 plugin which defines a few actions etc.
The actions are registered with ActionModule and do work.

However, I have a test where I would like to run an action on all nodes one by one. For that I call org.elasticsearch.test.InternalTestCluster#client(java.lang.String). This call fails on NPE in TransportProxyClient#execute since there is no proxy defined for my action.

Where does the list of actions injected into TransportProxyClient come from and why isn't my action in that list? What am I missing here?

Any advice would be greatly appreciated!

Hey,

can you debug if your action is added in the TransportProxyClient ctor? When is registerActioncalled? Maybe it is to late and the TransportProxyClient has already been created? Should be easy to find out by setting a few break points.

--Alex

Thanks for your reply Alex,

Following an issue which was related, turns out I missed a method which should be added to the TestClass, ESIntegTestCase.transportClientPlugins() doing the action registering for the transport client.

BR, Baruch.