This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 40c083e CAMEL-16400: split unit and integration tests for camel-mongodb-gridfs (#5356) 40c083e is described below commit 40c083ed826236293c6830da3cf0264c04dcda6d Author: Otavio Rodolfo Piske <orpi...@users.noreply.github.com> AuthorDate: Wed Apr 14 16:16:49 2021 +0200 CAMEL-16400: split unit and integration tests for camel-mongodb-gridfs (#5356) --- components/camel-mongodb-gridfs/pom.xml | 79 ++++------------------ .../AbstractMongoDbITSupport.java} | 4 +- .../GridFsConsumerIT.java} | 5 +- .../GridFsProducerOperationsIT.java} | 6 +- 4 files changed, 22 insertions(+), 72 deletions(-) diff --git a/components/camel-mongodb-gridfs/pom.xml b/components/camel-mongodb-gridfs/pom.xml index eb3968b..8f037f2 100644 --- a/components/camel-mongodb-gridfs/pom.xml +++ b/components/camel-mongodb-gridfs/pom.xml @@ -92,71 +92,18 @@ </dependency> </dependencies> - <profiles> - <profile> - <id>mongodb-gridfs-skip-tests</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skipTests>true</skipTests> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <!-- activate test if the docker socket file is accessible --> - <profile> - <id>mongodb-gridfs-tests-docker-file</id> - <activation> - <file> - <exists>/var/run/docker.sock</exists> - </file> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skipTests>${skipTests}</skipTests> - <forkCount>1</forkCount> - <systemPropertyVariables> - <visibleassertions.silence>true</visibleassertions.silence> - </systemPropertyVariables> - </configuration> - </plugin> - </plugins> - </build> - </profile> - - <!-- activate test if the DOCKER_HOST env var is set --> - <profile> - <id>mongodb-gridfs-tests-docker-env</id> - <activation> - <property> - <name>env.DOCKER_HOST</name> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skipTests>${skipTests}</skipTests> - <forkCount>1</forkCount> - <systemPropertyVariables> - <visibleassertions.silence>true</visibleassertions.silence> - </systemPropertyVariables> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <configuration> + <systemPropertyVariables> + <visibleassertions.silence>true</visibleassertions.silence> + </systemPropertyVariables> + </configuration> + </plugin> + </plugins> + </build> </project> diff --git a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/AbstractMongoDbTest.java b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/AbstractMongoDbITSupport.java similarity index 94% rename from components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/AbstractMongoDbTest.java rename to components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/AbstractMongoDbITSupport.java index 64a9365..93aecda 100644 --- a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/AbstractMongoDbTest.java +++ b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/AbstractMongoDbITSupport.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.mongodb.gridfs; +package org.apache.camel.component.mongodb.gridfs.integration; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; @@ -27,7 +27,7 @@ import org.apache.camel.test.junit5.CamelTestSupport; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.extension.RegisterExtension; -public abstract class AbstractMongoDbTest extends CamelTestSupport { +public abstract class AbstractMongoDbITSupport extends CamelTestSupport { @RegisterExtension public static MongoDBService service = MongoDBServiceFactory.createService(); diff --git a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsConsumerTest.java b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsConsumerIT.java similarity index 96% rename from components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsConsumerTest.java rename to components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsConsumerIT.java index 52f876f..a8e6af1 100644 --- a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsConsumerTest.java +++ b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsConsumerIT.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.mongodb.gridfs; +package org.apache.camel.component.mongodb.gridfs.integration; import java.util.HashMap; import java.util.Map; @@ -25,6 +25,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.component.mongodb.gridfs.GridFsEndpoint; import org.bson.types.ObjectId; import org.junit.jupiter.api.Test; @@ -34,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; -public class GridFsConsumerTest extends AbstractMongoDbTest { +public class GridFsConsumerIT extends AbstractMongoDbITSupport { @Override protected RouteBuilder createRouteBuilder() throws Exception { diff --git a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsProducerOperationsTest.java b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsProducerOperationsIT.java similarity index 95% rename from components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsProducerOperationsTest.java rename to components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsProducerOperationsIT.java index 4d6f10c..54e42b2 100644 --- a/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/GridFsProducerOperationsTest.java +++ b/components/camel-mongodb-gridfs/src/test/java/org/apache/camel/component/mongodb/gridfs/integration/GridFsProducerOperationsIT.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.mongodb.gridfs; +package org.apache.camel.component.mongodb.gridfs.integration; import java.io.InputStream; import java.nio.charset.StandardCharsets; @@ -24,6 +24,8 @@ import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mongodb.gridfs.GridFsConstants; +import org.apache.camel.component.mongodb.gridfs.GridFsEndpoint; import org.bson.types.ObjectId; import org.junit.jupiter.api.Test; @@ -33,7 +35,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -public class GridFsProducerOperationsTest extends AbstractMongoDbTest { +public class GridFsProducerOperationsIT extends AbstractMongoDbITSupport { @Override protected RouteBuilder createRouteBuilder() throws Exception {