Examples of receiveConnection()


Examples of org.apache.zookeeper.server.quorum.QuorumCnxManager.receiveConnection()

       
        Socket sock = new Socket();
        sock.connect(peers.get(new Long(1)).electionAddr, 5000);
        long begin = System.currentTimeMillis();
        // Read without sending data. Verify timeout.
        cnxManager.receiveConnection(sock);
        long end = System.currentTimeMillis();
        if((end - begin) > ((peer.getSyncLimit() * peer.getTickTime()) + 500)) Assert.fail("Waited more than necessary");
    }

    /*
 
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumCnxManager.receiveConnection()

       
        Socket sock = new Socket();
        sock.connect(peers.get(new Long(1)).electionAddr, 5000);
        long begin = System.currentTimeMillis();
        // Read without sending data. Verify timeout.
        cnxManager.receiveConnection(sock);
        long end = System.currentTimeMillis();
        if((end - begin) > ((peer.getSyncLimit() * peer.getTickTime()) + 500)) Assert.fail("Waited more than necessary");
    }

    /*
 
View Full Code Here

Examples of org.apache.zookeeper.server.quorum.QuorumCnxManager.receiveConnection()

        Socket sock = new Socket();
        sock.connect(peers.get(1L).electionAddr, 5000);
        long begin = System.currentTimeMillis();
        // Read without sending data. Verify timeout.
        cnxManager.receiveConnection(sock);
        long end = System.currentTimeMillis();
        if((end - begin) > ((peer.getSyncLimit() * peer.getTickTime()) + 500)) Assert.fail("Waited more than necessary");
        cnxManager.halt();
        Assert.assertFalse(cnxManager.listener.isAlive());
    }
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.