This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karaf.git
The following commit(s) were added to refs/heads/main by this push:
new 636c99b8c test(#772): consume each GridFS file once and clean up the
camel-mongodb-gridfs itest (#776)
636c99b8c is described below
commit 636c99b8ca1b27c12f79535c456785246ad35048
Author: JB Onofré <[email protected]>
AuthorDate: Tue Dec 1 14:48:20 2026 +0000
test(#772): consume each GridFS file once and clean up the
camel-mongodb-gridfs itest (#776)
Use queryStrategy=FileAttribute so each file is routed once, resolve the
container host from Testcontainers, drop the unneeded camel-mongodb-gridfs
dependency and list the module in alphabetical order.
---
tests/features/camel-mongodb-gridfs/pom.xml | 6 ------
.../apache/karaf/camel/test/CamelMongodbGridfsRouteSupplier.java | 2 +-
.../java/org/apache/karaf/camel/itest/CamelMongodbGridfsITest.java | 2 +-
tests/features/pom.xml | 2 +-
4 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/tests/features/camel-mongodb-gridfs/pom.xml
b/tests/features/camel-mongodb-gridfs/pom.xml
index 01918b615..897485c84 100644
--- a/tests/features/camel-mongodb-gridfs/pom.xml
+++ b/tests/features/camel-mongodb-gridfs/pom.xml
@@ -29,12 +29,6 @@
<name>Apache Camel :: Karaf :: Tests :: Features :: MongoDB GridFS</name>
<dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-mongodb-gridfs</artifactId>
- <version>${camel-version}</version>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
diff --git
a/tests/features/camel-mongodb-gridfs/src/main/java/org/apache/karaf/camel/test/CamelMongodbGridfsRouteSupplier.java
b/tests/features/camel-mongodb-gridfs/src/main/java/org/apache/karaf/camel/test/CamelMongodbGridfsRouteSupplier.java
index 23ecaf47d..936fd44ba 100644
---
a/tests/features/camel-mongodb-gridfs/src/main/java/org/apache/karaf/camel/test/CamelMongodbGridfsRouteSupplier.java
+++
b/tests/features/camel-mongodb-gridfs/src/main/java/org/apache/karaf/camel/test/CamelMongodbGridfsRouteSupplier.java
@@ -52,7 +52,7 @@ public class CamelMongodbGridfsRouteSupplier extends
AbstractCamelSingleFeatureR
@Override
protected Function<RouteBuilder, RouteDefinition> consumerRoute() {
- return builder -> builder.from(URI + "&delay=500")
+ return builder -> builder.from(URI +
"&delay=500&queryStrategy=FileAttribute")
.convertBodyTo(String.class);
}
diff --git
a/tests/features/camel-mongodb-gridfs/src/test/java/org/apache/karaf/camel/itest/CamelMongodbGridfsITest.java
b/tests/features/camel-mongodb-gridfs/src/test/java/org/apache/karaf/camel/itest/CamelMongodbGridfsITest.java
index cb9d3ab59..366dce889 100644
---
a/tests/features/camel-mongodb-gridfs/src/test/java/org/apache/karaf/camel/itest/CamelMongodbGridfsITest.java
+++
b/tests/features/camel-mongodb-gridfs/src/test/java/org/apache/karaf/camel/itest/CamelMongodbGridfsITest.java
@@ -55,7 +55,7 @@ public class CamelMongodbGridfsITest extends
AbstractCamelSingleFeatureResultMoc
MongoContainer container = new MongoContainer("mongo:8.3.17");
return new GenericContainerResource<>(container, resource ->
resource.setProperty("mongo.connection",
-
"mongodb://127.0.0.1:%d".formatted(container.getMappedPort(MONGO_PORT))));
+ "mongodb://%s:%d".formatted(container.getHost(),
container.getMappedPort(MONGO_PORT))));
}
}
diff --git a/tests/features/pom.xml b/tests/features/pom.xml
index c22854ce7..b14cfe51d 100644
--- a/tests/features/pom.xml
+++ b/tests/features/pom.xml
@@ -103,9 +103,9 @@
<module>camel-jms</module>
<module>camel-kafka</module>
<module>camel-leveldb</module>
- <module>camel-netty-http</module>
<module>camel-mail</module>
<module>camel-mongodb-gridfs</module>
+ <module>camel-netty-http</module>
<module>camel-olingo2</module>
<module>camel-opentelemetry2</module>
<module>camel-paho-mqtt5</module>