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 eb145075aa8 Disable FileExclusiveReadManuelTest and FileExclusiveReadLockCopyTest on (#11625) eb145075aa8 is described below commit eb145075aa8d3efeba46d63c7b2205280f2ffa88 Author: Aurélien Pupier <apup...@redhat.com> AuthorDate: Mon Oct 2 16:05:38 2023 +0200 Disable FileExclusiveReadManuelTest and FileExclusiveReadLockCopyTest on (#11625) Windows it is based on readlock parameter which is mentioned as not supported in the documentation. The code is throwing when used on Windows: ``` Caused by: java.lang.IllegalArgumentException: The readLock=fileLock option is not supported on Windows at org.apache.camel.component.file.GenericFileEndpoint.doInit(GenericFileEndpoint.java:1763) ``` Signed-off-by: Aurélien Pupier <apup...@redhat.com> --- .../org/apache/camel/component/file/FileExclusiveReadLockCopyTest.java | 3 +++ .../org/apache/camel/component/file/FileExclusiveReadManuelTest.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadLockCopyTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadLockCopyTest.java index 3196494603a..aef048aa304 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadLockCopyTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadLockCopyTest.java @@ -21,12 +21,15 @@ import org.apache.camel.Exchange; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; public class FileExclusiveReadLockCopyTest extends ContextTestSupport { private String fileUrl = fileUri("?readLock=fileLock&initialDelay=0&delay=10"); @Test + @DisabledOnOs(OS.WINDOWS) public void testCopy() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedMessageCount(1); diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadManuelTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadManuelTest.java index 32b94567929..bf291db09d8 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadManuelTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadManuelTest.java @@ -20,6 +20,8 @@ import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; /** * Unit test to verify exclusive read by for manual testing. @@ -29,6 +31,7 @@ public class FileExclusiveReadManuelTest extends ContextTestSupport { private String fileUrl = fileUri("?readLock=fileLock&initialDelay=0&delay=10"); @Test + @DisabledOnOs(OS.WINDOWS) public void testManually() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); // this is used for manual testing where you can copy/lock files etc.