Skip to content

Commit f0d39d4

Browse files
committed
Fix file-split-ftp for new file creation
* Decrease polling timeout in the sample to 1 second to speed up tests
1 parent 4649f3d commit f0d39d4

File tree

2 files changed

+2
-1
lines changed
  • applications/file-split-ftp/src

2 files changed

+2
-1
lines changed

applications/file-split-ftp/src/main/java/org/springframework/integration/samples/filesplit/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public IntegrationFlow fromFile() {
6868
return IntegrationFlow.from(
6969
Files.inboundAdapter(new File("/tmp/in"))
7070
.preventDuplicates(false)
71-
.patternFilter("*.txt"), e -> e.poller(Pollers.fixedDelay(5000)
71+
.patternFilter("*.txt"), e -> e.poller(Pollers.fixedDelay(1000)
7272
.errorChannel("tfrErrors.input"))
7373
.id("fileInboundChannelAdapter"))
7474
.handle(Files.splitter(true, true))

applications/file-split-ftp/src/test/java/org/springframework/integration/samples/filesplit/ApplicationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public void testFailure() throws Exception {
132132
*/
133133
private MimeMessage runTest(boolean fail) throws Exception {
134134
File in = new File("/tmp/in/", "foo");
135+
in.createNewFile();
135136
FileOutputStream fos = new FileOutputStream(in);
136137
fos.write("*002,foo,bar\n*006,baz,qux\n*009,fiz,buz\n".getBytes());
137138
fos.close();

0 commit comments

Comments
 (0)