NodeBuilder.local(true) question

Hi All,
can someone give me a hint how to fix the following junit test:

I try to connect to a local node, but I always get "No node available
exception".

Hi,

when using local node there is no access point exposed to the public. In
other words you can not use TransportClient to connect to a node that is
running locally.

Either use local(false) [I can not recommend this for unit test] or get
client from node using node.client() [I would say that is the way to go for unit tests].

Regards,
Lukas

On Sun, Nov 27, 2011 at 9:27 PM, Ridvan Gyundogan ridvansg@gmail.comwrote:

Hi All,
can someone give me a hint how to fix the following junit test:
JUnit test connecting to local ES node · GitHub

I try to connect to a local node, but I always get "No node available
exception".

Thanks very very much Lukas, will try with node.client(); .

On Nov 27, 11:36 pm, Lukáš Vlček lukas.vl...@gmail.com wrote:

Hi,

when using local node there is no access point exposed to the public. In
other words you can not use TransportClient to connect to a node that is
running locally.

Either use local(false) [I can not recommend this for unit test] or get
client from node using node.client() [I would say that is the way to go for unit tests].

Regards,
Lukas

On Sun, Nov 27, 2011 at 9:27 PM, Ridvan Gyundogan ridva...@gmail.comwrote:

Hi All,
can someone give me a hint how to fix the following junit test:
JUnit test connecting to local ES node · GitHub

I try to connect to a local node, but I always get "No node available
exception".