vijayto / sshxcute

Automatically exported from code.google.com/p/sshxcute
0 stars 0 forks source link

Though connection refused test is passed #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ssh = SSHExec.getInstance(cb);  
2. as the server is down , connection refused.
3.

What is the expected output? What do you see instead?
as the connection refused test case should get failed, but throwing an 
exception as below, and test is said as passed, 

Connect fails with the following exception: com.jcraft.jsch.JSchException: 
java.net.ConnectException: Connection refused: connect
com.jcraft.jsch.JSchException: session is down
    at com.jcraft.jsch.Session.openChannel(Session.java:752)
    at net.neoremind.sshxcute.core.SSHExec.exec(SSHExec.java:164)

session is down
Return code: 0
error message: null

How can I make the test fail when connection failed.

Original issue reported on code.google.com by sujan...@gmail.com on 11 Jun 2014 at 7:44