Examples of blockUntilConnected()


Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

            });

            client.start();

            Assert.assertTrue(timing.awaitLatch(connectedLatch), "Timed out awaiting latch");
            Assert.assertTrue(client.blockUntilConnected(1, TimeUnit.SECONDS), "Not connected");
        }
        catch ( InterruptedException e )
        {
            Assert.fail("Unexpected interruption");
        }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

            build();

        try
        {
            client.start();
            Assert.assertTrue(client.blockUntilConnected(5, TimeUnit.SECONDS), "Not connected");
        }
        catch ( InterruptedException e )
        {
            Assert.fail("Unexpected interruption");
        }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

        try
        {
            client.start();

            //Block until we're connected
            Assert.assertTrue(client.blockUntilConnected(5, TimeUnit.SECONDS), "Failed to connect");

            //Kill the server
            CloseableUtils.closeQuietly(server);

            //Wait until we hit the lost state
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

            //Wait until we hit the lost state
            Assert.assertTrue(timing.awaitLatch(lostLatch), "Failed to reach LOST state");

            server = new TestingServer(server.getPort(), server.getTempDirectory());

            Assert.assertTrue(client.blockUntilConnected(5, TimeUnit.SECONDS), "Not connected");
        }
        catch ( Exception e )
        {
            Assert.fail("Unexpected exception " + e);
        }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

            build();

        try
        {
            client.start();
            Assert.assertFalse(client.blockUntilConnected(5, TimeUnit.SECONDS), "Connected");
        }
        catch ( InterruptedException e )
        {
            Assert.fail("Unexpected interruption");
        }
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

                {
                    threadToInterrupt.interrupt();
                }
            }, 3000);

            client.blockUntilConnected(5, TimeUnit.SECONDS);
            Assert.fail("Expected interruption did not occur");
        }
        catch ( InterruptedException e )
        {
            //This is expected
View Full Code Here

Examples of org.apache.curator.framework.CuratorFramework.blockUntilConnected()

        String connectString = server.getConnectString();

        CuratorFramework client = CuratorFrameworkFactory.newClient(connectString, 50, 50, new NoRetryPolicy());
        try {
            client.start();
            client.blockUntilConnected(30, SECONDS);
            String basePath = "/test";
            setDataInZookeperServer(client, basePath, "thanks", "welcome");
            setDataInZookeperServer(client, basePath, "greetings", "hi,bonjour,hiya,hi!");
        } finally {
            client.close();
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.