Search in sources :

Example 1 with NodeInfo

use of io.airlift.node.NodeInfo in project presto by prestodb.

the class TestDiscoveryNodeManager method testGetCurrentNode.

@Test
public void testGetCurrentNode() {
    Node expected = activeNodes.get(0);
    NodeInfo nodeInfo = new NodeInfo(new NodeConfig().setEnvironment("test").setNodeId(expected.getNodeIdentifier()));
    DiscoveryNodeManager manager = new DiscoveryNodeManager(selector, nodeInfo, new NoOpFailureDetector(), expectedVersion, testHttpClient);
    assertEquals(manager.getCurrentNode(), expected);
}
Also used : NoOpFailureDetector(com.facebook.presto.server.NoOpFailureDetector) NodeInfo(io.airlift.node.NodeInfo) Node(com.facebook.presto.spi.Node) NodeConfig(io.airlift.node.NodeConfig) Test(org.testng.annotations.Test)

Aggregations

NoOpFailureDetector (com.facebook.presto.server.NoOpFailureDetector)1 Node (com.facebook.presto.spi.Node)1 NodeConfig (io.airlift.node.NodeConfig)1 NodeInfo (io.airlift.node.NodeInfo)1 Test (org.testng.annotations.Test)1