Examples of waitForInitialCreate()


Examples of org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.waitForInitialCreate()

            client.getConnectionStateListenable().addListener(listener);
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            timing.sleepABit();
            Assert.assertTrue(node.waitForInitialCreate(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS));
            server.close();
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            timing.sleepABit();
            Assert.assertTrue(timing.awaitLatch(reconnectedLatch));
View Full Code Here

Examples of org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.waitForInitialCreate()

    PersistentEphemeralNode node =
        new PersistentEphemeralNode(mZKClient, Mode.EPHEMERAL, path, new byte[0]);
    try {
      node.start();
      node.waitForInitialCreate(5, TimeUnit.SECONDS);
      Assert.assertTrue(ZooKeeperUtils.atomicRecursiveDelete(mZKClient, "/foo"));
      Thread.sleep(1000); // Give ephemeral node time to recreate itself
      Assert.assertNotNull(mZKClient.checkExists().forPath("/foo"));
    } finally {
      node.close();
View Full Code Here

Examples of org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.waitForInitialCreate()

            client.getConnectionStateListenable().addListener(listener);
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            timing.sleepABit();
            Assert.assertTrue(node.waitForInitialCreate(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS));
            server.close();
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            timing.sleepABit();
            Assert.assertTrue(timing.awaitLatch(reconnectedLatch));
View Full Code Here

Examples of org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode.waitForInitialCreate()

            client.getConnectionStateListenable().addListener(listener);
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            timing.sleepABit();
            Assert.assertTrue(node.waitForInitialCreate(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS));
            server.close();
            timing.sleepABit();
            server = new TestingServer(server.getPort());
            timing.sleepABit();
            Assert.assertTrue(timing.awaitLatch(reconnectedLatch));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.