private void restartServer(Map<String, String> authConfigs, int index,
ZooKeeper zk, CountdownWatcher watcher) throws IOException,
KeeperException, InterruptedException, TimeoutException {
LOG.info("Restarting server myid=" + index);
MainThread m = shutdown(index);
startServer(m, authConfigs);
Assert.assertTrue("waiting for server" + index + "being up",
ClientBase.waitForServerUp("127.0.0.1:" + m.getClientPort(),
ClientBase.CONNECTION_TIMEOUT));
watcher.waitForConnected(ClientTest.CONNECTION_TIMEOUT);
zk.create("/foo", new byte[0], Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT_SEQUENTIAL);
}
}