This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new ea60b52 CAMEL-13400: Fixed CS ea60b52 is described below commit ea60b5243d3cf30b283621f9f74df75f99a1c7b8 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue May 21 09:56:12 2019 +0200 CAMEL-13400: Fixed CS --- .../FromFtpRecursiveNotStepwiseNoBasePath.java | 68 ++++++++++---------- .../FromSftpRecursiveNotStepwiseNoBasePath.java | 74 +++++++++++----------- .../file/remote/sftp/SftpServerTestSupport.java | 4 +- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRecursiveNotStepwiseNoBasePath.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRecursiveNotStepwiseNoBasePath.java index 6112d17..c0ae0be 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRecursiveNotStepwiseNoBasePath.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpRecursiveNotStepwiseNoBasePath.java @@ -23,42 +23,42 @@ import org.junit.Test; public class FromFtpRecursiveNotStepwiseNoBasePath extends FtpServerTestSupport { - protected String getFtpUrl() { - return "ftp://admin@localhost:" + getPort() + "?password=admin&initialDelay=3000&stepwise=false" - + "&recursive=true"; - } + protected String getFtpUrl() { + return "ftp://admin@localhost:" + getPort() + "?password=admin&initialDelay=3000&stepwise=false" + + "&recursive=true"; + } - @Override - @Before - public void setUp() throws Exception { - super.setUp(); - prepareFtpServer(); - } + @Override + @Before + public void setUp() throws Exception { + super.setUp(); + prepareFtpServer(); + } - @Test - public void testRecursiveNotStepwiseNoBasePath() throws Exception { - //CAMEL-13400 - MockEndpoint mock = getMockEndpoint("mock:result"); - mock.expectedBodiesReceivedInAnyOrder("Bye World", "Hello World", "Goodday World"); - assertMockEndpointsSatisfied(); - } + @Test + public void testRecursiveNotStepwiseNoBasePath() throws Exception { + //CAMEL-13400 + MockEndpoint mock = getMockEndpoint("mock:result"); + mock.expectedBodiesReceivedInAnyOrder("Bye World", "Hello World", "Goodday World"); + assertMockEndpointsSatisfied(); + } - @Override - protected RouteBuilder createRouteBuilder() throws Exception { - return new RouteBuilder() { - @Override - public void configure() throws Exception { - from(getFtpUrl()) - .convertBodyTo(String.class) - .to("log:ftp") - .to("mock:result"); - } - }; - } + @Override + protected RouteBuilder createRouteBuilder() throws Exception { + return new RouteBuilder() { + @Override + public void configure() throws Exception { + from(getFtpUrl()) + .convertBodyTo(String.class) + .to("log:ftp") + .to("mock:result"); + } + }; + } - private void prepareFtpServer() throws Exception { - sendFile(getFtpUrl(), "Bye World", "bye.txt"); - sendFile(getFtpUrl(), "Hello World", "sub/hello.txt"); - sendFile(getFtpUrl(), "Goodday World", "sub/sub2/godday.txt"); - } + private void prepareFtpServer() throws Exception { + sendFile(getFtpUrl(), "Bye World", "bye.txt"); + sendFile(getFtpUrl(), "Hello World", "sub/hello.txt"); + sendFile(getFtpUrl(), "Goodday World", "sub/sub2/godday.txt"); + } } diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/FromSftpRecursiveNotStepwiseNoBasePath.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/FromSftpRecursiveNotStepwiseNoBasePath.java index 001a1c9..1cbcb6f 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/FromSftpRecursiveNotStepwiseNoBasePath.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/FromSftpRecursiveNotStepwiseNoBasePath.java @@ -24,46 +24,46 @@ import org.junit.Test; public class FromSftpRecursiveNotStepwiseNoBasePath extends SftpServerTestSupport { - protected String getSftpUrl() { - return "sftp://admin@localhost:" + getPort() + "?password=admin&initialDelay=3000&stepwise=false" - + "&recursive=true"; - } + protected String getSftpUrl() { + return "sftp://admin@localhost:" + getPort() + "?password=admin&initialDelay=3000&stepwise=false" + + "&recursive=true"; + } - @Override - @Before - public void setUp() throws Exception { - rootDirMode = true; - super.setUp(); - prepareFtpServer(); - } + @Override + @Before + public void setUp() throws Exception { + rootDirMode = true; + super.setUp(); + prepareFtpServer(); + } - @Test - public void testRecursiveNotStepwiseNoBasePath() throws Exception { - //CAMEL-13400 - MockEndpoint mock = getMockEndpoint("mock:result"); - mock.expectedBodiesReceivedInAnyOrder("Bye World", "Hello World", "Goodday World"); - assertMockEndpointsSatisfied(); - } + @Test + public void testRecursiveNotStepwiseNoBasePath() throws Exception { + //CAMEL-13400 + MockEndpoint mock = getMockEndpoint("mock:result"); + mock.expectedBodiesReceivedInAnyOrder("Bye World", "Hello World", "Goodday World"); + assertMockEndpointsSatisfied(); + } - @Override - protected RouteBuilder createRouteBuilder() throws Exception { - return new RouteBuilder() { - @Override - public void configure() throws Exception { - from(getSftpUrl()) - .convertBodyTo(String.class) - .to("mock:result"); - } - }; - } + @Override + protected RouteBuilder createRouteBuilder() throws Exception { + return new RouteBuilder() { + @Override + public void configure() throws Exception { + from(getSftpUrl()) + .convertBodyTo(String.class) + .to("mock:result"); + } + }; + } - private void prepareFtpServer() throws Exception { - sendFile("Bye World", "bye.txt"); - sendFile("Hello World", "sub/hello.txt"); - sendFile("Goodday World", "sub/sub2/godday.txt"); - } + private void prepareFtpServer() throws Exception { + sendFile("Bye World", "bye.txt"); + sendFile("Hello World", "sub/hello.txt"); + sendFile("Goodday World", "sub/sub2/godday.txt"); + } - public void sendFile(Object body, String fileName) { - template.sendBodyAndHeader("file://" + FTP_ROOT_DIR, body, Exchange.FILE_NAME, fileName); - } + public void sendFile(Object body, String fileName) { + template.sendBodyAndHeader("file://" + FTP_ROOT_DIR, body, Exchange.FILE_NAME, fileName); + } } diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java index 37f70f6..fe34828 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpServerTestSupport.java @@ -42,7 +42,7 @@ public class SftpServerTestSupport extends BaseServerTestSupport { protected SshServer sshd; protected boolean canTest; protected String oldUserHome; - protected boolean rootDirMode = false; + protected boolean rootDirMode; @Override @Before @@ -77,7 +77,7 @@ public class SftpServerTestSupport extends BaseServerTestSupport { sshd.setPasswordAuthenticator((username, password, session) -> true); sshd.setPublickeyAuthenticator((username, password, session) -> true); if (rootDirMode) { - sshd.setFileSystemFactory(new VirtualFileSystemFactory(FileSystems.getDefault().getPath(System.getProperty("user.dir") + "/target/res"))); + sshd.setFileSystemFactory(new VirtualFileSystemFactory(FileSystems.getDefault().getPath(System.getProperty("user.dir") + "/target/res"))); } sshd.start(); } catch (Exception e) {