INT-4303: (S)FTP MGET with FileExistsMode.IGNORE
JIRA: https://jira.spring.io/browse/INT-4303 Don't emit ignored files in the output message payload. Also, always preserve the timestamp when using `FileExistsMode.REPLACE_IF_MODIFIED`. Some code style polishing
This commit is contained in:
committed by
Artem Bilan
parent
4679c9bdbe
commit
0903df9676
@@ -42,6 +42,7 @@
|
||||
command="mget"
|
||||
command-options="-f -P"
|
||||
expression="payload"
|
||||
mode="IGNORE"
|
||||
local-directory-expression="@extraConfig.targetLocalDirectoryName + (#remoteDirectory ?: '')"
|
||||
local-filename-generator-expression="#remoteFileName.replaceFirst('ftpSource', 'localTarget')"
|
||||
reply-channel="output"/>
|
||||
|
||||
@@ -228,6 +228,11 @@ public class FtpServerOutboundTests extends FtpTestSupport {
|
||||
for (File file : localFiles) {
|
||||
assertThat(file.getPath().replaceAll(Matcher.quoteReplacement(File.separator), "/"), containsString(dir));
|
||||
}
|
||||
this.inboundMGet.send(new GenericMessage<Object>(dir + "*.txt"));
|
||||
result = this.output.receive(1000);
|
||||
assertNotNull(result);
|
||||
localFiles = (List<File>) result.getPayload();
|
||||
assertThat(localFiles.size(), equalTo(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user