# Discovering dynamic port assignment

**URL:** <https://discuss.elastic.co/t/discovering-dynamic-port-assignment/137328>\
**Category:** Elasticsearch\
**Created:** [June 26, 2018, 12:23am UTC](https://discuss.elastic.co/t/discovering-dynamic-port-assignment/137328 "2018-06-26T00:23:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 26, 2018, 6:47am UTC](https://discuss.elastic.co/t/discovering-dynamic-port-assignment/137328/2 "2018-06-26T06:47:56Z")

</div>

You can not run elasticsearch embedded. Read this [blog post](https://www.elastic.co/blog/elasticsearch-the-server).

Note that to run integration tests (not unit tests) you would probably prefer running that in something close to a production environment, like a real elasticsearch server instance. I shared some ideas about integration testing in this thread: [In memory testing with RestHighLevelClient](https://discuss.elastic.co/t/in-memory-testing-with-resthighlevelclient/106196/6)

---

_[View the full topic](https://discuss.elastic.co/t/discovering-dynamic-port-assignment/137328)._
