Elasticsearch 5 creates a node in memory for testing

I am switching to Elasticsearch 5 of 2, and we have integration tests that run on build servers that do not have ES nodes available. We used NodeBuilder from a previous version of ES to create on-demand memory nodes, but I cannot find how to do the same with version 5.

+4
source share
2 answers

The first message in the stack overflow, sorry if there is any error in how to ask my question.

I had exactly the same problem when I started the client in memory, but I could not connect using the transport client having NoNodeAvailableException as an 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();

node(). client() , .

spring boot ES 5 spring -data, ES 5: https://github.com/jomilanez/elastic5

+3

NodeBuilder API ES 5, , "transport.type" "local" node

new Node(settings).start().client()

+1

Source: https://habr.com/ru/post/1659415/


All Articles