Is the HighLevelRestClient no supported in the Java Testing Framework?

Hi @dg1,

the problem with running high level rest client tests against the single node created by ESSingleNodeTest isn't so much that the HLRC doesn't work in tests per se but rather that the single node started, is started without a HTTP layer. If you really want it to start up the HTTP layer as well, you'll need to override the plugins that are loaded for that node to include the Netty 4 transport and also disable the mock http layer.

The latte you can do by adding:

    @Override
    protected boolean addMockHttpTransport() {
        return false; // enable http
    }

to your test class as is done here for example (those tests use low level rest client, but HLRC will work just the same): https://github.com/elastic/elasticsearch/blob/master/modules/transport-netty4/src/test/java/org/elasticsearch/rest/discovery/Zen2RestApiIT.java

The Netty 4 plugin you can load by adding:

    @Override
    protected Collection<Class<? extends Plugin>> nodePlugins() {
        return Collections.singletonList(Netty4Plugin.class);
    }

as is done in e.g. our Netty ITs here https://github.com/elastic/elasticsearch/blob/master/modules/transport-netty4/src/test/java/org/elasticsearch/ESNetty4IntegTestCase.java#L57

Provided the dependencies are set up correctly (i.e. you have the Netty 4 transport dependency on your test class path), this should work fine (it does in some of our own tests in the linked examples).