You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zh...@apache.org on 2024/03/25 12:55:19 UTC
(camel-quarkus) branch 3.8.x updated: Separation of jt400 test module into mocked one integration one. (#5915) (#5920)
This is an automated email from the ASF dual-hosted git repository.
zhfeng pushed a commit to branch 3.8.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/3.8.x by this push:
new bf90de58f0 Separation of jt400 test module into mocked one integration one. (#5915) (#5920)
bf90de58f0 is described below
commit bf90de58f03994f4b8a1296806fe1bb97837a455
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Mon Mar 25 13:55:13 2024 +0100
Separation of jt400 test module into mocked one integration one. (#5915) (#5920)
---
integration-tests/jt400-mocked/pom.xml | 126 +++++++++++++++++++++
.../main/java/com/ibm/as400/access/MockAS400.java | 0
.../com/ibm/as400/access/MockAS400ImplRemote.java | 0
.../java/com/ibm/as400/access/MockAS400Server.java | 0
.../java/com/ibm/as400/access/MockDataStream.java | 0
.../com/ibm/as400/access/MockSocketContainer.java | 0
.../java/com/ibm/as400/access/MockedResponses.java | 0
.../java/com/ibm/as400/access/ReplyDQCommon.java | 0
.../com/ibm/as400/access/ReplyDQReadNormal.java | 0
.../access/ReplyDQRequestAttributesNormal.java | 0
.../main/java/com/ibm/as400/access/ReplyOk.java | 0
.../com/ibm/as400/access/ReplyRCCallProgram.java | 0
.../as400/access/ReplyRCExchangeAttributes.java | 0
.../jt400/mocked/it}/Jt400MockProducers.java | 2 +-
.../jt400/mocked/it}/Jt400MockResource.java | 2 +-
.../jt400/mocked/it}/MockAS400ConnectionPool.java | 2 +-
.../src/main/resources/application.properties | 19 ++++
.../component/jt400/mocked}/Jt400MockIT.java | 4 +-
.../component/jt400/mocked}/Jt400MockTest.java | 7 +-
integration-tests/pom.xml | 1 +
tooling/scripts/test-categories.yaml | 1 +
21 files changed, 153 insertions(+), 11 deletions(-)
diff --git a/integration-tests/jt400-mocked/pom.xml b/integration-tests/jt400-mocked/pom.xml
new file mode 100644
index 0000000000..84ad802467
--- /dev/null
+++ b/integration-tests/jt400-mocked/pom.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>3.8.2-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-jt400-mocked</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: JT400 Mocked</name>
+ <description>Mocked tests for Camel Quarkus JT400 extension</description>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>application.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jt400</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-jt400-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400ImplRemote.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400ImplRemote.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400ImplRemote.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400ImplRemote.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400Server.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400Server.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockAS400Server.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockAS400Server.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockDataStream.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockDataStream.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockDataStream.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockDataStream.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockSocketContainer.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockSocketContainer.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockSocketContainer.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockSocketContainer.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/MockedResponses.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockedResponses.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/MockedResponses.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/MockedResponses.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQCommon.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQCommon.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQCommon.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQCommon.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQReadNormal.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQReadNormal.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQReadNormal.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQReadNormal.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQRequestAttributesNormal.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQRequestAttributesNormal.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyDQRequestAttributesNormal.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyDQRequestAttributesNormal.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyOk.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyOk.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyOk.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyOk.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyRCCallProgram.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyRCCallProgram.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyRCCallProgram.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyRCCallProgram.java
diff --git a/integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyRCExchangeAttributes.java b/integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyRCExchangeAttributes.java
similarity index 100%
rename from integration-tests/jt400/src/main/java/com/ibm/as400/access/ReplyRCExchangeAttributes.java
rename to integration-tests/jt400-mocked/src/main/java/com/ibm/as400/access/ReplyRCExchangeAttributes.java
diff --git a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockProducers.java b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockProducers.java
similarity index 97%
rename from integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockProducers.java
rename to integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockProducers.java
index 319e8dc0a4..9c6568f14a 100644
--- a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockProducers.java
+++ b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockProducers.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.jt400.it.mock;
+package org.apache.camel.quarkus.component.jt400.mocked.it;
import java.util.HashMap;
import java.util.List;
diff --git a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockResource.java b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockResource.java
similarity index 98%
rename from integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockResource.java
rename to integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockResource.java
index 21a561efd8..fa3247e2db 100644
--- a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/Jt400MockResource.java
+++ b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/Jt400MockResource.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.jt400.it.mock;
+package org.apache.camel.quarkus.component.jt400.mocked.it;
import java.util.Map;
diff --git a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/MockAS400ConnectionPool.java b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/MockAS400ConnectionPool.java
similarity index 97%
rename from integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/MockAS400ConnectionPool.java
rename to integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/MockAS400ConnectionPool.java
index 751e6fa119..c91519e6ac 100644
--- a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/mock/MockAS400ConnectionPool.java
+++ b/integration-tests/jt400-mocked/src/main/java/org/apache/camel/quarkus/component/jt400/mocked/it/MockAS400ConnectionPool.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.jt400.it.mock;
+package org.apache.camel.quarkus.component.jt400.mocked.it;
import java.util.Locale;
diff --git a/integration-tests/jt400-mocked/src/main/resources/application.properties b/integration-tests/jt400-mocked/src/main/resources/application.properties
new file mode 100644
index 0000000000..7674bd15b4
--- /dev/null
+++ b/integration-tests/jt400-mocked/src/main/resources/application.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#mocked tests requires flat classpath (that's why they are separated from jt400 integration tests)
+quarkus.test.flat-class-path=true
diff --git a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockIT.java b/integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockIT.java
similarity index 83%
rename from integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockIT.java
rename to integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockIT.java
index 7bd64e0e2d..5c43d82d81 100644
--- a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockIT.java
+++ b/integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockIT.java
@@ -14,13 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.jt400.it;
+package org.apache.camel.quarkus.component.jt400.mocked;
import io.quarkus.test.junit.QuarkusIntegrationTest;
-import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
@QuarkusIntegrationTest
-@DisabledIfSystemProperty(named = "skip-mock-tests", matches = "true")
class Jt400MockIT extends Jt400MockTest {
}
diff --git a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockTest.java b/integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockTest.java
similarity index 95%
rename from integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockTest.java
rename to integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockTest.java
index 5af533476a..e44c1c6634 100644
--- a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400MockTest.java
+++ b/integration-tests/jt400-mocked/src/test/java/org/apache/camel/quarkus/component/jt400/mocked/Jt400MockTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.jt400.it;
+package org.apache.camel.quarkus.component.jt400.mocked;
import java.util.HashMap;
import java.util.Map;
@@ -22,15 +22,12 @@ import java.util.Map;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
-import org.apache.camel.quarkus.component.jt400.it.mock.Jt400MockResource;
+import org.apache.camel.quarkus.component.jt400.mocked.it.Jt400MockResource;
import org.apache.camel.util.CollectionHelper;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
@QuarkusTest
-@DisabledIfSystemProperty(named = "skip-mock-tests", matches = "true")
-
public class Jt400MockTest {
@Test
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 8683eb38d8..b3ce8741a4 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -139,6 +139,7 @@
<module>jsonata</module>
<module>jsonpath</module>
<module>jt400</module>
+ <module>jt400-mocked</module>
<module>jta</module>
<module>kafka</module>
<module>kafka-oauth</module>
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index d1400f4f66..c30e190fc4 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -145,6 +145,7 @@ group-09:
- ftp
- graphql
- jt400
+ - jt400-mocked
- kafka-sasl-ssl
- kafka-ssl
- paho