commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1649874 - /commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java
Date Tue, 06 Jan 2015 17:04:02 GMT
Author: sebb
Date: Tue Jan  6 17:04:01 2015
New Revision: 1649874

URL: http://svn.apache.org/r1649874
Log:
Fails on Continuum

Modified:
    commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java

Modified: commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java?rev=1649874&r1=1649873&r2=1649874&view=diff
==============================================================================
--- commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java
(original)
+++ commons/proper/net/trunk/src/test/java/org/apache/commons/net/ftp/TestConnectTimeout.java
Tue Jan  6 17:04:01 2015
@@ -17,6 +17,7 @@
 package org.apache.commons.net.ftp;
 
 import java.io.IOException;
+import java.net.ConnectException;
 import java.net.SocketException;
 import java.net.SocketTimeoutException;
 import java.net.UnknownHostException;
@@ -38,7 +39,10 @@ public class TestConnectTimeout extends
             // Connect to a valid host on a bogus port
             // TODO use a local server if possible
             client.connect("www.apache.org", 1234);
-            assertTrue("Expecting SocketTimeoutException", false);
+            fail("Expecting an Exception");
+        }
+        catch (ConnectException se) {
+            assertTrue(true);
         }
         catch (SocketTimeoutException se) {
             assertTrue(true);



Mime
View raw message