示例#1
0
 @Test
 public void testPersistNode() {
   curatorZKClient.addPersistNode("/openIM", "testOpenIm".getBytes(CharsetUtil.utf8));
   try {
     Thread.sleep(5000);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
示例#2
0
 @Test
 public void testEphemeralSequentialNode() {
   curatorZKClient.addEphemeralSequentialNode(
       "/openIM/chatServer", "testOpenIm".getBytes(CharsetUtil.utf8));
   try {
     Thread.sleep(50000);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
示例#3
0
 @Before
 public void connectZK() {
   String zkServers = "192.168.85.64:2181,192.168.85.65:2181,192.168.85.66:2181";
   curatorZKClient = new CuratorZKClient();
   curatorZKClient.connectZK(zkServers);
 }