Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/453#discussion_r168884569
  
    --- Diff: 
src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java ---
    @@ -465,6 +470,37 @@ private void waitForAll(ZooKeeper[] zks, States state) 
throws InterruptedExcepti
         private static class Servers {
             MainThread mt[];
             ZooKeeper zk[];
    +        int[] clientPorts;
    +
    +        public void shutDownAllServers() throws InterruptedException {
    +            for (MainThread t: mt) {
    +                t.shutdown();
    +            }
    +        }
    +
    +        public void restartAllServersAndClients(Watcher watcher) throws 
IOException {
    +            for (MainThread t : mt) {
    +                if (!t.isAlive()) {
    +                    t.start();
    +                }
    +            }
    +            for (int i = 0; i < zk.length; i++) {
    +                restartClient(i, watcher);
    +            }
    +        }
    +
    +        public void restartClient(int i, Watcher watcher) throws 
IOException {
    --- End diff --
    
    annoying nitpick: let's use a better argument name than `i`


---

Reply via email to