# TransportProxyClient for custom action in tests

**URL:** <https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207>\
**Category:** Elasticsearch\
**Created:** [April 13, 2016, 7:44am UTC](https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207 "2016-04-13T07:44:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbrutman](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bbrutman](https://discuss.elastic.co/u/bbrutman)\
**Post date:** [April 13, 2016, 7:44am UTC](https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207/1 "2016-04-13T07:44:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 14, 2016, 1:52pm UTC](https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207/2 "2016-04-14T13:52:19Z")

</div>

Hey,

can you debug if your action is added in the `TransportProxyClient` ctor? When is `registerAction`called? 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

---

<div class="post-metadata">

**Author:** ![bbrutman](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@bbrutman](https://discuss.elastic.co/u/bbrutman)\
**Post date:** [May 19, 2016, 3:17pm UTC](https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207/3 "2016-05-19T15:17:12Z")

</div>

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.

---

<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:** [July 5, 2017, 10:50pm UTC](https://discuss.elastic.co/t/transportproxyclient-for-custom-action-in-tests/47207/4 "2017-07-05T22:50:23Z")

</div>


