Package org.apache.zookeeper.server

Examples of org.apache.zookeeper.server.NIOServerCnxnFactory.join()



        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    @Test
    public void testJoinBeforeConnect() throws Exception {
        int port = findFreePort();
View Full Code Here



        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    @Test
    public void testRejoinAfterDisconnect() throws Exception {
        int port = findFreePort();
View Full Code Here

        curator.getZookeeperClient().blockUntilConnectedOrTimedOut();
        assertTrue(groupCondition.waitForConnected(5, TimeUnit.SECONDS));
        assertTrue(groupCondition.waitForMaster(5, TimeUnit.SECONDS));

        cnxnFactory.shutdown();
        cnxnFactory.join();

        groupCondition.waitForDisconnected(5, TimeUnit.SECONDS);
        group.remove(groupCondition);

        assertFalse(group.isConnected());
View Full Code Here


        group.close();
        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    //Tests that if close() is executed right after start(), there are no left over entries.
    //(see  https://github.com/jboss-fuse/fuse/issues/133)
    @Test
View Full Code Here

            assertTrue(entries.isEmpty());
        }

        curator.close();
        cnxnFactory.shutdown();
        cnxnFactory.join();
    }

    private class GroupCondition implements GroupListener<NodeState> {
        private CountDownLatch connected = new CountDownLatch(1);
        private CountDownLatch master = new CountDownLatch(1);
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.