Github user hanm commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/628#discussion_r221389580
--- Diff: src/java/test/org/apache/zookeeper/server/util/PortForwarder.java
---
@@ -29,62 +26,15 @@
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- * A utility that does bi-directional forwarding between two ports.
- * Useful, for example, to simulate network failures.
- * Example:
- *
- * Server 1 config file:
- *
- * server.1=127.0.0.1:7301:7401;8201
- * server.2=127.0.0.1:7302:7402;8202
- * server.3=127.0.0.1:7303:7403;8203
- *
- * Server 2 and 3 config files:
- *
- * server.1=127.0.0.1:8301:8401;8201
- * server.2=127.0.0.1:8302:8402;8202
- * server.3=127.0.0.1:8303:8403;8203
- *
- * Initially forward traffic between 730x and 830x and between 740x and
830x
- * This way server 1 can communicate with servers 2 and 3
- * ....
- *
- * List<PortForwarder> pfs = startForwarding();
- * ....
- * // simulate a network interruption for server 1
- * stopForwarding(pfs);
- * ....
- * // restore connection
- * pfs = startForwarding();
- *
- *
- * private List<PortForwarder> startForwarding() throws IOException {
- * List<PortForwarder> res = new ArrayList<PortForwarder>();
- * res.add(new PortForwarder(8301, 7301));
- * res.add(new PortForwarder(8401, 7401));
- * res.add(new PortForwarder(7302, 8302));
- * res.add(new PortForwarder(7402, 8402));
- * res.add(new PortForwarder(7303, 8303));
- * res.add(new PortForwarder(7403, 8403));
- * return res;
- * }
- *
- * private void stopForwarding(List<PortForwarder> pfs) throws Exception {
- * for (PortForwarder pf : pfs) {
- * pf.shutdown();
- * }
- * }
- *
- *
- */
--- End diff --
is there a reason that these comments were removed ?
---