camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1403978 - in /camel/branches/camel-2.9.x: ./ components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java
Date Wed, 31 Oct 2012 04:50:14 GMT
Author: bvahdat
Date: Wed Oct 31 04:50:14 2012
New Revision: 1403978

URL: http://svn.apache.org/viewvc?rev=1403978&view=rev
Log:
Merged revisions 1403975 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1403975 | bvahdat | 2012-10-31 05:48:10 +0100 (Mi, 31 Okt 2012) | 9 lines
  
  Merged revisions 1403971 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1403971 | bvahdat | 2012-10-31 05:29:45 +0100 (Mi, 31 Okt 2012) | 1 line
    
    Polished.
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1403971
  Merged /camel/branches/camel-2.10.x:r1403975

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java?rev=1403978&r1=1403977&r2=1403978&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerDisconnectTest.java
Wed Oct 31 04:50:14 2012
@@ -17,9 +17,6 @@
 package org.apache.camel.component.file.remote;
 
 import org.apache.camel.builder.RouteBuilder;
-
-import org.apache.commons.net.ftp.FTPClient;
-
 import org.junit.Test;
 
 public class FtpConsumerDisconnectTest extends FtpServerTestSupport {
@@ -34,7 +31,7 @@ public class FtpConsumerDisconnectTest e
         
         // force the singleton FtpEndpoint to make use of a custom FTPClient
         FtpEndpoint<?> endpoint = context.getEndpoint(getFtpUrl(), FtpEndpoint.class);
-        endpoint.setFtpClient(new FTPClient());
+        endpoint.setFtpClient(endpoint.createFtpClient());
 
         sendFile(getFtpUrl(), "Hello World", "claus.txt");
     }
@@ -54,14 +51,13 @@ public class FtpConsumerDisconnectTest e
         getMockEndpoint("mock:result").expectedMessageCount(1);
         assertMockEndpointsSatisfied();
 
-        // give time for ftp consumer to disconnect (delay is 5000 which is long enough to
avoid a second poll cycle)
+        // give time for ftp consumer to disconnect (delay is 5000 ms which is long enough
to avoid a second poll cycle)
         Thread.sleep(2000);
 
         FtpEndpoint<?> endpoint = context.getEndpoint(getFtpUrl(), FtpEndpoint.class);
+        assertFalse("The FTPClient should be already disconnected", endpoint.getFtpClient().isConnected());
         assertTrue("The FtpEndpoint is configured to disconnect after each poll", endpoint.isDisconnect());
 
-        FTPClient ftpClient = endpoint.getFtpClient();
-        assertFalse("The FTPClient should not be connected", ftpClient.isConnected());
     }
 
 }
\ No newline at end of file



Mime
View raw message