You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/09/28 13:03:56 UTC
[camel] branch main updated: Fix DefaultPackageScanResourceResolverTest on Windows (#11600)
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 0bee3eb11a2 Fix DefaultPackageScanResourceResolverTest on Windows (#11600)
0bee3eb11a2 is described below
commit 0bee3eb11a26c2d3f8be3bb7be3920c37e169084
Author: Aurélien Pupier <ap...@redhat.com>
AuthorDate: Thu Sep 28 15:03:50 2023 +0200
Fix DefaultPackageScanResourceResolverTest on Windows (#11600)
Signed-off-by: Aurélien Pupier <ap...@redhat.com>
---
.../engine/DefaultPackageScanResourceResolverTest.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/engine/DefaultPackageScanResourceResolverTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/engine/DefaultPackageScanResourceResolverTest.java
index e54d8524858..c83c3e31944 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/engine/DefaultPackageScanResourceResolverTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/engine/DefaultPackageScanResourceResolverTest.java
@@ -23,6 +23,8 @@ import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
+import java.io.File;
+
public class DefaultPackageScanResourceResolverTest {
@Test
public void testFileResourcesScan() throws Exception {
@@ -31,18 +33,18 @@ public class DefaultPackageScanResourceResolverTest {
assertThat(resolver.findResources("file:src/test/resources/org/apache/camel/impl/engine/**/*.xml"))
.hasSize(4)
- .anyMatch(r -> r.getLocation().contains("ar/camel-scan.xml"))
- .anyMatch(r -> r.getLocation().contains("ar/camel-dummy.xml"))
- .anyMatch(r -> r.getLocation().contains("br/camel-scan.xml"))
- .anyMatch(r -> r.getLocation().contains("br/camel-dummy.xml"));
+ .anyMatch(r -> r.getLocation().contains("ar"+File.separator+"camel-scan.xml"))
+ .anyMatch(r -> r.getLocation().contains("ar"+File.separator+"camel-dummy.xml"))
+ .anyMatch(r -> r.getLocation().contains("br"+File.separator+"camel-scan.xml"))
+ .anyMatch(r -> r.getLocation().contains("br"+File.separator+"camel-dummy.xml"));
assertThat(resolver.findResources("file:src/test/resources/org/apache/camel/impl/engine/a?/*.xml"))
.hasSize(2)
- .anyMatch(r -> r.getLocation().contains("ar/camel-scan.xml"))
- .anyMatch(r -> r.getLocation().contains("ar/camel-dummy.xml"));
+ .anyMatch(r -> r.getLocation().contains("ar"+File.separator+"camel-scan.xml"))
+ .anyMatch(r -> r.getLocation().contains("ar"+File.separator+"camel-dummy.xml"));
assertThat(resolver.findResources("file:src/test/resources/org/apache/camel/impl/engine/b?/*.xml"))
.hasSize(2)
- .anyMatch(r -> r.getLocation().contains("br/camel-scan.xml"))
- .anyMatch(r -> r.getLocation().contains("br/camel-dummy.xml"));
+ .anyMatch(r -> r.getLocation().contains("br"+File.separator+"camel-scan.xml"))
+ .anyMatch(r -> r.getLocation().contains("br"+File.separator+"camel-dummy.xml"));
assertThat(resolver.findResources("file:src/test/resources/org/apache/camel/impl/engine/c?/*.xml"))
.isEmpty();
}