try {
final SshConnection sshConnection = SshConnectionFactory.getConnection(
gerritHostName,
gerritSshPort,
gerritProxy,
new Authentication(file, gerritUserName, password));
ExecutorService service = Executors.newFixedThreadPool(THREADS_FOR_TEST_CONNECTION);
Future<Integer> future = service.submit(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return sshConnection.executeCommandReader(GerritConnection.CMD_STREAM_EVENTS).read();