@Override protected void setUp() throws Exception { LOG.info("STARTING " + getName()); // set the snap count to something low so that we force log rollover // and verify that is working as part of the epoch rollover. SyncRequestProcessor.setSnapCount(7); qu = new QuorumUtil(1); startAll(); for (int i = 0; i < zkClients.length; i++) { zkClientWatchers[i] = new CountdownWatcher(); PeerStruct peer = qu.getPeer(i + 1); zkClients[i] = new ZooKeeper( "127.0.0.1:" + peer.clientPort, ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]); } waitForClientsConnected(); }
@Before public void setUp() throws Exception { System.setProperty("zookeeper.admin.enableServer", "false"); // set the snap count to something low so that we force log rollover // and verify that is working as part of the epoch rollover. SyncRequestProcessor.setSnapCount(7); qu = new QuorumUtil(1); startAll(); for (int i = 0; i < zkClients.length; i++) { zkClientWatchers[i] = new CountdownWatcher(); PeerStruct peer = qu.getPeer(i + 1); zkClients[i] = new ZooKeeper( "127.0.0.1:" + peer.clientPort, ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]); } waitForClientsConnected(); }
@Override protected void setUp() throws Exception { LOG.info("STARTING " + getName()); // set the snap count to something low so that we force log rollover // and verify that is working as part of the epoch rollover. SyncRequestProcessor.setSnapCount(7); qu = new QuorumUtil(1); startAll(); for (int i = 0; i < zkClients.length; i++) { zkClientWatchers[i] = new CountdownWatcher(); int followerPort = qu.getPeer(i+1).peer.getClientPort(); zkClients[i] = new ZooKeeper( "127.0.0.1:" + followerPort, ClientTest.CONNECTION_TIMEOUT, zkClientWatchers[i]); } waitForClients(); }