This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit e33055c85dc21b24466e9aa26eb5d9762abbc5e9 Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Wed Jun 7 17:18:09 2023 +0200 (chores) camel-core: do not reuse file names across tests --- .../file/FileConsumeNotEagerMaxMessagesPerPollTest.java | 6 +++--- .../camel/component/file/FileProducerCharsetUTFtoISOTest.java | 10 +++++----- .../camel/processor/BatchConsumerPooledExchangeTest.java | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java index de3ff199762..b63a26f4093 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java @@ -38,9 +38,9 @@ public class FileConsumeNotEagerMaxMessagesPerPollTest extends ContextTestSuppor MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedBodiesReceived("AAA", "BBB"); - template.sendBodyAndHeader(fileUrl, "CCC", Exchange.FILE_NAME, "ccc.txt"); - template.sendBodyAndHeader(fileUrl, "AAA", Exchange.FILE_NAME, "aaa.txt"); - template.sendBodyAndHeader(fileUrl, "BBB", Exchange.FILE_NAME, "bbb.txt"); + template.sendBodyAndHeader(fileUrl, "CCC", Exchange.FILE_NAME, "ccc.FileConsumeNotEagerMaxMessagesPerPollTest.txt"); + template.sendBodyAndHeader(fileUrl, "AAA", Exchange.FILE_NAME, "aaa.FileConsumeNotEagerMaxMessagesPerPollTest.txt"); + template.sendBodyAndHeader(fileUrl, "BBB", Exchange.FILE_NAME, "bbb.FileConsumeNotEagerMaxMessagesPerPollTest.txt"); // start route context.getRouteController().startRoute("foo"); diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java index 70449573161..7e7a7d3890d 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java @@ -36,14 +36,14 @@ class FileProducerCharsetUTFtoISOTest extends ContextTestSupport { @Test void testFileProducerCharsetUTFtoISO() throws Exception { - try (OutputStream fos = Files.newOutputStream(testFile("input.txt"))) { + try (OutputStream fos = Files.newOutputStream(testFile("input.FileProducerCharsetUTFtoISOTest.txt"))) { fos.write(DATA.getBytes(StandardCharsets.UTF_8)); } assertTrue(oneExchangeDone.matchesWaitTime()); - assertFileExists(testFile("output.txt")); - byte[] data = Files.readAllBytes(testFile("output.txt")); + assertFileExists(testFile("output.FileProducerCharsetUTFtoISOTest.txt")); + byte[] data = Files.readAllBytes(testFile("output.FileProducerCharsetUTFtoISOTest.txt")); assertEquals(DATA, new String(data, StandardCharsets.ISO_8859_1)); } @@ -53,8 +53,8 @@ class FileProducerCharsetUTFtoISOTest extends ContextTestSupport { return new RouteBuilder() { @Override public void configure() { - from(fileUri("?initialDelay=0&delay=10&fileName=input.txt")) - .to(fileUri("?fileName=output.txt&charset=iso-8859-1")); + from(fileUri("?initialDelay=0&delay=10&fileName=input.FileProducerCharsetUTFtoISOTest.txt")) + .to(fileUri("?fileName=output.FileProducerCharsetUTFtoISOTest.txt&charset=iso-8859-1")); } }; } diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/BatchConsumerPooledExchangeTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/BatchConsumerPooledExchangeTest.java index efaa951f2bb..7d1297167fe 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/BatchConsumerPooledExchangeTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/BatchConsumerPooledExchangeTest.java @@ -59,9 +59,9 @@ public class BatchConsumerPooledExchangeTest extends ContextTestSupport { @BeforeEach public void setUp() throws Exception { super.setUp(); - template.sendBodyAndHeader(fileUri(), "aaa", Exchange.FILE_NAME, "aaa.txt"); - template.sendBodyAndHeader(fileUri(), "bbb", Exchange.FILE_NAME, "bbb.txt"); - template.sendBodyAndHeader(fileUri(), "ccc", Exchange.FILE_NAME, "ccc.txt"); + template.sendBodyAndHeader(fileUri(), "aaa", Exchange.FILE_NAME, "aaa.BatchConsumerPooledExchangeTest.txt"); + template.sendBodyAndHeader(fileUri(), "bbb", Exchange.FILE_NAME, "bbb.BatchConsumerPooledExchangeTest.txt"); + template.sendBodyAndHeader(fileUri(), "ccc", Exchange.FILE_NAME, "ccc.BatchConsumerPooledExchangeTest.txt"); } @Test
