Q:

Elasticsearch 5 create in memory node for testing

I'm migrating to Elasticsearch 5 from 2 and we have integration tests which run on build servers which do not have ES nodes available. We have used the NodeBuilder from the previous version of ES to create in memory nodes on demand, but I can't find how to do the same thing with version 5.

A:

First time posting in stack overflow, sorry if any mistake in how ask my question.
I had exactly the same problem where I start a client in memory, but I could not connect using the transport client having NoNodeAvailableException as error message.
    Settings settings = Settings.builder()
            .put("path.home", "target/elasticsearch")
            .put("transport.type", "local")
            .put("http.enabled", false)
            .build();

    node = new Node(settings).start();

Now in my test I inject node().client() to the repository and it worked.
For whole code, spring boot and ES 5 without spring-data which does not support ES 5: 
https://github.com/jomilanez/elastic5

