Search in sources :

Example 11 with ServerNode

use of com.questdb.net.ha.config.ServerNode in project questdb by bluestreak01.

the class ServerNodeTest method testIPv4AndPort.

@Test
public void testIPv4AndPort() {
    ServerNode node = new ServerNode(0, "192.168.1.10:8080");
    Assert.assertEquals("192.168.1.10", node.getHostname());
    Assert.assertEquals(8080, node.getPort());
}
Also used : ServerNode(com.questdb.net.ha.config.ServerNode) Test(org.junit.Test)

Example 12 with ServerNode

use of com.questdb.net.ha.config.ServerNode in project questdb by bluestreak01.

the class ServerNodeTest method testIPv6.

@Test
public void testIPv6() {
    ServerNode node = new ServerNode(0, "[fe80::5fc:43c:eef0:5b8e%3]");
    Assert.assertEquals("fe80::5fc:43c:eef0:5b8e%3", node.getHostname());
}
Also used : ServerNode(com.questdb.net.ha.config.ServerNode) Test(org.junit.Test)

Aggregations

ServerNode (com.questdb.net.ha.config.ServerNode)12 Test (org.junit.Test)9 ClientConfig (com.questdb.net.ha.config.ClientConfig)7 ServerConfig (com.questdb.net.ha.config.ServerConfig)7 AbstractTest (com.questdb.test.tools.AbstractTest)5 JournalWriter (com.questdb.store.JournalWriter)4 CountDownLatch (java.util.concurrent.CountDownLatch)4 Quote (com.questdb.model.Quote)3 JournalListener (com.questdb.store.JournalListener)3 RecordSource (com.questdb.ql.RecordSource)2 RecordSourcePrinter (com.questdb.ql.RecordSourcePrinter)2 StringSink (com.questdb.std.str.StringSink)2 JournalKey (com.questdb.store.JournalKey)2 ClusterController (com.questdb.net.ha.ClusterController)1 AbstractOnDemandSender (com.questdb.net.ha.mcast.AbstractOnDemandSender)1 OnDemandAddressPoller (com.questdb.net.ha.mcast.OnDemandAddressPoller)1 OnDemandAddressSender (com.questdb.net.ha.mcast.OnDemandAddressSender)1 Rnd (com.questdb.std.Rnd)1 JournalException (com.questdb.std.ex.JournalException)1 JournalEntryWriter (com.questdb.store.JournalEntryWriter)1