# Potential issue when testing plugins using ElasticsearchIntegrationTest?

**URL:** <https://discuss.elastic.co/t/potential-issue-when-testing-plugins-using-elasticsearchintegrationtest/34810>\
**Category:** Elasticsearch\
**Created:** [November 17, 2015, 2:03pm UTC](https://discuss.elastic.co/t/potential-issue-when-testing-plugins-using-elasticsearchintegrationtest/34810 "2015-11-17T14:03:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaran](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@Jaran](https://discuss.elastic.co/u/Jaran)\
**Post date:** [November 17, 2015, 2:03pm UTC](https://discuss.elastic.co/t/potential-issue-when-testing-plugins-using-elasticsearchintegrationtest/34810/1 "2015-11-17T14:03:50Z")

</div>

Hi,

I've come across a potential issue when writing an integration test for one of our plugins using the ElasticsearchIntegrationTest class. This is in version 1.7.3.

When a plugin tries to make a request to Elasticsearch, it will receive an error due to the assert in org.elasticsearch.transport.Transports which is checking if the current thread is a transport thread.

I have created a github repo which demonstrates the issue: [https://github.com/jaranflaath/es-plugin-integrationtest](https://github.com/jaranflaath/es-plugin-integrationtest)

Running the PluginTest will reproduce the situation.

I am not certain if this is an issue in Elasticsearch, or an issue with the way we try to test our plugin, so any input is welcome.

Thanks!

---

<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, 11:37pm UTC](https://discuss.elastic.co/t/potential-issue-when-testing-plugins-using-elasticsearchintegrationtest/34810/2 "2017-07-05T23:37:57Z")

</div>

Closed on July 5, 2017, 11:37pm UTC


