This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 51bd076a389 Fix FileConsumerThreadsInProgressIssueTest on Windows
(#11599)
51bd076a389 is described below
commit 51bd076a389efecc8ead92dd0f1eef74ce8633cb
Author: Aurélien Pupier <[email protected]>
AuthorDate: Fri Sep 29 06:36:03 2023 +0200
Fix FileConsumerThreadsInProgressIssueTest on Windows (#11599)
On Windows, filenames cannot have `\r` and `\n`
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../camel/component/file/FileConsumerThreadsInProgressIssueTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
index 0366d265ba8..b8b25a1e7c9 100644
---
a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
+++
b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerThreadsInProgressIssueTest.java
@@ -85,8 +85,9 @@ public class FileConsumerThreadsInProgressIssueTest extends
ContextTestSupport {
private void createManyFiles(int number) throws Exception {
Path dir = testDirectory();
for (int i = 0; i < number; i++) {
+ String fileNamesSuffix = String.format("%04d", i);
String pad = String.format("%04d%n", i);
- try (Writer writer =
Files.newBufferedWriter(dir.resolve("newFile-" + pad))) {
+ try (Writer writer =
Files.newBufferedWriter(dir.resolve("newFile-" + fileNamesSuffix))) {
writer.write(pad);
}
}