Package org.elasticsearch.node.service

Examples of org.elasticsearch.node.service.NodeService.info()


    @Test
    public void testNoHttpServerAvailable() throws Exception {
        NodeService nodeService = mock(NodeService.class);
        NodeInfo nodeInfo = mock(NodeInfo.class);
        when(nodeService.info()).thenReturn(nodeInfo);
        when(nodeInfo.getHttp()).thenReturn(null);


        NodePortExpression nodePortExpression = new NodePortExpression(nodeService);
        Object value = nodePortExpression.getChildImplementation(NodePortExpression.HTTP).value();
View Full Code Here


            ProcessStats processStats = mock(ProcessStats.class);
            when(nodeStats.getProcess()).thenReturn(processStats);
            when(processStats.getOpenFileDescriptors()).thenReturn(42L);

            NodeInfo nodeInfo = mock(NodeInfo.class);
            when(nodeService.info()).thenReturn(nodeInfo);

            ProcessInfo processInfo = mock(ProcessInfo.class);
            when(nodeInfo.getProcess()).thenReturn(processInfo);
            when(processInfo.getMaxFileDescriptors()).thenReturn(1000L);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.