Author: bvahdat
Date: Fri Aug 17 18:25:41 2012
New Revision: 1374387

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

................
  r1374384 | bvahdat | 2012-08-17 20:22:16 +0200 (Fr, 17 Aug 2012) | 9 lines
  
  Merged revisions 1374110 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1374110 | bvahdat | 2012-08-17 02:16:28 +0200 (Fr, 17 Aug 2012) | 1 line
    
    CAMEL-5514: Fixed the broken unit-tests by camel-ftp, cleaned up the 
duplicated logic in case of the missing "SunX509" algorithm by 
SftpServerTestSupport (CAMEL-4084). Also removed the @Ignore tag to see how the 
next build would go on the CI-Server.
  ........
................

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/sftp/SftpChmodTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpConsumeTemplateTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProduceTempFileTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathNoStepwiseTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSetCipherTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteNotStepwiseTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeNotStepwiseTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveNotStepwiseTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceNotStepwiseTest.java
    
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceTest.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1374110
  Merged /camel/branches/camel-2.10.x:r1374384

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/sftp/SftpChmodTest.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/sftp/SftpChmodTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpChmodTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpChmodTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,13 +19,11 @@ package org.apache.camel.component.file.
 import java.io.File;
 
 import org.apache.camel.Exchange;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpChmodTest extends SftpServerTestSupport {
 
     @Override

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpConsumeTemplateTest.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/sftp/SftpConsumeTemplateTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpConsumeTemplateTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpConsumeTemplateTest.java
 Fri Aug 17 18:25:41 2012
@@ -17,13 +17,11 @@
 package org.apache.camel.component.file.remote.sftp;
 
 import org.apache.camel.Exchange;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpConsumeTemplateTest extends SftpServerTestSupport {
 
     @Override

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProduceTempFileTest.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/sftp/SftpProduceTempFileTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProduceTempFileTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProduceTempFileTest.java
 Fri Aug 17 18:25:41 2012
@@ -20,13 +20,11 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.util.FileUtil;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpProduceTempFileTest extends SftpServerTestSupport {
 
     @Override

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathNoStepwiseTest.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/sftp/SftpProducerFileWithPathNoStepwiseTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathNoStepwiseTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathNoStepwiseTest.java
 Fri Aug 17 18:25:41 2012
@@ -20,13 +20,11 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpProducerFileWithPathNoStepwiseTest extends 
SftpServerTestSupport {
 
     private String getFtpUrl() {

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathTest.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/sftp/SftpProducerFileWithPathTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpProducerFileWithPathTest.java
 Fri Aug 17 18:25:41 2012
@@ -20,13 +20,11 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpProducerFileWithPathTest extends SftpServerTestSupport {
 
     private String getFtpUrl() {

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.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/sftp/SftpServerTestSupport.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java
 Fri Aug 17 18:25:41 2012
@@ -17,9 +17,6 @@
 package org.apache.camel.component.file.remote.sftp;
 
 import java.security.NoSuchAlgorithmException;
-import java.security.Provider;
-import java.security.Provider.Service;
-import java.security.Security;
 import java.util.Arrays;
 
 import org.apache.camel.component.file.remote.BaseServerTestSupport;
@@ -47,27 +44,10 @@ public class SftpServerTestSupport exten
     @Before
     public void setUp() throws Exception {
         deleteDirectory(FTP_ROOT_DIR);
+        super.setUp();
 
-        
-        
-        canTest = false;
-        for (Provider p : Security.getProviders()) {
-            for (Service s : p.getServices()) {
-                if ("SunX509".equalsIgnoreCase(s.getAlgorithm())) {
-                    canTest = true;
-                }
-            }
-        }
-        if (!canTest) {
-            String name = System.getProperty("java.vendor");
-            System.out.println("SunX509 is not avail on this jdk [" + name + 
"] Testing is skipped!");
-            return;
-        }
-        canTest = false;
-        
+        canTest = true;
         try {
-            super.setUp();
-
             sshd = SshServer.setUpDefaultServer();
             sshd.setPort(getPort());
             sshd.setKeyPairProvider(new FileKeyPairProvider(new 
String[]{"src/test/resources/hostkey.pem"}));
@@ -75,21 +55,17 @@ public class SftpServerTestSupport exten
             sshd.setCommandFactory(new ScpCommandFactory());
             sshd.setPasswordAuthenticator(new MyPasswordAuthenticator());
             sshd.start();
-
         } catch (Exception e) {
             // ignore if algorithm is not on the OS
             NoSuchAlgorithmException nsae = 
ObjectHelper.getException(NoSuchAlgorithmException.class, e);
             if (nsae != null) {
                 canTest = false;
-                String name = System.getProperty("os.name");
-                System.out.println("SunX509 is not avail on this platform [" + 
name + "] Testing is skipped! Real cause: " + nsae.getMessage());
+                log.warn("SunX509 is not avail on this platform [{0}] Testing 
is skipped! Real cause: {1}", System.getProperty("os.name"), nsae.getMessage());
             } else {
                 // some other error then throw it so the test can fail
                 throw e;
             }
         }
-
-        canTest = true;
     }
 
     @Override

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSetCipherTest.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/sftp/SftpSetCipherTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSetCipherTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSetCipherTest.java
 Fri Aug 17 18:25:41 2012
@@ -20,13 +20,11 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.file.remote.SftpEndpoint;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSetCipherTest extends SftpServerTestSupport {
 
     @Override

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteNotStepwiseTest.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/sftp/SftpSimpleConsumeAbsoluteNotStepwiseTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteNotStepwiseTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteNotStepwiseTest.java
 Fri Aug 17 18:25:41 2012
@@ -17,12 +17,10 @@
 package org.apache.camel.component.file.remote.sftp;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeAbsoluteNotStepwiseTest extends 
SftpSimpleConsumeAbsoluteTest {
 
     @Override
@@ -30,7 +28,8 @@ public class SftpSimpleConsumeAbsoluteNo
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/tmp/mytemp?username=admin&password=admin&delay=10s&disconnect=true&stepwise=false")
+                // we must remember to use // slash because of the url 
separator
+                from("sftp://localhost:"; + getPort() + "//" + 
createAbsolutePath() + 
"?username=admin&password=admin&delay=10s&disconnect=true&stepwise=false")
                     .routeId("foo").noAutoStartup()
                     .to("mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteTest.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/sftp/SftpSimpleConsumeAbsoluteTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeAbsoluteTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,15 +19,23 @@ package org.apache.camel.component.file.
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeAbsoluteTest extends SftpServerTestSupport {
 
+    protected static String createAbsolutePath() {
+        String answer = System.getProperty("user.dir") + "/" + FTP_ROOT_DIR + 
"/tmp/mytemp";
+
+        if (isPlatform("windows")) {
+            answer = answer.replace('\\', '/');
+        }
+
+        return answer;
+    }
+
     @Test
     public void testSftpSimpleConsumeAbsolute() throws Exception {
         if (!canTest()) {
@@ -36,13 +44,12 @@ public class SftpSimpleConsumeAbsoluteTe
 
         String expected = "Hello World";
 
-        // FTP Server does not support absolute path, so lets simulate it
-        String path = FTP_ROOT_DIR + "/tmp/mytemp";
-        template.sendBodyAndHeader("file:" + path, expected, 
Exchange.FILE_NAME, "hello.txt");
+        template.sendBodyAndHeader("file:" + createAbsolutePath(), expected, 
Exchange.FILE_NAME, "hello.txt");
 
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);
-        mock.expectedHeaderReceived(Exchange.FILE_NAME, "hello.txt");
+        mock.expectedBodiesReceived(expected);
+        mock.expectedHeaderReceived(Exchange.FILE_NAME_ONLY, "hello.txt");
 
         context.startRoute("foo");
 
@@ -54,7 +61,8 @@ public class SftpSimpleConsumeAbsoluteTe
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/tmp/mytemp?username=admin&password=admin&delay=10s&disconnect=true")
+                // we must remember to use // slash because of the url 
separator
+                from("sftp://localhost:"; + getPort() + "//" + 
createAbsolutePath()  + 
"?username=admin&password=admin&delay=10s&disconnect=true")
                     .routeId("foo").noAutoStartup()
                     .to("mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeNotStepwiseTest.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/sftp/SftpSimpleConsumeNotStepwiseTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeNotStepwiseTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeNotStepwiseTest.java
 Fri Aug 17 18:25:41 2012
@@ -17,12 +17,10 @@
 package org.apache.camel.component.file.remote.sftp;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeNotStepwiseTest extends SftpSimpleConsumeTest {
 
     @Override
@@ -30,7 +28,7 @@ public class SftpSimpleConsumeNotStepwis
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin&delay=10s&disconnect=true&stepwise=false")
+                from("sftp://localhost:"; + getPort() + "/" + FTP_ROOT_DIR + 
"?username=admin&password=admin&delay=10s&disconnect=true&stepwise=false")
                     .routeId("foo").noAutoStartup()
                     .to("mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveNotStepwiseTest.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/sftp/SftpSimpleConsumeRecursiveNotStepwiseTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveNotStepwiseTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveNotStepwiseTest.java
 Fri Aug 17 18:25:41 2012
@@ -17,12 +17,10 @@
 package org.apache.camel.component.file.remote.sftp;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Ignore;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeRecursiveNotStepwiseTest extends 
SftpSimpleConsumeRecursiveTest {
 
     @Override
@@ -30,7 +28,7 @@ public class SftpSimpleConsumeRecursiveN
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin&delay=10s&disconnect=true&recursive=true&stepwise=false")
+                from("sftp://localhost:"; + getPort() + "/" + FTP_ROOT_DIR + 
"?username=admin&password=admin&delay=10s&disconnect=true&recursive=true&stepwise=false")
                     .routeId("foo").noAutoStartup()
                     .to("log:result", "mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveTest.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/sftp/SftpSimpleConsumeRecursiveTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeRecursiveTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,13 +19,11 @@ package org.apache.camel.component.file.
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeRecursiveTest extends SftpServerTestSupport {
 
     @Test
@@ -53,7 +51,7 @@ public class SftpSimpleConsumeRecursiveT
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin&delay=10s&disconnect=true&recursive=true")
+                from("sftp://localhost:"; + getPort() + "/" + FTP_ROOT_DIR + 
"?username=admin&password=admin&delay=10s&disconnect=true&recursive=true")
                     .routeId("foo").noAutoStartup()
                     .to("log:result", "mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeTest.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/sftp/SftpSimpleConsumeTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleConsumeTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,13 +19,11 @@ package org.apache.camel.component.file.
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleConsumeTest extends SftpServerTestSupport {
 
     @Test
@@ -53,7 +51,7 @@ public class SftpSimpleConsumeTest exten
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin&delay=10s&disconnect=true")
+                from("sftp://localhost:"; + getPort() + "/" + FTP_ROOT_DIR + 
"?username=admin&password=admin&delay=10s&disconnect=true")
                     .routeId("foo").noAutoStartup()
                     .to("mock:result");
             }

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceNotStepwiseTest.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/sftp/SftpSimpleProduceNotStepwiseTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceNotStepwiseTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceNotStepwiseTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,13 +19,11 @@ package org.apache.camel.component.file.
 import java.io.File;
 
 import org.apache.camel.Exchange;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleProduceNotStepwiseTest extends SftpServerTestSupport {
 
     @Override
@@ -39,7 +37,7 @@ public class SftpSimpleProduceNotStepwis
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin&stepwise=false", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "?username=admin&password=admin&stepwise=false", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
 
         File file = new File(FTP_ROOT_DIR + "/hello.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -52,7 +50,7 @@ public class SftpSimpleProduceNotStepwis
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/mysub?username=admin&password=admin&stepwise=false", "Bye World", 
Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "/mysub?username=admin&password=admin&stepwise=false", "Bye 
World", Exchange.FILE_NAME, "bye.txt");
 
         File file = new File(FTP_ROOT_DIR + 
"/mysub/bye.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -65,7 +63,7 @@ public class SftpSimpleProduceNotStepwis
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/mysub/myother?username=admin&password=admin&stepwise=false", 
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "/mysub/myother?username=admin&password=admin&stepwise=false", 
             "Farewell World", Exchange.FILE_NAME, "farewell.txt");
 
         File file = new File(FTP_ROOT_DIR + 
"/mysub/myother/farewell.txt").getAbsoluteFile();

Modified: 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceTest.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/sftp/SftpSimpleProduceTest.java?rev=1374387&r1=1374386&r2=1374387&view=diff
==============================================================================
--- 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceTest.java
 (original)
+++ 
camel/branches/camel-2.9.x/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpSimpleProduceTest.java
 Fri Aug 17 18:25:41 2012
@@ -19,13 +19,11 @@ package org.apache.camel.component.file.
 import java.io.File;
 
 import org.apache.camel.Exchange;
-import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version 
  */
-@Ignore("Disabled due CI servers fails on full build running with these tests")
 public class SftpSimpleProduceTest extends SftpServerTestSupport {
 
     @Override
@@ -39,7 +37,7 @@ public class SftpSimpleProduceTest exten
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/?username=admin&password=admin", "Hello World", Exchange.FILE_NAME, 
"hello.txt");
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "?username=admin&password=admin", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
 
         File file = new File(FTP_ROOT_DIR + "/hello.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -52,7 +50,7 @@ public class SftpSimpleProduceTest exten
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/mysub?username=admin&password=admin", "Bye World", Exchange.FILE_NAME, 
"bye.txt");
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "/mysub?username=admin&password=admin", "Bye World", 
Exchange.FILE_NAME, "bye.txt");
 
         File file = new File(FTP_ROOT_DIR + 
"/mysub/bye.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -65,7 +63,7 @@ public class SftpSimpleProduceTest exten
             return;
         }
 
-        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + 
"/mysub/myother?username=admin&password=admin", "Farewell World", 
Exchange.FILE_NAME, "farewell.txt");
+        template.sendBodyAndHeader("sftp://localhost:"; + getPort() + "/" + 
FTP_ROOT_DIR + "/mysub/myother?username=admin&password=admin", "Farewell 
World", Exchange.FILE_NAME, "farewell.txt");
 
         File file = new File(FTP_ROOT_DIR + 
"/mysub/myother/farewell.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());


Reply via email to