client() on LocalClientProvider does not instantiate a Node
richtmat opened this issue · comments
Matthias Richter commented
I'm using elasticsearch-test in the context of CDI and in my tests I want to inject the client into my beans. I wrote a @produces method which calls esSetup.client(). My problem is that client() does not call open() to start a node. Is that intended behaviour?
In my fork I'm calling open() in client() - I can prepare a PR if you like..
Tanguy Leroux commented
Hi,
When using CDI frameworks, consider using https://github.com/tlrx/elasticsearch-test/blob/master/src/main/java/com/github/tlrx/elasticsearch/test/provider/DefaultClientProvider.java instead of LocalClientProvider. Thus you'll be able to use your own Client instance.