Author: cmueller
Date: Fri Mar 22 09:06:26 2013
New Revision: 1459676

URL: http://svn.apache.org/r1459676
Log:
fixed unit test which fails from time to time on slow boxes

Modified:
    
camel/branches/camel-2.10.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java

Modified: 
camel/branches/camel-2.10.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java?rev=1459676&r1=1459675&r2=1459676&view=diff
==============================================================================
--- 
camel/branches/camel-2.10.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
 (original)
+++ 
camel/branches/camel-2.10.x/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java
 Fri Mar 22 09:06:26 2013
@@ -37,6 +37,7 @@ public class ScpSimpleProduceTest extend
 
         String uri = getScpUri() + 
"?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
         template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, 
"hello.txt");
+        Thread.sleep(500);
 
         File file = new File(getScpPath() + "/hello.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -49,6 +50,7 @@ public class ScpSimpleProduceTest extend
 
         String uri = getScpUri() + 
"?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
         template.sendBodyAndHeader(uri, "Bye World", Exchange.FILE_NAME, 
"mysub/bye.txt");
+        Thread.sleep(500);
 
         File file = new File(getScpPath() + 
"/mysub/bye.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -61,6 +63,7 @@ public class ScpSimpleProduceTest extend
 
         String uri = getScpUri() + 
"?username=admin&password=admin&knownHostsFile=" + getKnownHostsFile();
         template.sendBodyAndHeader(uri, "Farewell World", Exchange.FILE_NAME, 
"mysub/mysubsub/farewell.txt");
+        Thread.sleep(500);
 
         File file = new File(getScpPath() + 
"/mysub/mysubsub/farewell.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -73,6 +76,7 @@ public class ScpSimpleProduceTest extend
 
         String uri = getScpUri() + 
"?username=admin&password=admin&chmod=640&knownHostsFile=" + 
getKnownHostsFile();
         template.sendBodyAndHeader(uri, "Bonjour Monde", Exchange.FILE_NAME, 
"monde.txt");
+        Thread.sleep(500);
 
         File file = new File(getScpPath() + "/monde.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());
@@ -87,6 +91,7 @@ public class ScpSimpleProduceTest extend
 
         String uri = getScpUri() + 
"?username=admin&privateKeyFile=src/test/resources/camel-key.priv&privateKeyFilePassphrase=password&knownHostsFile="
 + getKnownHostsFile();
         template.sendBodyAndHeader(uri, "Hallo Welt", Exchange.FILE_NAME, 
"welt.txt");
+        Thread.sleep(500);
 
         File file = new File(getScpPath() + "/welt.txt").getAbsoluteFile();
         assertTrue("File should exist: " + file, file.exists());


Reply via email to