regression on jsch

This commit is contained in:
Adrian Cole 2010-05-07 18:31:35 -07:00
parent dcbcf698f0
commit d034a737b1
3 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,6 @@ import java.util.Map;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.google.common.base.Predicate;
import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.options.RunScriptOptions; import org.jclouds.compute.options.RunScriptOptions;
import org.jclouds.compute.util.ComputeUtils; import org.jclouds.compute.util.ComputeUtils;

View File

@ -339,7 +339,7 @@ public abstract class BaseComputeServiceLiveTest {
@Test(enabled = true, dependsOnMethods = "testGet") @Test(enabled = true, dependsOnMethods = "testGet")
public void testReboot() throws Exception { public void testReboot() throws Exception {
client.rebootNodesWithTag(tag); client.rebootNodesWithTag(tag);// TODO test validation
testGet(); testGet();
} }

View File

@ -162,11 +162,14 @@ public class JschSshClient implements SshClient {
@PostConstruct @PostConstruct
public void connect() { public void connect() {
disconnect(); disconnect();
Exception e = null;
RETRY_LOOP: for (int i = 0; i < sshRetries; i++) { RETRY_LOOP: for (int i = 0; i < sshRetries; i++) {
try { try {
newSession(); newSession();
e = null;
break RETRY_LOOP; break RETRY_LOOP;
} catch (Exception from) { } catch (Exception from) {
e = from;
disconnect(); disconnect();
String rootMessage = Throwables.getRootCause(from).getMessage(); String rootMessage = Throwables.getRootCause(from).getMessage();
if (i == sshRetries) if (i == sshRetries)
@ -190,6 +193,8 @@ public class JschSshClient implements SshClient {
throw propagate(from); throw propagate(from);
} }
} }
if (e != null)
throw propagate(e);
} }
private void newSession() throws JSchException { private void newSession() throws JSchException {