You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2021/04/14 14:18:10 UTC
[camel] branch master updated: CAMEL-16400: split unit and
integration tests for camel-nsq (#5358)
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 7f80d94 CAMEL-16400: split unit and integration tests for camel-nsq (#5358)
7f80d94 is described below
commit 7f80d9410237aac5ce5168b42790d96106196b1f
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Wed Apr 14 16:16:57 2021 +0200
CAMEL-16400: split unit and integration tests for camel-nsq (#5358)
---
components/camel-nsq/pom.xml | 78 ++++------------------
.../NsqConsumerIT.java} | 5 +-
.../NsqITSupport.java} | 4 +-
.../NsqProducerIT.java} | 5 +-
4 files changed, 21 insertions(+), 71 deletions(-)
diff --git a/components/camel-nsq/pom.xml b/components/camel-nsq/pom.xml
index 50f94c0..b78f7dc 100644
--- a/components/camel-nsq/pom.xml
+++ b/components/camel-nsq/pom.xml
@@ -74,69 +74,17 @@
</dependency>
</dependencies>
-
- <profiles>
- <profile>
- <id>nsq-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>nsq-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>
- <systemPropertyVariables>
- <visibleassertions.silence>true</visibleassertions.silence>
- </systemPropertyVariables>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <!-- activate test if the DOCKER_HOST env var is set -->
- <profile>
- <id>nsq-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>
- <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-nsq/src/test/java/org/apache/camel/component/nsq/NsqConsumerTest.java b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqConsumerIT.java
similarity index 96%
rename from components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqConsumerTest.java
rename to components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqConsumerIT.java
index d4d1c45..4772fca 100644
--- a/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqConsumerTest.java
+++ b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqConsumerIT.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.nsq;
+package org.apache.camel.component.nsq.integration;
import java.util.concurrent.TimeoutException;
@@ -25,11 +25,12 @@ 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.nsq.NsqConstants;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class NsqConsumerTest extends NsqTestSupport {
+public class NsqConsumerIT extends NsqITSupport {
private static final int NUMBER_OF_MESSAGES = 10000;
private static final String TOPIC = "test";
diff --git a/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqTestSupport.java b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqITSupport.java
similarity index 92%
rename from components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqTestSupport.java
rename to components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqITSupport.java
index 0dca974..fab51a4 100644
--- a/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqTestSupport.java
+++ b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqITSupport.java
@@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.nsq;
+package org.apache.camel.component.nsq.integration;
import org.apache.camel.test.infra.nsq.services.NsqService;
import org.apache.camel.test.infra.nsq.services.NsqServiceFactory;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.extension.RegisterExtension;
-public class NsqTestSupport extends CamelTestSupport {
+public class NsqITSupport extends CamelTestSupport {
@RegisterExtension
static NsqService service = NsqServiceFactory.createService();
diff --git a/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqProducerTest.java b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqProducerIT.java
similarity index 95%
rename from components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqProducerTest.java
rename to components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqProducerIT.java
index 376eeca..88761bc 100644
--- a/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/NsqProducerTest.java
+++ b/components/camel-nsq/src/test/java/org/apache/camel/component/nsq/integration/NsqProducerIT.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.nsq;
+package org.apache.camel.component.nsq.integration;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -24,11 +24,12 @@ import com.github.brainlag.nsq.NSQConsumer;
import com.github.brainlag.nsq.lookup.DefaultNSQLookup;
import com.github.brainlag.nsq.lookup.NSQLookup;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.nsq.NsqComponent;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-public class NsqProducerTest extends NsqTestSupport {
+public class NsqProducerIT extends NsqITSupport {
private static final int NUMBER_OF_MESSAGES = 10000;
private static final String TEST_MESSAGE = "Hello NSQProducer!";