Skip to content

Commit de6f561

Browse files
committed
Fixes for FileTests.testFileSplitterFlow()
* Use `System.lineSeparator()` between lines of the file under test * Mark this test as `@RetryingTest(10)`
1 parent b821fa1 commit de6f561

File tree

1 file changed

+3
-2
lines changed
  • spring-integration-file/src/test/java/org/springframework/integration/file/dsl

1 file changed

+3
-2
lines changed

spring-integration-file/src/test/java/org/springframework/integration/file/dsl/FileTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
import org.junit.jupiter.api.Test;
3333
import org.junit.jupiter.api.io.TempDir;
34+
import org.junitpioneer.jupiter.RetryingTest;
3435

3536
import org.springframework.aop.TargetSource;
3637
import org.springframework.aop.framework.Advised;
@@ -245,10 +246,10 @@ public void testFileWritingFlow() throws Exception {
245246
@Qualifier("fileSplitter.handler")
246247
private MessageHandler fileSplitter;
247248

248-
@Test
249+
@RetryingTest(10)
249250
public void testFileSplitterFlow() throws Exception {
250251
FileOutputStream file = new FileOutputStream(new File(tmpDir, "foo.tmp"));
251-
file.write(("HelloWorld\näöüß").getBytes(Charset.defaultCharset()));
252+
file.write(("HelloWorld" + System.lineSeparator() + ¤Ã¶Ã¼ÃŸ").getBytes(Charset.defaultCharset()));
252253
file.flush();
253254
file.close();
254255

0 commit comments

Comments
 (0)