Search in sources :

Example 1 with ZkConfig

use of com.ctrip.xpipe.zk.ZkConfig in project x-pipe by ctripcorp.

the class AbstractZkUsageTest method beforeAbstractZkUsageTest.

@Before
public void beforeAbstractZkUsageTest() throws InterruptedException {
    ZkConfig zkConfig = new DefaultZkConfig();
    client = zkConfig.create(zkAddress);
}
Also used : ZkConfig(com.ctrip.xpipe.zk.ZkConfig) DefaultZkConfig(com.ctrip.xpipe.zk.impl.DefaultZkConfig) DefaultZkConfig(com.ctrip.xpipe.zk.impl.DefaultZkConfig) Before(org.junit.Before)

Example 2 with ZkConfig

use of com.ctrip.xpipe.zk.ZkConfig in project x-pipe by ctripcorp.

the class DefaultLeaderElectorTest method beforeDefaultLeaderElectorTest.

@Before
public void beforeDefaultLeaderElectorTest() throws InterruptedException {
    zkTestServer = startRandomZk();
    ZkConfig config = new DefaultZkConfig();
    client = config.create(String.format("localhost:%d", zkTestServer.getZkPort()));
}
Also used : ZkConfig(com.ctrip.xpipe.zk.ZkConfig) DefaultZkConfig(com.ctrip.xpipe.zk.impl.DefaultZkConfig) DefaultZkConfig(com.ctrip.xpipe.zk.impl.DefaultZkConfig) Before(org.junit.Before)

Aggregations

ZkConfig (com.ctrip.xpipe.zk.ZkConfig)2 DefaultZkConfig (com.ctrip.xpipe.zk.impl.DefaultZkConfig)2 Before (org.junit.Before)2