Search in sources :

Example 1 with NodeConfig

use of com.facebook.airlift.node.NodeConfig in project presto by prestodb.

the class TestDiscoveryNodeManager method testGetCurrentNode.

@Test
public void testGetCurrentNode() {
    NodeInfo nodeInfo = new NodeInfo(new NodeConfig().setEnvironment("test").setNodeId(currentNode.getNodeIdentifier()));
    DiscoveryNodeManager manager = new DiscoveryNodeManager(selector, nodeInfo, new NoOpFailureDetector(), Optional.empty(), expectedVersion, testHttpClient, new TestingDriftClient<>(), internalCommunicationConfig);
    try {
        assertEquals(manager.getCurrentNode(), currentNode);
    } finally {
        manager.stop();
    }
}
Also used : NoOpFailureDetector(com.facebook.presto.failureDetector.NoOpFailureDetector) NodeInfo(com.facebook.airlift.node.NodeInfo) NodeConfig(com.facebook.airlift.node.NodeConfig) Test(org.testng.annotations.Test)

Aggregations

NodeConfig (com.facebook.airlift.node.NodeConfig)1 NodeInfo (com.facebook.airlift.node.NodeInfo)1 NoOpFailureDetector (com.facebook.presto.failureDetector.NoOpFailureDetector)1 Test (org.testng.annotations.Test)1