# Recommended way of testing locally with 6.5

**URL:** <https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618>\
**Category:** Elasticsearch\
**Created:** [January 17, 2019, 11:45am UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618 "2019-01-17T11:45:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![regiskuckaertz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/regiskuckaertz/32/39877_2.png) [@regiskuckaertz](https://discuss.elastic.co/u/regiskuckaertz)\
**Post date:** [January 17, 2019, 11:45am UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618/1 "2019-01-17T11:45:06Z")

</div>

Hello. We're planning a 5.6 -\> 6.5 upgrade here and I noticed that the local transport type has been removed in the latest version. We only use it once: for integration tests, we spin up a local ES node with `transport.type` set to `local`.

May I please ask you to tell me what is the recommended way to do that moving forward? I've had a shot using `MockTcpTransportPlugin` but I'm not sure I'm doing it well as am getting loads of `transport handlers for action indices:data/write/bulk is already registered` errors.

If you had a sample code somewhere that would be extremely helpful.

Kind regards  
Regis

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 17, 2019, 12:45pm UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618/2 "2019-01-17T12:45:59Z")

</div>

[Running Elasticsearch as an embedded node is officially no longer supported](https://www.elastic.co/blog/elasticsearch-the-server) so the recommended way to do this is to start up a separate Elasticsearch process against which to run the tests. This is how much of Elasticsearch's own test suite works.

Also note that the [transport client will be deprecated](https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.6/client.html#client) in favour of the [REST client](https://www.elastic.co/blog/the-elasticsearch-java-high-level-rest-client-is-out) in a future version.

Running an embedded node can be useful for debugging Elasticsearch's internals. You can just use the normal TCP transport to talk to it, or use a REST client, or you can call `Node#client()` to get a client that talks to the node directly. No need to mock anything - indeed, the `MockTcpTransportPlugin` is removed in `master`. The `EsIntegTestCase` and `InternalTestCluster` classes work together to start embedded nodes for use in test cases, so perhaps it's useful to look there too.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 17, 2019, 1:29pm UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618/3 "2019-01-17T13:29:54Z")

</div>

Some other ideas about integration testing in this thread: [In memory testing with RestHighLevelClient](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196/6)

Also this sample project shows how to use Elasticsearch Test Classes:

> **[joel-costigliola/elastic-search-test](https://github.com/joel-costigliola/elastic-search-test)**
>
> ESIntegTestCase example. Contribute to joel-costigliola/elastic-search-test development by creating an account on GitHub.

HTH

---

<div class="post-metadata">

**Author:** ![regiskuckaertz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/regiskuckaertz/32/39877_2.png) [@regiskuckaertz](https://discuss.elastic.co/u/regiskuckaertz)\
**Post date:** [January 17, 2019, 1:53pm UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618/4 "2019-01-17T13:53:29Z")

</div>

Wow thank you both for answering so fast. That is extremely helpful!

---

<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:** [February 14, 2019, 1:53pm UTC](https://discuss.elastic.co/t/recommended-way-of-testing-locally-with-6-5/164618/5 "2019-02-14T13:53:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
