Package org.apache.curator.framework.state

Examples of org.apache.curator.framework.state.ConnectionState


            );
            client.start();

            client.checkExists().forPath("/");

            ConnectionState state = states.poll(timing.forWaiting().milliseconds(), TimeUnit.MILLISECONDS);
            Assert.assertEquals(state, ConnectionState.READ_ONLY);
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here


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

            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            Assert.assertFalse(firstListenerAction.get());
            ConnectionState firstconnectionState = firstListenerState.get();
            Assert.assertEquals(firstconnectionState, ConnectionState.CONNECTED, "First listener state MUST BE CONNECTED but is " + firstconnectionState);
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

            client.getConnectionStateListenable().addListener(listener);
            client.start();

            client.create().inBackground().forPath("/");

            ConnectionState polled = queue.poll(timing.forWaiting().seconds(), TimeUnit.SECONDS);
            Assert.assertEquals(polled, ConnectionState.LOST);
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

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

            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            Assert.assertFalse(firstListenerAction.get());
            ConnectionState firstconnectionState = firstListenerState.get();
            Assert.assertEquals(firstconnectionState, ConnectionState.CONNECTED, "First listener state MUST BE CONNECTED but is " + firstconnectionState);
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

            client.getConnectionStateListenable().addListener(listener);
            client.start();

            client.create().inBackground().forPath("/");

            ConnectionState polled = queue.poll(timing.forWaiting().seconds(), TimeUnit.SECONDS);
            Assert.assertEquals(polled, ConnectionState.SUSPENDED);
            polled = queue.poll(timing.forWaiting().seconds(), TimeUnit.SECONDS);
            Assert.assertEquals(polled, ConnectionState.LOST);
        }
        finally
View Full Code Here

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

            Assert.assertTrue(timing.awaitLatch(connectedLatch));
            Assert.assertFalse(firstListenerAction.get());
            ConnectionState firstconnectionState = firstListenerState.get();
            Assert.assertEquals(firstconnectionState, ConnectionState.CONNECTED, "First listener state MUST BE CONNECTED but is " + firstconnectionState);
        }
        finally
        {
            CloseableUtils.closeQuietly(client);
View Full Code Here

TOP

Related Classes of org.apache.curator.framework.state.ConnectionState

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.