Package com.xiaomi.infra.chronos.zookeeper

Examples of com.xiaomi.infra.chronos.zookeeper.HostPort


  }

  @Test
  public void testGetTimestamp() throws FatalChronosException, ChronosException, IOException,
      TException {
    ChronosImplement chronosImplement = createChronosImplement(new HostPort("127.0.0.1", 10086));

    chronosImplement.initTimestamp();
    long firstTimestamp = chronosImplement.getTimestamp();
    long secondTimestamp = chronosImplement.getTimestamp();
    Assert.assertTrue(firstTimestamp < secondTimestamp);
View Full Code Here


  }

  @Before
  public void resetZooKeeper() throws IOException, KeeperException, TTransportException,
      ChronosException {
    ChronosServer chronosServer = createChronosServer(new HostPort("127.0.0.1", 10086));
    ZooKeeperUtil.deleteNodeRecursively(chronosServer.getFailoverWatcher(), chronosServer
        .getFailoverWatcher().getBaseZnode());
    chronosServer.getFailoverWatcher().close();
  }
View Full Code Here

    return new ChronosServer(new ChronosServerWatcher(properties));
  }

  @Test
  public void testGetTimestamp() throws IOException, InterruptedException, TTransportException, ChronosException {
    final ChronosServer chronosServer = createChronosServer(new HostPort("127.0.0.1", 2187));
    Thread thread = new Thread() {
      @Override
      public void run() {
        chronosServer.run();
      }
View Full Code Here

    return new ChronosServer(new ChronosServerWatcher(properties));
  }

  @Test
  public void testGetTimestamp() throws IOException, InterruptedException, TTransportException, ChronosException {
    final ChronosServer chronosServer = createChronosServer(new HostPort("127.0.0.1", 2187));
    Thread thread = new Thread() {
      @Override
      public void run() {
        chronosServer.run();
      }
View Full Code Here

    chronosClient.getChronosClientWatcher().close();
  }
 
  @Test
  public void testGetTimestamps() throws IOException, InterruptedException, TTransportException, ChronosException {
    final ChronosServer chronosServer = createChronosServer(new HostPort("127.0.0.1", 2188));
    Thread thread = new Thread() {
      @Override
      public void run() {
        chronosServer.run();
      }
View Full Code Here

TOP

Related Classes of com.xiaomi.infra.chronos.zookeeper.HostPort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.