Skip to content

Commit

Permalink
fixed unit test which fails from time to time on slow boxes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x@1459679 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Christian Mueller committed Mar 22, 2013
1 parent a166e4e commit 100e74d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void testScpSimpleProduce() throws Exception {

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());
Expand All @@ -50,6 +51,7 @@ public void testScpSimpleSubPathProduce() throws Exception {

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());
Expand All @@ -62,6 +64,7 @@ public void testScpSimpleTwoSubPathProduce() throws Exception {

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());
Expand All @@ -74,6 +77,7 @@ public void testScpProduceChmod() throws Exception {

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());
Expand All @@ -88,6 +92,7 @@ public void testScpProducePrivateKey() throws Exception {

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());
Expand Down

0 comments on commit 100e74d

Please sign in to comment.