You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/02/23 15:31:17 UTC
[camel-quarkus] branch 2.7.x updated (232c57e -> e563c56)
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a change to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.
from 232c57e Remove IPFS and Weka extensions temporarily, workaround #3532
new 8015d5c Disable CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest on Windows due to #3529
new dec8f79 Disable FileTest.charset on Windows due to #3530
new a21e851 Add capability to skip testcontainers tests
new 608a17e Fix build on windows
new b399dac Run integration tests on Windows
new 8276f52 Upgrade Maven Wrapper to 3.1.0
new e4e68cc Disable flaky messaging resequence test on GitHub CI (#2957)
new f8a37cc DebeziumMongodbTest skipped tests #3213
new a12ff64 Poll for optaplanner results to avoid timeouts on slow machines
new bc087bb Remove duplicate software.amazon.awssdk:iam dependency declaration
new bdb3d85 Honor extension deprecation in Catalog and in documentation
new 748bbe5 Remove freemarker inaccurate documentation
new 7bb9e60 Fixup e72113e send optaplanner test messages asynchronously
new 3eafc11 Fix link to Quarkus Freemarker docs
new f4a8fd5 Fix #3548 to exclude geronimo-jta_1.1_spec in camel-activemq (#3550)
new 38cd419 Improve available port discovery in tests
new d395c00 gson: complete doc and test coverage #3556
new e60c567 Fix #3551 ban all non-canonical JTA specs artifacts
new 6907bb8 Upgrade Azurite container image to 3.15.0
new 8d003ac Increase azure-storage-blob extension test coverage
new b3b7430 Upgrade Quarkus to 2.7.2.Final
new e563c56 Add quarkus.log to .gitignore
The 22 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitattributes | 3 +
.github/workflows/ci-build.yaml | 51 ++-
.gitignore | 3 +
.mvn/wrapper/maven-wrapper.jar | Bin 50710 -> 58727 bytes
.mvn/wrapper/maven-wrapper.properties | 18 +-
docs/antora.yml | 2 +-
.../pages/reference/extensions/freemarker.adoc | 44 +-
.../ROOT/pages/reference/extensions/gson.adoc | 9 +
docs/pom.xml | 4 +-
.../quarkus/core/deployment/CamelProcessor.java | 3 +-
.../quarkus/core/deployment/util/PathFilter.java | 4 +-
.../core/deployment/util/PathFilterTest.java | 21 +-
.../apache/camel/quarkus/core/util/FileUtils.java | 52 +++
extensions-jvm/bonita/runtime/pom.xml | 8 +
extensions-jvm/spark/runtime/pom.xml | 8 +
extensions-jvm/wordpress/runtime/pom.xml | 8 +
.../csimple/deployment/CSimpleProcessor.java | 3 +-
.../runtime/src/main/doc/configuration.adoc | 44 +-
.../gson/runtime/src/main/doc/configuration.adoc | 5 +
extensions/kafka/deployment/pom.xml | 21 +
extensions/servicenow/runtime/pom.xml | 8 +
.../aws2-quarkus-client/aws2-ddb/pom.xml | 13 +-
.../aws2-quarkus-client/aws2-s3/pom.xml | 13 +-
.../aws2-quarkus-client/aws2-ses/pom.xml | 13 +-
.../aws2-quarkus-client/aws2-sqs-sns/pom.xml | 13 +-
.../aws2-quarkus-client/aws2-sqs/pom.xml | 13 +-
integration-test-groups/aws2/aws2-cw/pom.xml | 11 +
integration-test-groups/aws2/aws2-ddb/pom.xml | 11 +
integration-test-groups/aws2/aws2-kinesis/pom.xml | 11 +
integration-test-groups/aws2/aws2-lambda/pom.xml | 11 +
integration-test-groups/aws2/aws2-s3/pom.xml | 13 +-
integration-test-groups/aws2/aws2-ses/pom.xml | 11 +
integration-test-groups/aws2/aws2-sqs-sns/pom.xml | 11 +
integration-test-groups/aws2/aws2-sqs/pom.xml | 11 +
integration-test-groups/azure/README.adoc | 3 +-
.../azure/azure-eventhubs/pom.xml | 13 +-
integration-test-groups/azure/azure-resources.sh | 9 +-
.../azure/azure-storage-blob/pom.xml | 59 +++
.../storage/blob/it/AzureStorageBlobProducers.java | 49 ++
.../storage/blob/it/AzureStorageBlobResource.java | 394 ++++++++++++++--
.../storage/blob/it/AzureStorageBlobRoutes.java | 125 ++++++
.../storage/blob/it/AzureStorageBlobTest.java | 500 +++++++++++++++++++--
.../azure/azure-storage-queue/pom.xml | 11 +
.../mongodb/mongodb-gridfs/pom.xml | 11 +
integration-test-groups/mongodb/mongodb/pom.xml | 11 +
integration-tests-jvm/couchbase/pom.xml | 11 +
integration-tests-jvm/hbase/pom.xml | 11 +
integration-tests-jvm/redis/pom.xml | 11 +
.../support/azure/AzureStorageTestResource.java | 2 +-
.../test/mock/backend/MockBackendDisabled.java | 16 +-
.../camel/quarkus/test/AvailablePortFinder.java | 40 +-
integration-tests/activemq/pom.xml | 11 +
integration-tests/amqp/pom.xml | 11 +
integration-tests/arangodb/pom.xml | 11 +
.../quarkus/component/as2/it/As2TestResource.java | 1 +
.../component/avro/rpc/it/AvroRpcTestResource.java | 1 +
integration-tests/aws2-grouped/pom.xml | 18 +-
.../aws2-quarkus-client-grouped/pom.xml | 23 +-
integration-tests/aws2/pom.xml | 11 +
integration-tests/azure-grouped/pom.xml | 54 ++-
integration-tests/cassandraql/pom.xml | 11 +
integration-tests/consul/pom.xml | 11 +
integration-tests/couchdb/pom.xml | 11 +
.../dataformats/json/JsonDataformatsResource.java | 2 +-
.../dataformats/json/JsonDataformatsRoute.java | 7 +-
.../component/dataformats/json/ParamType.java | 36 --
.../dataformats/json/model/DummyObject.java | 12 +
.../dataformats/json/JsonComponentsTest.java | 11 +-
integration-tests/debezium/pom.xml | 11 +
.../common/it/mongodb/DebeziumMongodbTest.java | 13 +-
.../common/it/mysql/DebeziumMysqlTest.java | 36 +-
.../common/it/sqlserver/DebeziumSqlserverTest.java | 33 +-
.../quarkus/component/dozer/it/DozerTest.java | 4 +-
integration-tests/elasticsearch-rest/pom.xml | 11 +
integration-tests/fhir/pom.xml | 11 +
.../camel/quarkus/component/file/it/FileTest.java | 12 +-
.../component/flatpack/it/FlatpackTest.java | 3 +-
integration-tests/foundation-grouped/pom.xml | 2 +-
.../quarkus/component/ftp/it/FtpTestResource.java | 2 +
.../component/sftp/it/SftpTestResource.java | 2 +
integration-tests/google-pubsub/pom.xml | 11 +
integration-tests/google-storage/pom.xml | 11 +
.../component/grpc/it/GrpcServerTestResource.java | 1 +
.../quarkus/component/hl7/it/Hl7TestResource.java | 2 +-
integration-tests/http/pom.xml | 11 +
.../component/http/it/HttpTestResource.java | 1 +
.../component/hystrix/it/HystrixTestResource.java | 1 +
integration-tests/infinispan/pom.xml | 11 +
integration-tests/influxdb/pom.xml | 11 +
integration-tests/ipfs/pom.xml | 11 +
integration-tests/jms-artemis-client/pom.xml | 11 +
integration-tests/jms-qpid-amqp-client/pom.xml | 11 +
integration-tests/jsch/pom.xml | 11 +
.../camel/quarkus/component/jslt/it/JsltTest.java | 6 +
integration-tests/jta/pom.xml | 11 +
integration-tests/kafka-oauth/pom.xml | 11 +
integration-tests/kafka-sasl-ssl/pom.xml | 11 +
integration-tests/kafka-sasl/pom.xml | 11 +
integration-tests/kafka-ssl/pom.xml | 11 +
integration-tests/kafka/pom.xml | 11 +
integration-tests/kudu/pom.xml | 11 +
integration-tests/lra/pom.xml | 11 +
.../quarkus/component/lra/it/LraTestResource.java | 1 +
.../lumberjack/it/LumberjackTestResource.java | 2 +-
...dePatternWithAbsoluteFilePrefixDevModeTest.java | 3 +
.../messaging/it/AbstractMessagingTest.java | 2 +
integration-tests/minio/pom.xml | 11 +
.../quarkus/component/mllp/it/MllpResource.java | 4 +-
.../quarkus/component/mllp/it/MllpRoutes.java | 11 +-
.../camel/quarkus/component/mllp/it/MllpTest.java | 2 +
.../component/mllp/it/MllpTestResource.java} | 11 +-
integration-tests/mongodb-grouped/pom.xml | 13 +-
.../component/nagios/it/NagiosTestResource.java | 1 +
integration-tests/nats/pom.xml | 11 +
.../component/netty/tcp/NettyTcpTestResource.java | 1 +
integration-tests/nsq/pom.xml | 11 +
.../component/oaipmh/it/MockOaipmhServer.java | 1 +
integration-tests/optaplanner/pom.xml | 12 +-
.../optaplanner/it/OptaplannerResource.java | 87 ++--
.../quarkus/component/optaplanner/it/Routes.java | 15 +-
.../component/optaplanner/it/OptaplannerTest.java | 98 +++-
integration-tests/paho-mqtt5/pom.xml | 11 +
integration-tests/paho/pom.xml | 11 +
integration-tests/pg-replication-slot/pom.xml | 11 +
integration-tests/pgevent/pom.xml | 11 +
integration-tests/rabbitmq/pom.xml | 11 +
.../sap/netweaver/it/SapNetweaverTestResource.java | 1 +
integration-tests/sjms-artemis-client/pom.xml | 11 +
integration-tests/sjms-qpid-amqp-client/pom.xml | 11 +
integration-tests/sjms2-artemis-client/pom.xml | 11 +
integration-tests/sjms2-qpid-amqp-client/pom.xml | 11 +
integration-tests/solr/pom.xml | 12 +-
integration-tests/splunk/pom.xml | 11 +
integration-tests/spring-rabbitmq/pom.xml | 11 +
integration-tests/ssh/pom.xml | 11 +
.../stringtemplate/it/StringtemplateTest.java | 2 +-
.../component/syslog/it/SyslogTestResource.java | 2 +-
mvnw | 22 +-
mvnw.cmd | 34 +-
pom.xml | 19 +-
poms/bom/pom.xml | 4 +
poms/build-parent/pom.xml | 2 +-
.../camel/quarkus/maven/CamelQuarkusExtension.java | 9 +
.../org/apache/camel/quarkus/maven/CqUtils.java | 4 +-
.../quarkus/maven/PrepareCatalogQuarkusMojo.java | 2 +-
.../quarkus/maven/UpdateExtensionDocPageMojo.java | 2 +-
146 files changed, 2440 insertions(+), 434 deletions(-)
create mode 100644 .gitattributes
create mode 100644 extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/util/FileUtils.java
create mode 100644 extensions/gson/runtime/src/main/doc/configuration.adoc
create mode 100644 integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobProducers.java
create mode 100644 integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobRoutes.java
copy extensions/jta/runtime/src/main/java/org/apache/camel/quarkus/component/jta/RequiredJtaTransactionPolicy.java => integration-tests-support/mock-backend/src/main/java/org/apache/camel/quarkus/test/mock/backend/MockBackendDisabled.java (67%)
copy integration-tests/{syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java => mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTestResource.java} (76%)
[camel-quarkus] 16/22: Improve available port discovery in tests
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 38cd4194f2a2ce04ebe391737f9565c1f8098e8d
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 16 09:43:01 2022 +0000
Improve available port discovery in tests
Fixes #3199
---
.../camel/quarkus/test/AvailablePortFinder.java | 40 ++++++++++++++++++++--
.../quarkus/component/as2/it/As2TestResource.java | 1 +
.../component/avro/rpc/it/AvroRpcTestResource.java | 1 +
.../quarkus/component/ftp/it/FtpTestResource.java | 2 ++
.../component/sftp/it/SftpTestResource.java | 2 ++
.../component/grpc/it/GrpcServerTestResource.java | 1 +
.../quarkus/component/hl7/it/Hl7TestResource.java | 2 +-
.../component/http/it/HttpTestResource.java | 1 +
.../component/hystrix/it/HystrixTestResource.java | 1 +
.../quarkus/component/lra/it/LraTestResource.java | 1 +
.../lumberjack/it/LumberjackTestResource.java | 2 +-
.../quarkus/component/mllp/it/MllpResource.java | 4 ++-
.../quarkus/component/mllp/it/MllpRoutes.java | 11 +++---
.../camel/quarkus/component/mllp/it/MllpTest.java | 2 ++
.../component/mllp/it/MllpTestResource.java} | 11 +++---
.../component/nagios/it/NagiosTestResource.java | 1 +
.../component/netty/tcp/NettyTcpTestResource.java | 1 +
.../component/oaipmh/it/MockOaipmhServer.java | 1 +
.../sap/netweaver/it/SapNetweaverTestResource.java | 1 +
.../component/syslog/it/SyslogTestResource.java | 2 +-
20 files changed, 71 insertions(+), 17 deletions(-)
diff --git a/integration-tests-support/test-support/src/main/java/org/apache/camel/quarkus/test/AvailablePortFinder.java b/integration-tests-support/test-support/src/main/java/org/apache/camel/quarkus/test/AvailablePortFinder.java
index ee1825d..4fce970 100644
--- a/integration-tests-support/test-support/src/main/java/org/apache/camel/quarkus/test/AvailablePortFinder.java
+++ b/integration-tests-support/test-support/src/main/java/org/apache/camel/quarkus/test/AvailablePortFinder.java
@@ -23,6 +23,7 @@ import java.net.ServerSocket;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import org.eclipse.microprofile.config.Config;
@@ -35,9 +36,11 @@ import org.slf4j.LoggerFactory;
*/
public final class AvailablePortFinder {
private static final Logger LOGGER = LoggerFactory.getLogger(AvailablePortFinder.class);
+ private static final Map<Integer, String> RESERVED_PORTS = new ConcurrentHashMap<>();
private static final String[] QUARKUS_PORT_PROPERTIES = new String[] {
"quarkus.http.test-port",
"quarkus.http.test-ssl-port",
+ "quarkus.https.test-port",
};
/**
@@ -54,6 +57,10 @@ public final class AvailablePortFinder {
* @return the available port
*/
public static int getNextAvailable() {
+ // Using AvailablePortFinder in native applications can be problematic
+ // E.g The reserved port may be allocated at build time and preserved indefinitely at runtime. I.e it never changes on each execution of the native application
+ logWarningIfNativeApplication();
+
while (true) {
try (ServerSocket ss = new ServerSocket()) {
ss.setReuseAddress(true);
@@ -61,8 +68,12 @@ public final class AvailablePortFinder {
int port = ss.getLocalPort();
if (!isQuarkusReservedPort(port)) {
- LOGGER.info("getNextAvailable() -> {}", port);
- return port;
+ String callerClassName = getCallerClassName();
+ String value = RESERVED_PORTS.putIfAbsent(port, callerClassName);
+ if (value == null) {
+ LOGGER.info("{} reserved port {}", callerClassName, port);
+ return port;
+ }
}
} catch (IOException e) {
throw new IllegalStateException("Cannot find free port", e);
@@ -90,6 +101,16 @@ public final class AvailablePortFinder {
return reservedPorts;
}
+ public static void releaseReservedPorts() {
+ String callerClassName = getCallerClassName();
+ RESERVED_PORTS.entrySet()
+ .stream()
+ .filter(entry -> entry.getValue().equals(callerClassName))
+ .peek(entry -> LOGGER.info("Releasing port {} reserved by {}", entry.getKey(), entry.getValue()))
+ .map(Map.Entry::getKey)
+ .forEach(RESERVED_PORTS::remove);
+ }
+
private static boolean isQuarkusReservedPort(int port) {
Config config = ConfigProvider.getConfig();
for (String property : QUARKUS_PORT_PROPERTIES) {
@@ -103,4 +124,19 @@ public final class AvailablePortFinder {
}
return false;
}
+
+ private static String getCallerClassName() {
+ return StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE)
+ .walk(s -> s.map(StackWalker.StackFrame::getClassName)
+ .filter(className -> !className.equals(AvailablePortFinder.class.getName()))
+ .findFirst()
+ .orElseThrow(IllegalStateException::new));
+ }
+
+ private static void logWarningIfNativeApplication() {
+ if (System.getProperty("org.graalvm.nativeimage.kind") != null) {
+ LOGGER.warn("Usage of AvailablePortFinder in the native application is discouraged. "
+ + "Pass the reserved port to the native application under test with QuarkusTestResource or via an HTTP request");
+ }
+ }
}
diff --git a/integration-tests/as2/src/test/java/org/apache/camel/quarkus/component/as2/it/As2TestResource.java b/integration-tests/as2/src/test/java/org/apache/camel/quarkus/component/as2/it/As2TestResource.java
index 59a2f01..00df5fb 100644
--- a/integration-tests/as2/src/test/java/org/apache/camel/quarkus/component/as2/it/As2TestResource.java
+++ b/integration-tests/as2/src/test/java/org/apache/camel/quarkus/component/as2/it/As2TestResource.java
@@ -31,5 +31,6 @@ public class As2TestResource implements QuarkusTestResourceLifecycleManager {
@Override
public void stop() {
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/avro-rpc/src/test/java/org/apache/camel/quarkus/component/avro/rpc/it/AvroRpcTestResource.java b/integration-tests/avro-rpc/src/test/java/org/apache/camel/quarkus/component/avro/rpc/it/AvroRpcTestResource.java
index 7e01972..900ae33 100644
--- a/integration-tests/avro-rpc/src/test/java/org/apache/camel/quarkus/component/avro/rpc/it/AvroRpcTestResource.java
+++ b/integration-tests/avro-rpc/src/test/java/org/apache/camel/quarkus/component/avro/rpc/it/AvroRpcTestResource.java
@@ -106,6 +106,7 @@ public class AvroRpcTestResource implements QuarkusTestResourceLifecycleManager
if (specificNettyServer != null) {
specificNettyServer.close();
}
+ AvailablePortFinder.releaseReservedPorts();
}
@Override
diff --git a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/ftp/it/FtpTestResource.java b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/ftp/it/FtpTestResource.java
index d750632..64ab8cf 100644
--- a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/ftp/it/FtpTestResource.java
+++ b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/ftp/it/FtpTestResource.java
@@ -136,6 +136,8 @@ public class FtpTestResource implements QuarkusTestResourceLifecycleManager {
} catch (Exception e) {
LOGGER.warn("Failed delete usr file: {}, {}", usrFile, e);
}
+
+ AvailablePortFinder.releaseReservedPorts();
}
protected ListenerFactory createListenerFactory(int port) {
diff --git a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTestResource.java b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTestResource.java
index 8385e1b..a27f151 100644
--- a/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTestResource.java
+++ b/integration-tests/ftp/src/test/java/org/apache/camel/quarkus/component/sftp/it/SftpTestResource.java
@@ -97,5 +97,7 @@ public class SftpTestResource implements QuarkusTestResourceLifecycleManager {
} catch (Exception e) {
LOGGER.warn("Failed delete sftp home: {}, {}", sftpHome, e);
}
+
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/grpc/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java b/integration-tests/grpc/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java
index eb947fd..aabf55f 100644
--- a/integration-tests/grpc/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java
+++ b/integration-tests/grpc/src/test/java/org/apache/camel/quarkus/component/grpc/it/GrpcServerTestResource.java
@@ -65,5 +65,6 @@ public class GrpcServerTestResource implements QuarkusTestResourceLifecycleManag
} catch (Exception e) {
LOGGER.error("Could not stop gRPC server", e);
}
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/hl7/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7TestResource.java b/integration-tests/hl7/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7TestResource.java
index 3ab8ed5..bf74e65 100644
--- a/integration-tests/hl7/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7TestResource.java
+++ b/integration-tests/hl7/src/test/java/org/apache/camel/quarkus/component/hl7/it/Hl7TestResource.java
@@ -32,6 +32,6 @@ public class Hl7TestResource implements QuarkusTestResourceLifecycleManager {
@Override
public void stop() {
- // Noop
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTestResource.java b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTestResource.java
index 7a5392f..13c4828 100644
--- a/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTestResource.java
+++ b/integration-tests/http/src/test/java/org/apache/camel/quarkus/component/http/it/HttpTestResource.java
@@ -59,5 +59,6 @@ public class HttpTestResource implements QuarkusTestResourceLifecycleManager {
if (container != null) {
container.stop();
}
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/hystrix/src/test/java/org/apache/camel/quarkus/component/hystrix/it/HystrixTestResource.java b/integration-tests/hystrix/src/test/java/org/apache/camel/quarkus/component/hystrix/it/HystrixTestResource.java
index 3b5b5db..9632930 100644
--- a/integration-tests/hystrix/src/test/java/org/apache/camel/quarkus/component/hystrix/it/HystrixTestResource.java
+++ b/integration-tests/hystrix/src/test/java/org/apache/camel/quarkus/component/hystrix/it/HystrixTestResource.java
@@ -30,5 +30,6 @@ public class HystrixTestResource implements QuarkusTestResourceLifecycleManager
@Override
public void stop() {
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
index 7ef35b7..191c1b1 100644
--- a/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
+++ b/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java
@@ -76,5 +76,6 @@ public class LraTestResource implements QuarkusTestResourceLifecycleManager {
} catch (Exception e) {
// ignored
}
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/lumberjack/src/test/java/org/apache/camel/quarkus/component/lumberjack/it/LumberjackTestResource.java b/integration-tests/lumberjack/src/test/java/org/apache/camel/quarkus/component/lumberjack/it/LumberjackTestResource.java
index 2c24cb1..ad53495 100644
--- a/integration-tests/lumberjack/src/test/java/org/apache/camel/quarkus/component/lumberjack/it/LumberjackTestResource.java
+++ b/integration-tests/lumberjack/src/test/java/org/apache/camel/quarkus/component/lumberjack/it/LumberjackTestResource.java
@@ -31,6 +31,6 @@ public class LumberjackTestResource implements QuarkusTestResourceLifecycleManag
@Override
public void stop() {
-
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpResource.java b/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpResource.java
index c90ba32..192a841 100644
--- a/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpResource.java
+++ b/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpResource.java
@@ -30,6 +30,7 @@ import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.mllp.MllpComponent;
import org.apache.camel.component.mllp.MllpConstants;
import org.apache.camel.component.mock.MockEndpoint;
+import org.eclipse.microprofile.config.ConfigProvider;
@Path("/mllp")
@ApplicationScoped
@@ -64,7 +65,8 @@ public class MllpResource {
@POST
@Produces(MediaType.TEXT_PLAIN)
public String getWithCharsetFromMsh18(String message) {
- String mllpHostPort = String.format("mllp:%s:%d", MllpRoutes.MLLP_HOST, MllpRoutes.MLLP_PORT);
+ Integer mllpPort = ConfigProvider.getConfig().getValue("mllp.test.port", Integer.class);
+ String mllpHostPort = String.format("mllp:%s:%d", MllpRoutes.MLLP_HOST, mllpPort);
Exchange exchange = producerTemplate.request(mllpHostPort, e -> e.getMessage().setBody(message));
String ack = exchange.getMessage().getHeader(MllpConstants.MLLP_ACKNOWLEDGEMENT_STRING, String.class);
return ack.split("\r")[0];
diff --git a/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpRoutes.java b/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpRoutes.java
index 2b61637..026b6a9 100644
--- a/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpRoutes.java
+++ b/integration-tests/mllp/src/main/java/org/apache/camel/quarkus/component/mllp/it/MllpRoutes.java
@@ -20,28 +20,29 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mllp.MllpConstants;
import org.apache.camel.component.mllp.MllpInvalidMessageException;
-import org.apache.camel.quarkus.test.AvailablePortFinder;
+import org.eclipse.microprofile.config.ConfigProvider;
@RegisterForReflection(targets = MllpInvalidMessageException.class, fields = false)
public class MllpRoutes extends RouteBuilder {
public static final String MLLP_HOST = "localhost";
- public static final int MLLP_PORT = AvailablePortFinder.getNextAvailable();
@Override
public void configure() throws Exception {
+ Integer mllpPort = ConfigProvider.getConfig().getValue("mllp.test.port", Integer.class);
+
onException(MllpInvalidMessageException.class)
.to("mock:invalid");
- fromF("mllp://%s:%d?validatePayload=true", MLLP_HOST, MLLP_PORT)
+ fromF("mllp://%s:%d?validatePayload=true", MLLP_HOST, mllpPort)
.convertBodyTo(String.class);
from("direct:validMessage")
- .toF("mllp://%s:%d", MLLP_HOST, MLLP_PORT)
+ .toF("mllp://%s:%d", MLLP_HOST, mllpPort)
.setBody(header(MllpConstants.MLLP_ACKNOWLEDGEMENT));
from("direct:invalidMessage")
- .toF("mllp://%s:%d?exchangePattern=InOnly", MLLP_HOST, MLLP_PORT)
+ .toF("mllp://%s:%d?exchangePattern=InOnly", MLLP_HOST, mllpPort)
.setBody(header(MllpConstants.MLLP_ACKNOWLEDGEMENT));
}
}
diff --git a/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTest.java b/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTest.java
index e85f3ca..339786e 100644
--- a/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTest.java
+++ b/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTest.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.quarkus.component.mllp.it;
+import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import org.junit.jupiter.api.Test;
@@ -23,6 +24,7 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.Matchers.containsString;
@QuarkusTest
+@QuarkusTestResource(MllpTestResource.class)
class MllpTest {
private static final String HL7_MESSAGE = "MSH|^~\\&|REQUESTING|ICE|INHOUSE|RTH00|20210331095020||ORM^O01|1|D|2.3|||AL|NE||\r"
diff --git a/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java b/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTestResource.java
similarity index 76%
copy from integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java
copy to integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTestResource.java
index b0b5ccd..32058b3 100644
--- a/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java
+++ b/integration-tests/mllp/src/test/java/org/apache/camel/quarkus/component/mllp/it/MllpTestResource.java
@@ -14,24 +14,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.syslog.it;
+package org.apache.camel.quarkus.component.mllp.it;
+import java.util.Collections;
import java.util.Map;
-import java.util.Objects;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import org.apache.camel.quarkus.test.AvailablePortFinder;
-public class SyslogTestResource implements QuarkusTestResourceLifecycleManager {
+public class MllpTestResource implements QuarkusTestResourceLifecycleManager {
@Override
public Map<String, String> start() {
- return AvailablePortFinder.reserveNetworkPorts(Objects::toString, "camel.netty.rfc5425.port",
- "camel.netty.rfc3164.port");
+ return Collections.singletonMap("mllp.test.port", Integer.toString(AvailablePortFinder.getNextAvailable()));
}
@Override
public void stop() {
-
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/nagios/src/test/java/org/apache/camel/quarkus/component/nagios/it/NagiosTestResource.java b/integration-tests/nagios/src/test/java/org/apache/camel/quarkus/component/nagios/it/NagiosTestResource.java
index bf1d3c1..62d178f 100644
--- a/integration-tests/nagios/src/test/java/org/apache/camel/quarkus/component/nagios/it/NagiosTestResource.java
+++ b/integration-tests/nagios/src/test/java/org/apache/camel/quarkus/component/nagios/it/NagiosTestResource.java
@@ -78,6 +78,7 @@ public class NagiosTestResource implements QuarkusTestResourceLifecycleManager {
if (context != null) {
context.shutdown();
}
+ AvailablePortFinder.releaseReservedPorts();
}
@Override
diff --git a/integration-tests/netty/src/test/java/org/apache/camel/quarkus/component/netty/tcp/NettyTcpTestResource.java b/integration-tests/netty/src/test/java/org/apache/camel/quarkus/component/netty/tcp/NettyTcpTestResource.java
index b1f0fbf..ba0e829 100644
--- a/integration-tests/netty/src/test/java/org/apache/camel/quarkus/component/netty/tcp/NettyTcpTestResource.java
+++ b/integration-tests/netty/src/test/java/org/apache/camel/quarkus/component/netty/tcp/NettyTcpTestResource.java
@@ -39,5 +39,6 @@ public class NettyTcpTestResource implements QuarkusTestResourceLifecycleManager
@Override
public void stop() {
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/oaipmh/src/test/java/org/apache/camel/quarkus/component/oaipmh/it/MockOaipmhServer.java b/integration-tests/oaipmh/src/test/java/org/apache/camel/quarkus/component/oaipmh/it/MockOaipmhServer.java
index fb4a236..e5e6b51 100644
--- a/integration-tests/oaipmh/src/test/java/org/apache/camel/quarkus/component/oaipmh/it/MockOaipmhServer.java
+++ b/integration-tests/oaipmh/src/test/java/org/apache/camel/quarkus/component/oaipmh/it/MockOaipmhServer.java
@@ -104,6 +104,7 @@ public final class MockOaipmhServer {
public void stop() {
server.stop();
+ AvailablePortFinder.releaseReservedPorts();
}
public int getHttpPort() {
diff --git a/integration-tests/sap-netweaver/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTestResource.java b/integration-tests/sap-netweaver/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTestResource.java
index fac3c5b..d56178d 100644
--- a/integration-tests/sap-netweaver/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTestResource.java
+++ b/integration-tests/sap-netweaver/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTestResource.java
@@ -31,5 +31,6 @@ public class SapNetweaverTestResource implements QuarkusTestResourceLifecycleMan
@Override
public void stop() {
+ AvailablePortFinder.releaseReservedPorts();
}
}
diff --git a/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java b/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java
index b0b5ccd..d875db1 100644
--- a/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java
+++ b/integration-tests/syslog/src/test/java/org/apache/camel/quarkus/component/syslog/it/SyslogTestResource.java
@@ -32,6 +32,6 @@ public class SyslogTestResource implements QuarkusTestResourceLifecycleManager {
@Override
public void stop() {
-
+ AvailablePortFinder.releaseReservedPorts();
}
}
[camel-quarkus] 17/22: gson: complete doc and test coverage #3556
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit d395c00091d3837ec3f3d9704048ee09f4a31fd1
Author: aldettinger <al...@gmail.com>
AuthorDate: Wed Feb 16 16:00:36 2022 +0100
gson: complete doc and test coverage #3556
---
docs/modules/ROOT/pages/reference/extensions/gson.adoc | 9 +++++++++
extensions/gson/runtime/src/main/doc/configuration.adoc | 5 +++++
.../component/dataformats/json/JsonDataformatsResource.java | 2 +-
.../component/dataformats/json/JsonDataformatsRoute.java | 7 ++++++-
.../component/dataformats/json/model/DummyObject.java | 12 ++++++++++++
.../component/dataformats/json/JsonComponentsTest.java | 7 +++++--
6 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/gson.adoc b/docs/modules/ROOT/pages/reference/extensions/gson.adoc
index ab98d7c..7a98bec 100644
--- a/docs/modules/ROOT/pages/reference/extensions/gson.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/gson.adoc
@@ -38,3 +38,12 @@ Or add the coordinates to your existing project:
----
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== Additional Camel Quarkus configuration
+
+=== Marshaling/Unmarshaling objects in native mode
+
+When marshaling/unmarshaling objects in native mode, all the serialized classes need to be link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered for reflection].
+As such, when using `GsonDataFormat.setUnmarshalType(...)`, `GsonDataFormat.setUnmarshalTypeName(...)` and even `GsonDataFormat.setUnmarshalGenericType(...)`, the unmarshal type as well as sub field types should be registered for reflection.
+See a working example in this link:https://github.com/apache/camel-quarkus/blob/main/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/PojoA.java[integration test].
+
diff --git a/extensions/gson/runtime/src/main/doc/configuration.adoc b/extensions/gson/runtime/src/main/doc/configuration.adoc
new file mode 100644
index 0000000..dcb5888
--- /dev/null
+++ b/extensions/gson/runtime/src/main/doc/configuration.adoc
@@ -0,0 +1,5 @@
+=== Marshaling/Unmarshaling objects in native mode
+
+When marshaling/unmarshaling objects in native mode, all the serialized classes need to be link:https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection[registered for reflection].
+As such, when using `GsonDataFormat.setUnmarshalType(...)`, `GsonDataFormat.setUnmarshalTypeName(...)` and even `GsonDataFormat.setUnmarshalGenericType(...)`, the unmarshal type as well as sub field types should be registered for reflection.
+See a working example in this link:https://github.com/apache/camel-quarkus/blob/main/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/PojoA.java[integration test].
\ No newline at end of file
diff --git a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsResource.java b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsResource.java
index 6f51cd8..b2c6bb1 100644
--- a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsResource.java
+++ b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsResource.java
@@ -56,7 +56,7 @@ public class JsonDataformatsResource {
@Path("/out")
@POST
- @Produces(MediaType.TEXT_PLAIN)
+ @Produces(MediaType.APPLICATION_JSON)
public String testOrder(@QueryParam("json-component") String jsonComponent) {
LOG.infof("Invoking testOrder(%s)", jsonComponent);
return consumerTemplate.receive("vm:" + jsonComponent + "-out").getMessage().getBody().toString();
diff --git a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsRoute.java b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsRoute.java
index dedb55c..8f93a75 100644
--- a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsRoute.java
+++ b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/JsonDataformatsRoute.java
@@ -65,6 +65,7 @@ public class JsonDataformatsRoute extends RouteBuilder {
Type genericType = new TypeToken<List<DummyObject>>() {
}.getType();
gsonDummyObjectDataFormat.setUnmarshalGenericType(genericType);
+ gsonDummyObjectDataFormat.setDateFormatPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
gsonDummyObjectDataFormat.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES);
gsonDummyObjectDataFormat.setExclusionStrategies(Arrays.<ExclusionStrategy> asList(new ExclusionStrategy() {
@Override
@@ -77,7 +78,11 @@ public class JsonDataformatsRoute extends RouteBuilder {
return false;
}
}));
- configureJsonRoutes(JsonLibrary.Gson, gsonDummyObjectDataFormat, new GsonDataFormat(PojoA.class),
+
+ GsonDataFormat unmarshalByTypeNameGsonDataFormat = new GsonDataFormat();
+ unmarshalByTypeNameGsonDataFormat
+ .setUnmarshalTypeName("org.apache.camel.quarkus.component.dataformats.json.model.PojoA");
+ configureJsonRoutes(JsonLibrary.Gson, gsonDummyObjectDataFormat, unmarshalByTypeNameGsonDataFormat,
new GsonDataFormat(PojoB.class));
JsonbDataFormat jsonBDummyObjectDataFormat = new JsonbDataFormat(new ParamType(List.class, DummyObject.class));
diff --git a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/DummyObject.java b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/DummyObject.java
index 1888d89..0a7ead3 100644
--- a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/DummyObject.java
+++ b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/model/DummyObject.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.quarkus.component.dataformats.json.model;
+import java.util.Date;
+
import javax.json.bind.annotation.JsonbProperty;
import javax.json.bind.annotation.JsonbTransient;
@@ -37,6 +39,8 @@ public class DummyObject {
@JsonbTransient
private int ignored;
+ private Date date = new Date(1645026373);
+
public DummyObject() {
}
@@ -56,6 +60,14 @@ public class DummyObject {
this.ignored = ignored;
}
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
@Override
public String toString() {
return "DummyObject [dummyString=" + dummyString + ", ignored=" + ignored + "]";
diff --git a/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java b/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
index 4217f87..7728578 100644
--- a/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
+++ b/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
+import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
@@ -50,12 +51,14 @@ public class JsonComponentsTest {
.queryParam("json-component", jsonComponent)
.post("/dataformats-json/out")
.then()
- .body(equalTo("{\"dummy_string\":\"value1\"}"));
+ .body("dummy_string", equalTo("value1"))
+ .body("date", containsString("1970"));
RestAssured.given()
.queryParam("json-component", jsonComponent)
.post("/dataformats-json/out")
.then()
- .body(equalTo("{\"dummy_string\":\"value2\"}"));
+ .body("dummy_string", equalTo("value2"))
+ .body("date", containsString("1970"));
}
@ParameterizedTest
[camel-quarkus] 06/22: Upgrade Maven Wrapper to 3.1.0
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 8276f52b5465384fed6471ba64eeb6e607aab6c7
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Feb 10 09:16:36 2022 +0000
Upgrade Maven Wrapper to 3.1.0
---
.mvn/wrapper/maven-wrapper.jar | Bin 50710 -> 58727 bytes
.mvn/wrapper/maven-wrapper.properties | 18 +++++++++++++++++-
mvnw | 22 ++++++++++++++--------
mvnw.cmd | 34 ++++++++++++++++++++--------------
4 files changed, 51 insertions(+), 23 deletions(-)
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
index 0d5e649..c1dd12f 100644
Binary files a/.mvn/wrapper/maven-wrapper.jar and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index 59ce113..8c79a83 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,2 +1,18 @@
+# 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
-wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
diff --git a/mvnw b/mvnw
index d2f0ea3..5643201 100755
--- a/mvnw
+++ b/mvnw
@@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
-# Maven2 Start Up Batch script
+# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
@@ -36,6 +36,10 @@
if [ -z "$MAVEN_SKIP_RC" ] ; then
+ if [ -f /usr/local/etc/mavenrc ] ; then
+ . /usr/local/etc/mavenrc
+ fi
+
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
@@ -145,7 +149,7 @@ if [ -z "$JAVACMD" ] ; then
JAVACMD="$JAVA_HOME/bin/java"
fi
else
- JAVACMD="`which java`"
+ JAVACMD="`\\unset -f command; \\command -v java`"
fi
fi
@@ -212,9 +216,9 @@ else
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
- jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
else
- jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
@@ -233,9 +237,9 @@ else
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget "$jarUrl" -O "$wrapperJarPath"
+ wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
- wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
@@ -246,7 +250,7 @@ else
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi
-
+
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
@@ -305,6 +309,8 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
+ $MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ "-Dmaven.home=${M2_HOME}" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
index b26ab24..8a15b7f 100644
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -18,7 +18,7 @@
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
-@REM Maven2 Start Up Batch script
+@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@@ -26,7 +26,7 @@
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@@ -46,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
@@ -120,9 +120,9 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
-FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@@ -134,7 +134,7 @@ if exist %WRAPPER_JAR% (
)
) else (
if not "%MVNW_REPOURL%" == "" (
- SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar"
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
@@ -158,7 +158,13 @@ if exist %WRAPPER_JAR% (
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+%MAVEN_JAVA_EXE% ^
+ %JVM_CONFIG_MAVEN_PROPS% ^
+ %MAVEN_OPTS% ^
+ %MAVEN_DEBUG_OPTS% ^
+ -classpath %WRAPPER_JAR% ^
+ "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
@@ -168,15 +174,15 @@ set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
-exit /B %ERROR_CODE%
+cmd /C exit /B %ERROR_CODE%
[camel-quarkus] 19/22: Upgrade Azurite container image to 3.15.0
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 6907bb857550bf10eca5d39b996d2631f73ff336
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Feb 17 14:23:19 2022 +0000
Upgrade Azurite container image to 3.15.0
---
.../camel/quarkus/test/support/azure/AzureStorageTestResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/integration-tests-support/azure/src/main/java/org/apache/camel/quarkus/test/support/azure/AzureStorageTestResource.java b/integration-tests-support/azure/src/main/java/org/apache/camel/quarkus/test/support/azure/AzureStorageTestResource.java
index e092418..8f89967 100644
--- a/integration-tests-support/azure/src/main/java/org/apache/camel/quarkus/test/support/azure/AzureStorageTestResource.java
+++ b/integration-tests-support/azure/src/main/java/org/apache/camel/quarkus/test/support/azure/AzureStorageTestResource.java
@@ -35,7 +35,7 @@ import org.testcontainers.containers.wait.strategy.Wait;
public class AzureStorageTestResource implements QuarkusTestResourceLifecycleManager {
private static final Logger LOGGER = LoggerFactory.getLogger(AzureStorageTestResource.class);
- private static final String AZURITE_IMAGE = "mcr.microsoft.com/azure-storage/azurite:3.14.2";
+ private static final String AZURITE_IMAGE = "mcr.microsoft.com/azure-storage/azurite:3.15.0";
public enum Service {
blob(10000),
[camel-quarkus] 18/22: Fix #3551 ban all non-canonical JTA specs artifacts
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit e60c56714804f86529d0e6999b21b718c57b0c56
Author: Amos Feng <zf...@redhat.com>
AuthorDate: Thu Feb 17 16:09:18 2022 +0800
Fix #3551 ban all non-canonical JTA specs artifacts
---
extensions-jvm/bonita/runtime/pom.xml | 8 ++++++++
extensions-jvm/spark/runtime/pom.xml | 8 ++++++++
extensions-jvm/wordpress/runtime/pom.xml | 8 ++++++++
extensions/servicenow/runtime/pom.xml | 8 ++++++++
pom.xml | 8 ++++++++
5 files changed, 40 insertions(+)
diff --git a/extensions-jvm/bonita/runtime/pom.xml b/extensions-jvm/bonita/runtime/pom.xml
index bd74753..0c115bb 100644
--- a/extensions-jvm/bonita/runtime/pom.xml
+++ b/extensions-jvm/bonita/runtime/pom.xml
@@ -59,12 +59,20 @@
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.xml.bind</groupId>
<artifactId>jboss-jaxb-api_2.3_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions-jvm/spark/runtime/pom.xml b/extensions-jvm/spark/runtime/pom.xml
index f585547..587c9c2 100644
--- a/extensions-jvm/spark/runtime/pom.xml
+++ b/extensions-jvm/spark/runtime/pom.xml
@@ -92,6 +92,10 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -106,6 +110,10 @@
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions-jvm/wordpress/runtime/pom.xml b/extensions-jvm/wordpress/runtime/pom.xml
index cac66cb..f95762d 100644
--- a/extensions-jvm/wordpress/runtime/pom.xml
+++ b/extensions-jvm/wordpress/runtime/pom.xml
@@ -59,12 +59,20 @@
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.xml.bind</groupId>
<artifactId>jboss-jaxb-api_2.3_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions/servicenow/runtime/pom.xml b/extensions/servicenow/runtime/pom.xml
index 2c4ff50..a4ad778 100644
--- a/extensions/servicenow/runtime/pom.xml
+++ b/extensions/servicenow/runtime/pom.xml
@@ -64,6 +64,10 @@
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -74,6 +78,10 @@
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>jakarta.transaction</groupId>
+ <artifactId>jakarta.transaction-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/pom.xml b/pom.xml
index 44086d6..d839fd3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -666,9 +666,17 @@
<exclude>javax.enterprise:cdi-api</exclude><!-- use jakarta.enterprise:jakarta.enterprise.cdi-api instead -->
<exclude>javax.servlet:servlet-api</exclude><!-- use jakarta.servlet:jakarta.servlet-api instead -->
<exclude>javax.servlet:javax.servlet-api</exclude><!-- use jakarta.servlet:jakarta.servlet-api instead -->
+ <exclude>javax.transaction:jta</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
+ <exclude>javax.transaction:javax.transaction-api</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
<exclude>log4j:log4j</exclude><!-- use org.jboss.logmanager:log4j-jboss-logmanager instead -->
+ <exclude>org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
+ <exclude>org.jboss.spec.javax.transaction:jboss-transaction-api_1.3_spec</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
<exclude>org.apache.geronimo.specs:geronimo-jms_1.1_spec</exclude><!-- use jakarta.jms:jakarta.jms-api instead -->
<exclude>org.apache.geronimo.specs:geronimo-jms_2.0_spec</exclude><!-- use jakarta.jms:jakarta.jms-api instead -->
+ <exclude>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
+ <exclude>org.apache.geronimo.specs:geronimo-jta_1.1_spec</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
+ <exclude>org.apache.geronimo.specs:geronimo-jta_1.2_spec</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
+ <exclude>org.glassfish.main.transaction:javax.transaction</exclude><!-- use jakarta.transaction:jakarta.transaction-api instead -->
<!-- Note that log4j-api should be always excluded and org.jboss.logmanager:log4j2-jboss-logmanager added instead -->
<!-- so that the version of log4j-api prefered by log4j2-jboss-logmanager is used -->
<exclude>org.apache.logging.log4j:log4j-core</exclude><!-- not needed on Quarkus -->
[camel-quarkus] 22/22: Add quarkus.log to .gitignore
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit e563c5643c0af644d3d641766254f14084c05841
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 23 11:10:52 2022 +0000
Add quarkus.log to .gitignore
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index cc360b8..1011867 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,6 @@ nb-configuration.xml
# Vi/Vim
*.swp
+
+# Quarkus
+quarkus.log
[camel-quarkus] 03/22: Add capability to skip testcontainers tests
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a21e8512f06591705c15ebb2680f03529d9f9aa6
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 7 10:43:19 2022 +0000
Add capability to skip testcontainers tests
---
extensions/kafka/deployment/pom.xml | 21 +++++++++++++++++++++
.../aws2-quarkus-client/aws2-ddb/pom.xml | 11 +++++++++++
.../aws2-quarkus-client/aws2-s3/pom.xml | 11 +++++++++++
.../aws2-quarkus-client/aws2-ses/pom.xml | 11 +++++++++++
.../aws2-quarkus-client/aws2-sqs-sns/pom.xml | 11 +++++++++++
.../aws2-quarkus-client/aws2-sqs/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-cw/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-ddb/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-kinesis/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-lambda/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-s3/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-ses/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-sqs-sns/pom.xml | 11 +++++++++++
integration-test-groups/aws2/aws2-sqs/pom.xml | 11 +++++++++++
.../azure/azure-eventhubs/pom.xml | 11 +++++++++++
.../azure/azure-storage-blob/pom.xml | 11 +++++++++++
.../azure/azure-storage-queue/pom.xml | 11 +++++++++++
.../mongodb/mongodb-gridfs/pom.xml | 11 +++++++++++
integration-test-groups/mongodb/mongodb/pom.xml | 11 +++++++++++
integration-tests-jvm/couchbase/pom.xml | 11 +++++++++++
integration-tests-jvm/hbase/pom.xml | 11 +++++++++++
integration-tests-jvm/redis/pom.xml | 11 +++++++++++
integration-tests/activemq/pom.xml | 11 +++++++++++
integration-tests/amqp/pom.xml | 11 +++++++++++
integration-tests/arangodb/pom.xml | 11 +++++++++++
integration-tests/aws2-grouped/pom.xml | 11 +++++++++++
.../aws2-quarkus-client-grouped/pom.xml | 11 +++++++++++
integration-tests/aws2/pom.xml | 11 +++++++++++
integration-tests/azure-grouped/pom.xml | 11 +++++++++++
integration-tests/cassandraql/pom.xml | 11 +++++++++++
integration-tests/consul/pom.xml | 11 +++++++++++
integration-tests/couchdb/pom.xml | 11 +++++++++++
integration-tests/debezium/pom.xml | 11 +++++++++++
integration-tests/elasticsearch-rest/pom.xml | 11 +++++++++++
integration-tests/fhir/pom.xml | 11 +++++++++++
integration-tests/google-pubsub/pom.xml | 11 +++++++++++
integration-tests/google-storage/pom.xml | 11 +++++++++++
integration-tests/http/pom.xml | 11 +++++++++++
integration-tests/infinispan/pom.xml | 11 +++++++++++
integration-tests/influxdb/pom.xml | 11 +++++++++++
integration-tests/ipfs/pom.xml | 11 +++++++++++
integration-tests/jms-artemis-client/pom.xml | 11 +++++++++++
integration-tests/jms-qpid-amqp-client/pom.xml | 11 +++++++++++
integration-tests/jsch/pom.xml | 11 +++++++++++
integration-tests/jta/pom.xml | 11 +++++++++++
integration-tests/kafka-oauth/pom.xml | 11 +++++++++++
integration-tests/kafka-sasl-ssl/pom.xml | 11 +++++++++++
integration-tests/kafka-sasl/pom.xml | 11 +++++++++++
integration-tests/kafka-ssl/pom.xml | 11 +++++++++++
integration-tests/kafka/pom.xml | 11 +++++++++++
integration-tests/kudu/pom.xml | 11 +++++++++++
integration-tests/lra/pom.xml | 11 +++++++++++
integration-tests/minio/pom.xml | 11 +++++++++++
integration-tests/mongodb-grouped/pom.xml | 11 +++++++++++
integration-tests/nats/pom.xml | 11 +++++++++++
integration-tests/nsq/pom.xml | 11 +++++++++++
integration-tests/paho-mqtt5/pom.xml | 11 +++++++++++
integration-tests/paho/pom.xml | 11 +++++++++++
integration-tests/pg-replication-slot/pom.xml | 11 +++++++++++
integration-tests/pgevent/pom.xml | 11 +++++++++++
integration-tests/rabbitmq/pom.xml | 11 +++++++++++
integration-tests/sjms-artemis-client/pom.xml | 11 +++++++++++
integration-tests/sjms-qpid-amqp-client/pom.xml | 11 +++++++++++
integration-tests/sjms2-artemis-client/pom.xml | 11 +++++++++++
integration-tests/sjms2-qpid-amqp-client/pom.xml | 11 +++++++++++
integration-tests/solr/pom.xml | 12 +++++++++++-
integration-tests/splunk/pom.xml | 11 +++++++++++
integration-tests/spring-rabbitmq/pom.xml | 11 +++++++++++
integration-tests/ssh/pom.xml | 11 +++++++++++
69 files changed, 769 insertions(+), 1 deletion(-)
diff --git a/extensions/kafka/deployment/pom.xml b/extensions/kafka/deployment/pom.xml
index c81b222..0eba38d 100644
--- a/extensions/kafka/deployment/pom.xml
+++ b/extensions/kafka/deployment/pom.xml
@@ -68,4 +68,25 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>**/KafkaDevServicesEnabledTest.java</excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
index 04bbda3..8837bb4 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
@@ -179,6 +179,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
index 06cb2ae..4fba947 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
@@ -196,6 +196,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
index eba41d4..a71542e 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
@@ -184,6 +184,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
index 409a8c9..8436323 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
@@ -200,6 +200,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
index bd30216..3af7acf 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
@@ -184,6 +184,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-cw/pom.xml b/integration-test-groups/aws2/aws2-cw/pom.xml
index 6e21598..9cb2f8d 100644
--- a/integration-test-groups/aws2/aws2-cw/pom.xml
+++ b/integration-test-groups/aws2/aws2-cw/pom.xml
@@ -119,6 +119,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-ddb/pom.xml b/integration-test-groups/aws2/aws2-ddb/pom.xml
index 4c0e6e0..e7d8bc6 100644
--- a/integration-test-groups/aws2/aws2-ddb/pom.xml
+++ b/integration-test-groups/aws2/aws2-ddb/pom.xml
@@ -119,6 +119,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-kinesis/pom.xml b/integration-test-groups/aws2/aws2-kinesis/pom.xml
index 8c82d00..ac36c7f 100644
--- a/integration-test-groups/aws2/aws2-kinesis/pom.xml
+++ b/integration-test-groups/aws2/aws2-kinesis/pom.xml
@@ -141,6 +141,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-lambda/pom.xml b/integration-test-groups/aws2/aws2-lambda/pom.xml
index c527fa6..4b3c2c9 100644
--- a/integration-test-groups/aws2/aws2-lambda/pom.xml
+++ b/integration-test-groups/aws2/aws2-lambda/pom.xml
@@ -141,6 +141,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-s3/pom.xml b/integration-test-groups/aws2/aws2-s3/pom.xml
index 2517e29..a47d83b 100644
--- a/integration-test-groups/aws2/aws2-s3/pom.xml
+++ b/integration-test-groups/aws2/aws2-s3/pom.xml
@@ -191,6 +191,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-ses/pom.xml b/integration-test-groups/aws2/aws2-ses/pom.xml
index 08d820f..f063b4d 100644
--- a/integration-test-groups/aws2/aws2-ses/pom.xml
+++ b/integration-test-groups/aws2/aws2-ses/pom.xml
@@ -120,6 +120,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-sqs-sns/pom.xml b/integration-test-groups/aws2/aws2-sqs-sns/pom.xml
index 9a801d6..1ee3fdd 100644
--- a/integration-test-groups/aws2/aws2-sqs-sns/pom.xml
+++ b/integration-test-groups/aws2/aws2-sqs-sns/pom.xml
@@ -131,6 +131,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/aws2/aws2-sqs/pom.xml b/integration-test-groups/aws2/aws2-sqs/pom.xml
index 93f5ad4..24307e0 100644
--- a/integration-test-groups/aws2/aws2-sqs/pom.xml
+++ b/integration-test-groups/aws2/aws2-sqs/pom.xml
@@ -119,6 +119,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/integration-test-groups/azure/azure-eventhubs/pom.xml b/integration-test-groups/azure/azure-eventhubs/pom.xml
index 12b5707..a87ed56 100644
--- a/integration-test-groups/azure/azure-eventhubs/pom.xml
+++ b/integration-test-groups/azure/azure-eventhubs/pom.xml
@@ -135,6 +135,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/azure/azure-storage-blob/pom.xml b/integration-test-groups/azure/azure-storage-blob/pom.xml
index 11502ca..e5837f2 100644
--- a/integration-test-groups/azure/azure-storage-blob/pom.xml
+++ b/integration-test-groups/azure/azure-storage-blob/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/azure/azure-storage-queue/pom.xml b/integration-test-groups/azure/azure-storage-queue/pom.xml
index 53e42f5..a82bc4d 100644
--- a/integration-test-groups/azure/azure-storage-queue/pom.xml
+++ b/integration-test-groups/azure/azure-storage-queue/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/mongodb/mongodb-gridfs/pom.xml b/integration-test-groups/mongodb/mongodb-gridfs/pom.xml
index 1db001a..099a4db 100644
--- a/integration-test-groups/mongodb/mongodb-gridfs/pom.xml
+++ b/integration-test-groups/mongodb/mongodb-gridfs/pom.xml
@@ -119,6 +119,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-test-groups/mongodb/mongodb/pom.xml b/integration-test-groups/mongodb/mongodb/pom.xml
index c840f0a..a2556c1 100644
--- a/integration-test-groups/mongodb/mongodb/pom.xml
+++ b/integration-test-groups/mongodb/mongodb/pom.xml
@@ -119,6 +119,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests-jvm/couchbase/pom.xml b/integration-tests-jvm/couchbase/pom.xml
index 57167cc..2ea6a66 100644
--- a/integration-tests-jvm/couchbase/pom.xml
+++ b/integration-tests-jvm/couchbase/pom.xml
@@ -88,6 +88,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests-jvm/hbase/pom.xml b/integration-tests-jvm/hbase/pom.xml
index 7aa5d38..2212a92 100644
--- a/integration-tests-jvm/hbase/pom.xml
+++ b/integration-tests-jvm/hbase/pom.xml
@@ -115,6 +115,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests-jvm/redis/pom.xml b/integration-tests-jvm/redis/pom.xml
index 95bc9de..8fe257f 100644
--- a/integration-tests-jvm/redis/pom.xml
+++ b/integration-tests-jvm/redis/pom.xml
@@ -126,5 +126,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/activemq/pom.xml b/integration-tests/activemq/pom.xml
index 04c1307..f88e0fa 100644
--- a/integration-tests/activemq/pom.xml
+++ b/integration-tests/activemq/pom.xml
@@ -127,6 +127,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/amqp/pom.xml b/integration-tests/amqp/pom.xml
index 693a0fa..3266f38 100644
--- a/integration-tests/amqp/pom.xml
+++ b/integration-tests/amqp/pom.xml
@@ -127,6 +127,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/arangodb/pom.xml b/integration-tests/arangodb/pom.xml
index b40954f..89dd798 100644
--- a/integration-tests/arangodb/pom.xml
+++ b/integration-tests/arangodb/pom.xml
@@ -111,6 +111,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/aws2-grouped/pom.xml b/integration-tests/aws2-grouped/pom.xml
index 255eb89..edab93a 100644
--- a/integration-tests/aws2-grouped/pom.xml
+++ b/integration-tests/aws2-grouped/pom.xml
@@ -339,6 +339,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/aws2-quarkus-client-grouped/pom.xml b/integration-tests/aws2-quarkus-client-grouped/pom.xml
index 0e9ea85..91f3cc1 100644
--- a/integration-tests/aws2-quarkus-client-grouped/pom.xml
+++ b/integration-tests/aws2-quarkus-client-grouped/pom.xml
@@ -359,6 +359,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/aws2/pom.xml b/integration-tests/aws2/pom.xml
index 4fa0bc1..769da09 100644
--- a/integration-tests/aws2/pom.xml
+++ b/integration-tests/aws2/pom.xml
@@ -318,6 +318,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/azure-grouped/pom.xml b/integration-tests/azure-grouped/pom.xml
index b8f7007..1e956a6 100644
--- a/integration-tests/azure-grouped/pom.xml
+++ b/integration-tests/azure-grouped/pom.xml
@@ -229,6 +229,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/cassandraql/pom.xml b/integration-tests/cassandraql/pom.xml
index 74facf7..6597893 100644
--- a/integration-tests/cassandraql/pom.xml
+++ b/integration-tests/cassandraql/pom.xml
@@ -171,6 +171,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/consul/pom.xml b/integration-tests/consul/pom.xml
index c6d42a6..351df17 100644
--- a/integration-tests/consul/pom.xml
+++ b/integration-tests/consul/pom.xml
@@ -115,6 +115,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/couchdb/pom.xml b/integration-tests/couchdb/pom.xml
index d9a7ca0..2e9dc6c 100644
--- a/integration-tests/couchdb/pom.xml
+++ b/integration-tests/couchdb/pom.xml
@@ -120,6 +120,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/debezium/pom.xml b/integration-tests/debezium/pom.xml
index 8f4c841..a20e3b6 100644
--- a/integration-tests/debezium/pom.xml
+++ b/integration-tests/debezium/pom.xml
@@ -218,6 +218,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/elasticsearch-rest/pom.xml b/integration-tests/elasticsearch-rest/pom.xml
index 78238d7..fe433c2 100644
--- a/integration-tests/elasticsearch-rest/pom.xml
+++ b/integration-tests/elasticsearch-rest/pom.xml
@@ -133,5 +133,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/fhir/pom.xml b/integration-tests/fhir/pom.xml
index 6819e50..c98e520 100644
--- a/integration-tests/fhir/pom.xml
+++ b/integration-tests/fhir/pom.xml
@@ -146,6 +146,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/google-pubsub/pom.xml b/integration-tests/google-pubsub/pom.xml
index 85887cc..37c28b4 100644
--- a/integration-tests/google-pubsub/pom.xml
+++ b/integration-tests/google-pubsub/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/google-storage/pom.xml b/integration-tests/google-storage/pom.xml
index 66e9830..f91f922 100644
--- a/integration-tests/google-storage/pom.xml
+++ b/integration-tests/google-storage/pom.xml
@@ -135,6 +135,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/http/pom.xml b/integration-tests/http/pom.xml
index 6fcd4c4..82b779c 100644
--- a/integration-tests/http/pom.xml
+++ b/integration-tests/http/pom.xml
@@ -218,6 +218,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/infinispan/pom.xml b/integration-tests/infinispan/pom.xml
index 23f714f..4842ce0 100644
--- a/integration-tests/infinispan/pom.xml
+++ b/integration-tests/infinispan/pom.xml
@@ -149,6 +149,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/influxdb/pom.xml b/integration-tests/influxdb/pom.xml
index ce3cbb9..5878b49 100644
--- a/integration-tests/influxdb/pom.xml
+++ b/integration-tests/influxdb/pom.xml
@@ -115,6 +115,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/ipfs/pom.xml b/integration-tests/ipfs/pom.xml
index a770a83..3a87a83 100644
--- a/integration-tests/ipfs/pom.xml
+++ b/integration-tests/ipfs/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/jms-artemis-client/pom.xml b/integration-tests/jms-artemis-client/pom.xml
index e12707d..1670dac 100644
--- a/integration-tests/jms-artemis-client/pom.xml
+++ b/integration-tests/jms-artemis-client/pom.xml
@@ -145,6 +145,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/jms-qpid-amqp-client/pom.xml b/integration-tests/jms-qpid-amqp-client/pom.xml
index 6a79a0e..b6a929c 100644
--- a/integration-tests/jms-qpid-amqp-client/pom.xml
+++ b/integration-tests/jms-qpid-amqp-client/pom.xml
@@ -144,6 +144,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/jsch/pom.xml b/integration-tests/jsch/pom.xml
index 1b876b7..1ec84af 100644
--- a/integration-tests/jsch/pom.xml
+++ b/integration-tests/jsch/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/jta/pom.xml b/integration-tests/jta/pom.xml
index 864d9e5..6edffa3 100644
--- a/integration-tests/jta/pom.xml
+++ b/integration-tests/jta/pom.xml
@@ -219,6 +219,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/kafka-oauth/pom.xml b/integration-tests/kafka-oauth/pom.xml
index 8a7e6be..3c71497 100644
--- a/integration-tests/kafka-oauth/pom.xml
+++ b/integration-tests/kafka-oauth/pom.xml
@@ -203,5 +203,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
\ No newline at end of file
diff --git a/integration-tests/kafka-sasl-ssl/pom.xml b/integration-tests/kafka-sasl-ssl/pom.xml
index 72df45c..3f5261d 100644
--- a/integration-tests/kafka-sasl-ssl/pom.xml
+++ b/integration-tests/kafka-sasl-ssl/pom.xml
@@ -130,6 +130,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/kafka-sasl/pom.xml b/integration-tests/kafka-sasl/pom.xml
index fbd6892..87e29f9 100644
--- a/integration-tests/kafka-sasl/pom.xml
+++ b/integration-tests/kafka-sasl/pom.xml
@@ -134,6 +134,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/kafka-ssl/pom.xml b/integration-tests/kafka-ssl/pom.xml
index 4fc06e6..36dfc04 100644
--- a/integration-tests/kafka-ssl/pom.xml
+++ b/integration-tests/kafka-ssl/pom.xml
@@ -134,6 +134,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/kafka/pom.xml b/integration-tests/kafka/pom.xml
index 29fb6e3..e2ce38a 100644
--- a/integration-tests/kafka/pom.xml
+++ b/integration-tests/kafka/pom.xml
@@ -193,6 +193,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/kudu/pom.xml b/integration-tests/kudu/pom.xml
index cae7e30..7f09819 100644
--- a/integration-tests/kudu/pom.xml
+++ b/integration-tests/kudu/pom.xml
@@ -166,5 +166,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/lra/pom.xml b/integration-tests/lra/pom.xml
index 700a3ca..25cd0a0 100644
--- a/integration-tests/lra/pom.xml
+++ b/integration-tests/lra/pom.xml
@@ -171,6 +171,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/minio/pom.xml b/integration-tests/minio/pom.xml
index 604bf62..6a1b160 100644
--- a/integration-tests/minio/pom.xml
+++ b/integration-tests/minio/pom.xml
@@ -115,6 +115,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/mongodb-grouped/pom.xml b/integration-tests/mongodb-grouped/pom.xml
index a33eb11..d367ded 100644
--- a/integration-tests/mongodb-grouped/pom.xml
+++ b/integration-tests/mongodb-grouped/pom.xml
@@ -195,6 +195,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/nats/pom.xml b/integration-tests/nats/pom.xml
index 36f52f1..357b3dd 100644
--- a/integration-tests/nats/pom.xml
+++ b/integration-tests/nats/pom.xml
@@ -137,5 +137,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/nsq/pom.xml b/integration-tests/nsq/pom.xml
index 681bd3fb..da5272d 100644
--- a/integration-tests/nsq/pom.xml
+++ b/integration-tests/nsq/pom.xml
@@ -133,5 +133,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/paho-mqtt5/pom.xml b/integration-tests/paho-mqtt5/pom.xml
index 5091826..a8be719 100644
--- a/integration-tests/paho-mqtt5/pom.xml
+++ b/integration-tests/paho-mqtt5/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/paho/pom.xml b/integration-tests/paho/pom.xml
index c622550..30da62c 100644
--- a/integration-tests/paho/pom.xml
+++ b/integration-tests/paho/pom.xml
@@ -110,6 +110,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/pg-replication-slot/pom.xml b/integration-tests/pg-replication-slot/pom.xml
index beeb186..f6188fa 100644
--- a/integration-tests/pg-replication-slot/pom.xml
+++ b/integration-tests/pg-replication-slot/pom.xml
@@ -120,5 +120,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/pgevent/pom.xml b/integration-tests/pgevent/pom.xml
index f83128f..f6489b9 100644
--- a/integration-tests/pgevent/pom.xml
+++ b/integration-tests/pgevent/pom.xml
@@ -149,5 +149,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/rabbitmq/pom.xml b/integration-tests/rabbitmq/pom.xml
index fb5179c..bce1d37 100644
--- a/integration-tests/rabbitmq/pom.xml
+++ b/integration-tests/rabbitmq/pom.xml
@@ -111,5 +111,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/sjms-artemis-client/pom.xml b/integration-tests/sjms-artemis-client/pom.xml
index 07f0fb4..e19b252 100644
--- a/integration-tests/sjms-artemis-client/pom.xml
+++ b/integration-tests/sjms-artemis-client/pom.xml
@@ -144,6 +144,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/sjms-qpid-amqp-client/pom.xml b/integration-tests/sjms-qpid-amqp-client/pom.xml
index f6e7edb..424d823 100644
--- a/integration-tests/sjms-qpid-amqp-client/pom.xml
+++ b/integration-tests/sjms-qpid-amqp-client/pom.xml
@@ -144,6 +144,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/sjms2-artemis-client/pom.xml b/integration-tests/sjms2-artemis-client/pom.xml
index 71c368d..20a4cab 100644
--- a/integration-tests/sjms2-artemis-client/pom.xml
+++ b/integration-tests/sjms2-artemis-client/pom.xml
@@ -144,6 +144,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/sjms2-qpid-amqp-client/pom.xml b/integration-tests/sjms2-qpid-amqp-client/pom.xml
index 8ba7be6..5c816c2 100644
--- a/integration-tests/sjms2-qpid-amqp-client/pom.xml
+++ b/integration-tests/sjms2-qpid-amqp-client/pom.xml
@@ -144,6 +144,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/solr/pom.xml b/integration-tests/solr/pom.xml
index 0a5241c..c7caf44 100644
--- a/integration-tests/solr/pom.xml
+++ b/integration-tests/solr/pom.xml
@@ -178,7 +178,17 @@
</dependency>
</dependencies>
</profile>
-
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/splunk/pom.xml b/integration-tests/splunk/pom.xml
index a328662..2cda15a 100644
--- a/integration-tests/splunk/pom.xml
+++ b/integration-tests/splunk/pom.xml
@@ -131,6 +131,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/spring-rabbitmq/pom.xml b/integration-tests/spring-rabbitmq/pom.xml
index e955aa0..7d50303 100644
--- a/integration-tests/spring-rabbitmq/pom.xml
+++ b/integration-tests/spring-rabbitmq/pom.xml
@@ -133,6 +133,17 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
diff --git a/integration-tests/ssh/pom.xml b/integration-tests/ssh/pom.xml
index cd72224..ea21ddd 100644
--- a/integration-tests/ssh/pom.xml
+++ b/integration-tests/ssh/pom.xml
@@ -111,5 +111,16 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
</profiles>
</project>
[camel-quarkus] 08/22: DebeziumMongodbTest skipped tests #3213
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f8a37cceb3a728c62fd50e96995938cef69e9580
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Thu Nov 4 16:19:48 2021 +0100
DebeziumMongodbTest skipped tests #3213
---
.../common/it/mongodb/DebeziumMongodbTest.java | 13 ++------
.../common/it/mysql/DebeziumMysqlTest.java | 36 +++-------------------
.../common/it/sqlserver/DebeziumSqlserverTest.java | 33 ++++----------------
3 files changed, 14 insertions(+), 68 deletions(-)
diff --git a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mongodb/DebeziumMongodbTest.java b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mongodb/DebeziumMongodbTest.java
index 5ef6cf6..cbf9390 100644
--- a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mongodb/DebeziumMongodbTest.java
+++ b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mongodb/DebeziumMongodbTest.java
@@ -40,12 +40,12 @@ import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
-import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
@QuarkusTest
@@ -54,9 +54,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
class DebeziumMongodbTest extends AbstractDebeziumTest {
private static final Logger LOG = Logger.getLogger(DebeziumMongodbTest.class);
- //constant with value of Type.mongodb.getJdbcProperty
- public static final String PROPERTY_JDBC = "mongodb_jdbc";
-
private static MongoClient mongoClient;
private static MongoCollection companies;
@@ -74,10 +71,10 @@ class DebeziumMongodbTest extends AbstractDebeziumTest {
if (mongoUrl.isPresent()) {
mongoClient = MongoClients.create(mongoUrl.get());
} else {
- LOG.warn("Container is not running. Connection is not created.");
+ fail("Container is not running. Connection is not created.");
}
- assumeTrue(mongoClient != null);
+ assertNotNull(mongoClient, String.format("Can not create client for url '%s'.", mongoUrl.get()));
MongoDatabase db = mongoClient.getDatabase("test");
@@ -108,7 +105,6 @@ class DebeziumMongodbTest extends AbstractDebeziumTest {
@Test
@Order(0)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveInit() {
receiveResponse()
.then()
@@ -131,14 +127,12 @@ class DebeziumMongodbTest extends AbstractDebeziumTest {
@Test
@Order(1)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testInsert() throws SQLException {
super.testInsert();
}
@Test
@Order(2)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testUpdate() throws SQLException {
Document doc = new Document().append("name", COMPANY_2).append("city", CITY_2);
companies.insertOne(doc);
@@ -156,7 +150,6 @@ class DebeziumMongodbTest extends AbstractDebeziumTest {
@Test
@Order(3)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testDelete() throws SQLException {
DeleteResult dr = companies.deleteMany(new Document().append("name", COMPANY_2));
assertEquals(1, dr.getDeletedCount(), "Only one company should be deleted.");
diff --git a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTest.java b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTest.java
index 734ecc2..8530879 100644
--- a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTest.java
+++ b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/mysql/DebeziumMysqlTest.java
@@ -29,12 +29,12 @@ import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
-import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
@QuarkusTest
@QuarkusTestResource(DebeziumMysqlTestResource.class)
@@ -42,8 +42,6 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
class DebeziumMysqlTest extends AbstractDebeziumTest {
private static final Logger LOG = Logger.getLogger(DebeziumMysqlTest.class);
- //has to be constant and has to be equal to Type.mysql.getJdbcProperty
- public static final String PROPERTY_JDBC = "mysql_jdbc";
private static Connection connection;
public DebeziumMysqlTest() {
@@ -53,13 +51,11 @@ class DebeziumMysqlTest extends AbstractDebeziumTest {
@BeforeAll
public static void setUp() throws SQLException {
Config config = ConfigProvider.getConfig();
- Optional<String> jdbcUrl = config.getOptionalValue(PROPERTY_JDBC, String.class);
+ Optional<String> jdbcUrl = config.getOptionalValue(Type.mysql.getPropertyJdbc(), String.class);
- if (jdbcUrl.isPresent()) {
- connection = DriverManager.getConnection(jdbcUrl.get());
- } else {
- LOG.warn("Container is not running. Connection is not created.");
- }
+ Assumptions.assumeTrue(jdbcUrl.isPresent(), "Driver for mySql database is not provided. Container won't start.");
+
+ connection = DriverManager.getConnection(jdbcUrl.get());
}
@AfterAll
@@ -71,7 +67,6 @@ class DebeziumMysqlTest extends AbstractDebeziumTest {
@Test
@Order(0)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveEmptyMessages() {
//receive all empty messages before other tests
receiveResponse("/receiveEmptyMessages")
@@ -79,27 +74,6 @@ class DebeziumMysqlTest extends AbstractDebeziumTest {
.statusCode(204);
}
- @Test
- @Order(1)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testInsert() throws SQLException {
- super.testInsert();
- }
-
- @Test
- @Order(2)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testUpdate() throws SQLException {
- super.testUpdate();
- }
-
- @Test
- @Order(3)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testDelete() throws SQLException {
- super.testDelete();
- }
-
@Override
protected Connection getConnection() {
return connection;
diff --git a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/sqlserver/DebeziumSqlserverTest.java b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/sqlserver/DebeziumSqlserverTest.java
index 6f29e19..84d24f2 100644
--- a/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/sqlserver/DebeziumSqlserverTest.java
+++ b/integration-tests/debezium/src/test/java/org/apache/camel/quarkus/component/debezium/common/it/sqlserver/DebeziumSqlserverTest.java
@@ -37,7 +37,6 @@ import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
-import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
@@ -48,9 +47,6 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
class DebeziumSqlserverTest extends AbstractDebeziumTest {
private static final Logger LOG = Logger.getLogger(DebeziumSqlserverTest.class);
- //has to be constant and has to be equal to Type.mysql.getJdbcProperty
- public static final String PROPERTY_JDBC = "sqlserver_jdbc";
-
private static Connection connection;
public DebeziumSqlserverTest() {
@@ -62,6 +58,9 @@ class DebeziumSqlserverTest extends AbstractDebeziumTest {
Config config = ConfigProvider.getConfig();
final Optional<String> jdbcUrl = config.getOptionalValue(Type.sqlserver.getPropertyJdbc(), String.class);
+ assumeTrue(jdbcUrl.isPresent(),
+ "Ms SQL EULA is not accepted. Container won't start.");
+
if (jdbcUrl.isPresent()) {
connection = DriverManager.getConnection(jdbcUrl.get());
} else {
@@ -93,8 +92,10 @@ class DebeziumSqlserverTest extends AbstractDebeziumTest {
@Test
@Order(0)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveInitCompany() {
+ Config config = ConfigProvider.getConfig();
+ assumeTrue(config.getOptionalValue(Type.sqlserver.getPropertyJdbc(), String.class).isPresent());
+
int i = 0;
while (i++ < AbstractDebeziumTest.REPEAT_COUNT) {
@@ -115,26 +116,4 @@ class DebeziumSqlserverTest extends AbstractDebeziumTest {
break;
}
}
-
- @Test
- @Order(1)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testInsert() throws SQLException {
- super.testInsert();
- }
-
- @Test
- @Order(2)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testUpdate() throws SQLException {
- super.testUpdate();
- }
-
- @Test
- @Order(3)
- @EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
- public void testDelete() throws SQLException {
- super.testDelete();
- }
-
}
[camel-quarkus] 10/22: Remove duplicate software.amazon.awssdk:iam dependency declaration
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit bc087bb9a19e041a3ca9293dcb77d0511580f27d
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Feb 11 15:02:28 2022 +0000
Remove duplicate software.amazon.awssdk:iam dependency declaration
---
integration-tests/aws2-grouped/pom.xml | 5 -----
1 file changed, 5 deletions(-)
diff --git a/integration-tests/aws2-grouped/pom.xml b/integration-tests/aws2-grouped/pom.xml
index ec8a546..278c436 100644
--- a/integration-tests/aws2-grouped/pom.xml
+++ b/integration-tests/aws2-grouped/pom.xml
@@ -113,11 +113,6 @@
<groupId>software.amazon.awssdk</groupId>
<artifactId>iam</artifactId>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>software.amazon.awssdk</groupId>
- <artifactId>iam</artifactId>
- <scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
[camel-quarkus] 01/22: Disable CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest on Windows due to #3529
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 8015d5ca45a7f393c5164fc4a6216c5b56a1792a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 7 10:38:27 2022 +0000
Disable CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest on Windows due to #3529
---
...CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/integration-tests/main-devmode/src/test/java/org/apache/camel/quarkus/main/CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest.java b/integration-tests/main-devmode/src/test/java/org/apache/camel/quarkus/main/CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest.java
index 7cc619a..d95f9b6 100644
--- a/integration-tests/main-devmode/src/test/java/org/apache/camel/quarkus/main/CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest.java
+++ b/integration-tests/main-devmode/src/test/java/org/apache/camel/quarkus/main/CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest.java
@@ -37,11 +37,14 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.extension.RegisterExtension;
import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;
+@DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/apache/camel-quarkus/issues/3529")
public class CamelMainRoutesIncludePatternWithAbsoluteFilePrefixDevModeTest {
static Path BASE;
[camel-quarkus] 05/22: Run integration tests on Windows
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit b399dac7c78915d2da6d992f1c41bf6a2b261479
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 9 07:26:13 2022 +0000
Run integration tests on Windows
Fixes #3342
---
.github/workflows/ci-build.yaml | 51 +++++++++++++++++++++++++++++++++++++----
1 file changed, 46 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 05e2ae4..9873811 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -195,8 +195,6 @@ jobs:
runs-on: ubuntu-latest
needs: initial-mvn-install
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
- strategy:
- fail-fast: false
env:
MAVEN_OPTS: -Xmx3000m
steps:
@@ -301,12 +299,10 @@ jobs:
--fail-at-end \
clean test
- integration-tests-alternative-jvm:
+ integration-tests-alternative-jdk:
runs-on: ubuntu-latest
needs: initial-mvn-install
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
- strategy:
- fail-fast: false
env:
MAVEN_OPTS: -Xmx3000m
steps:
@@ -351,6 +347,51 @@ jobs:
--fail-at-end \
clean verify
+ integration-tests-alternative-platform:
+ runs-on: ${{ matrix.os }}
+ needs: initial-mvn-install
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ 'windows-latest' ]
+ if: github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'JVM')
+ env:
+ MAVEN_OPTS: -Xmx3000m
+ steps:
+ - name: Setup apache-snapshots profile
+ shell: bash
+ if: github.ref == 'refs/heads/camel-main' || github.base_ref == 'camel-main'
+ run: |
+ echo "BRANCH_OPTIONS=-Papache-snapshots" >> $GITHUB_ENV
+ - name: Setup oss-snapshots profile
+ shell: bash
+ if: github.ref == 'refs/heads/quarkus-main' || github.base_ref == 'quarkus-main'
+ run: |
+ echo "BRANCH_OPTIONS=-Poss-snapshots -Dquarkus.version=999-SNAPSHOT" >> $GITHUB_ENV
+ - uses: actions/checkout@v2
+ - name: Set up JDK 11
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Download Maven Repo
+ uses: actions/download-artifact@v2
+ with:
+ name: maven-repo
+ path: ..
+ - name: Extract Maven Repo
+ shell: bash
+ run: |
+ tar -xzf ../maven-repo.tgz -C ~
+ - name: cd integration-tests && mvn clean verify
+ shell: bash
+ run: |
+ cd integration-tests
+ ../mvnw ${MAVEN_ARGS} ${BRANCH_OPTIONS} \
+ -Dskip-testcontainers-tests -Dformatter.skip -Dimpsort.skip -Denforcer.skip \
+ --fail-at-end \
+ clean verify
+
examples-tests:
needs: initial-mvn-install
runs-on: ubuntu-latest
[camel-quarkus] 13/22: Fixup e72113e send optaplanner test messages asynchronously
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 7bb9e601f908d2c539efdf7aa8bd9152aad886bc
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 14 08:13:13 2022 +0000
Fixup e72113e send optaplanner test messages asynchronously
---
.../camel/quarkus/component/optaplanner/it/OptaplannerResource.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
index 3fe3c8a..4cef2f1 100644
--- a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
+++ b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
@@ -63,7 +63,9 @@ public class OptaplannerResource {
@Path("solveSync")
public void solveSync() {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- producerTemplate.sendBodyAndHeader("direct:solveSync", DataGenerator.timeTable, OptaPlannerConstants.SOLVER_MANAGER,
+ // The message payload is sent asynchronously, but the optaplanner route is configured to solve the problem synchronously
+ producerTemplate.asyncRequestBodyAndHeader("direct:solveSync", DataGenerator.timeTable,
+ OptaPlannerConstants.SOLVER_MANAGER,
solverManager);
}
}
@@ -72,7 +74,7 @@ public class OptaplannerResource {
@Path("solveAsync")
public void solveAsync() throws ExecutionException, InterruptedException {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- producerTemplate.sendBodyAndHeader("direct:solveAsync", DataGenerator.timeTable,
+ producerTemplate.asyncRequestBodyAndHeader("direct:solveAsync", DataGenerator.timeTable,
OptaPlannerConstants.SOLVER_MANAGER, solverManager);
}
}
[camel-quarkus] 21/22: Upgrade Quarkus to 2.7.2.Final
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit b3b74301fe15c83ba47723d56f6d519c826e832f
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Feb 23 09:19:27 2022 +0000
Upgrade Quarkus to 2.7.2.Final
---
docs/antora.yml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/antora.yml b/docs/antora.yml
index 2189813..44d86eb 100644
--- a/docs/antora.yml
+++ b/docs/antora.yml
@@ -29,7 +29,7 @@ asciidoc:
target-maven-version: 3.8.4 # replace ${target-maven-version}
camel-version: 3.14.1 # replace ${camel.version}
camel-docs-version: 3.14.x # replace ${camel.docs.components.version}
- quarkus-version: 2.7.1.Final # replace ${quarkus.version}
+ quarkus-version: 2.7.2.Final # replace ${quarkus.version}
graalvm-version: 21.3.1 # replace ${graalvm.version}
graalvm-docs-version: 21.3
# attributes used in xrefs to other Antora components
diff --git a/pom.xml b/pom.xml
index d839fd3..4853216 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
<quarkiverse-jsch.version>1.0.0</quarkiverse-jsch.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/jsch/quarkus-jsch-parent/ -->
<quarkiverse-minio.version>2.3.0</quarkiverse-minio.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/minio/quarkus-minio-parent/ -->
<quarkiverse-tika.version>1.0.3</quarkiverse-tika.version><!-- https://repo1.maven.org/maven2/io/quarkiverse/tika/quarkus-tika-parent/ -->
- <quarkus.version>2.7.1.Final</quarkus.version><!-- https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/ -->
+ <quarkus.version>2.7.2.Final</quarkus.version><!-- https://repo1.maven.org/maven2/io/quarkus/quarkus-bom/ -->
<quarkus-hazelcast-client.version>2.0.0</quarkus-hazelcast-client.version><!-- https://repo1.maven.org/maven2/com/hazelcast/quarkus-hazelcast-client-bom/ -->
<quarkus-qpid-jms.version>0.32.0</quarkus-qpid-jms.version><!-- https://repo1.maven.org/maven2/org/amqphub/quarkus/quarkus-qpid-jms-bom/ -->
[camel-quarkus] 09/22: Poll for optaplanner results to avoid timeouts on slow machines
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit a12ff645711ccc9871fbb9dc5b72ee77f61e43d6
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Feb 11 14:09:57 2022 +0000
Poll for optaplanner results to avoid timeouts on slow machines
---
integration-tests/optaplanner/pom.xml | 12 ++-
.../optaplanner/it/OptaplannerResource.java | 85 +++++++++++++------
.../quarkus/component/optaplanner/it/Routes.java | 15 ++--
.../component/optaplanner/it/OptaplannerTest.java | 98 ++++++++++++++++++----
4 files changed, 159 insertions(+), 51 deletions(-)
diff --git a/integration-tests/optaplanner/pom.xml b/integration-tests/optaplanner/pom.xml
index b9c880f..bcf5997 100644
--- a/integration-tests/optaplanner/pom.xml
+++ b/integration-tests/optaplanner/pom.xml
@@ -36,10 +36,6 @@
<artifactId>camel-quarkus-optaplanner</artifactId>
</dependency>
<dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy-jackson</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-direct</artifactId>
</dependency>
@@ -47,6 +43,14 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mock</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jsonb</artifactId>
+ </dependency>
<!-- test dependencies -->
<dependency>
diff --git a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
index e1f9640..3fe3c8a 100644
--- a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
+++ b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerResource.java
@@ -16,23 +16,30 @@
*/
package org.apache.camel.quarkus.component.optaplanner.it;
-import java.util.concurrent.CompletableFuture;
+import java.util.Optional;
import java.util.concurrent.ExecutionException;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
+import javax.json.Json;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
import javax.ws.rs.GET;
+import javax.ws.rs.POST;
import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.optaplanner.OptaPlannerConstants;
import org.apache.camel.quarkus.component.optaplanner.it.bootstrap.DataGenerator;
+import org.apache.camel.quarkus.component.optaplanner.it.domain.Room;
import org.apache.camel.quarkus.component.optaplanner.it.domain.TimeTable;
-import org.jboss.logging.Logger;
+import org.apache.camel.quarkus.component.optaplanner.it.domain.Timeslot;
import org.optaplanner.core.api.solver.SolverManager;
import org.optaplanner.core.api.solver.SolverStatus;
@@ -41,8 +48,6 @@ import org.optaplanner.core.api.solver.SolverStatus;
@Produces(MediaType.APPLICATION_JSON)
public class OptaplannerResource {
- private static final Logger LOG = Logger.getLogger(OptaplannerResource.class);
-
public static final Long SINGLETON_TIME_TABLE_ID = 1L;
@Inject
@@ -54,38 +59,68 @@ public class OptaplannerResource {
@Inject
CamelContext context;
- @GET
+ @POST
@Path("solveSync")
- public TimeTable solveSync() {
+ public void solveSync() {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- TimeTable finalSolution = producerTemplate.requestBodyAndHeader(
- "direct:solveSync", DataGenerator.timeTable,
- OptaPlannerConstants.SOLVER_MANAGER, solverManager, TimeTable.class);
- return finalSolution;
+ producerTemplate.sendBodyAndHeader("direct:solveSync", DataGenerator.timeTable, OptaPlannerConstants.SOLVER_MANAGER,
+ solverManager);
}
- return DataGenerator.timeTable;
}
- @GET
+ @POST
@Path("solveAsync")
- public TimeTable solveAsync() throws ExecutionException, InterruptedException {
+ public void solveAsync() throws ExecutionException, InterruptedException {
if (SolverStatus.NOT_SOLVING == solverManager.getSolverStatus(SINGLETON_TIME_TABLE_ID)) {
- CompletableFuture<TimeTable> response = producerTemplate.asyncRequestBodyAndHeader(
- "direct:solveAsync", DataGenerator.timeTable, OptaPlannerConstants.SOLVER_MANAGER,
- solverManager, TimeTable.class);
+ producerTemplate.sendBodyAndHeader("direct:solveAsync", DataGenerator.timeTable,
+ OptaPlannerConstants.SOLVER_MANAGER, solverManager);
+ }
+ }
- TimeTable finalSolution = response.get();
- return finalSolution;
+ @POST
+ @Path("consumer/{enable}")
+ public void mangeOptaplannerConsumer(@PathParam("enable") boolean enable) throws Exception {
+ if (enable) {
+ context.getRouteController().startRoute("optaplanner-consumer");
+ } else {
+ context.getRouteController().stopRoute("optaplanner-consumer");
}
- return DataGenerator.timeTable;
}
@GET
- @Path("newBestSolution")
- public TimeTable getNewBestSolution() {
- MockEndpoint mockEndpoint = context.getEndpoint("mock:best-solution", MockEndpoint.class);
- return mockEndpoint.getReceivedExchanges().stream().map(
- exchange -> exchange.getMessage().getHeader(OptaPlannerConstants.BEST_SOLUTION, TimeTable.class))
- .findFirst().orElse(null);
+ @Path("solution/{mockEndpointUri}")
+ @Produces(MediaType.APPLICATION_JSON)
+ public JsonObject getSolution(@PathParam("mockEndpointUri") String mockEndpointUri) {
+ MockEndpoint mockEndpoint = context.getEndpoint("mock:" + mockEndpointUri, MockEndpoint.class);
+ Optional<JsonObject> result = mockEndpoint.getReceivedExchanges()
+ .stream()
+ .map(Exchange::getMessage)
+ .map(message -> {
+ if (mockEndpointUri.equals("bestSolution")) {
+ return message.getHeader(OptaPlannerConstants.BEST_SOLUTION, TimeTable.class);
+ } else {
+ return message.getBody(TimeTable.class);
+ }
+ })
+ .map(this::extractResults)
+ .findFirst();
+
+ if (result.isPresent()) {
+ mockEndpoint.reset();
+ return result.get();
+ }
+ return extractResults(null);
+ }
+
+ private JsonObject extractResults(TimeTable timeTable) {
+ JsonObjectBuilder builder = Json.createObjectBuilder();
+ if (timeTable != null) {
+ Timeslot timeslot = timeTable.getTimeslotList().get(0);
+ Room room = timeTable.getRoomList().get(0);
+ builder.add("timeslot", timeslot.getId()).add("room", room.getId());
+ } else {
+ builder.add("timeslot", "-1").add("room", "-1");
+ }
+ return builder.build();
}
}
diff --git a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/Routes.java b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/Routes.java
index 809cd59..ee83982 100644
--- a/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/Routes.java
+++ b/integration-tests/optaplanner/src/main/java/org/apache/camel/quarkus/component/optaplanner/it/Routes.java
@@ -26,15 +26,20 @@ public class Routes extends RouteBuilder {
public void configure() throws Exception {
// async producer
- from("direct:solveAsync").to("optaplanner:anything?useSolverManager=true&async=true&problemId="
- + OptaplannerResource.SINGLETON_TIME_TABLE_ID);
+ from("direct:solveAsync")
+ .toF("optaplanner:anything?useSolverManager=true&async=true&problemId=%d",
+ OptaplannerResource.SINGLETON_TIME_TABLE_ID)
+ .to("mock:solveAsync");
// async consumer
- from("optaplanner:anything?useSolverManager=true&problemId=" + OptaplannerResource.SINGLETON_TIME_TABLE_ID)
- .to("mock:best-solution");
+ fromF("optaplanner:anything?useSolverManager=true&problemId=%d", OptaplannerResource.SINGLETON_TIME_TABLE_ID)
+ .id("optaplanner-consumer")
+ .autoStartup(false)
+ .to("mock:bestSolution");
// sync producer
from("direct:solveSync")
- .to("optaplanner:anything?useSolverManager=true&problemId=" + OptaplannerResource.SINGLETON_TIME_TABLE_ID);
+ .toF("optaplanner:anything?useSolverManager=true&problemId=%d", OptaplannerResource.SINGLETON_TIME_TABLE_ID)
+ .to("mock:solveSync");
}
}
diff --git a/integration-tests/optaplanner/src/test/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerTest.java b/integration-tests/optaplanner/src/test/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerTest.java
index a519555..70ca5d0 100644
--- a/integration-tests/optaplanner/src/test/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerTest.java
+++ b/integration-tests/optaplanner/src/test/java/org/apache/camel/quarkus/component/optaplanner/it/OptaplannerTest.java
@@ -20,40 +20,104 @@ import java.util.concurrent.TimeUnit;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
-import org.apache.camel.quarkus.component.optaplanner.it.domain.TimeTable;
+import io.restassured.path.json.JsonPath;
import org.junit.jupiter.api.Test;
import static org.awaitility.Awaitility.await;
-import static org.hamcrest.Matchers.notNullValue;
@QuarkusTest
class OptaplannerTest {
@Test
public void solveSync() {
+ // Initiate synchronous solving
RestAssured.given()
- .get("/optaplanner/solveSync")
+ .post("/optaplanner/solveSync")
.then()
- .statusCode(200)
- .body("lessonList[0].timeslot", notNullValue(null))
- .body("lessonList[0].room", notNullValue(null));
+ .statusCode(204);
+
+ // Poll for results
+ await().pollDelay(250, TimeUnit.MILLISECONDS).atMost(1, TimeUnit.MINUTES).until(() -> {
+ JsonPath json = RestAssured.given()
+ .get("/optaplanner/solution/solveSync")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ return json.getLong("timeslot") > -1 && json.getLong("room") > -1;
+ });
}
@Test
- public void solveASyncWithConsumer() {
- // solve async
+ public void solveAsync() {
+ // Initiate asynchronous solving
RestAssured.given()
- .get("/optaplanner/solveAsync")
+ .post("/optaplanner/solveAsync")
.then()
- .statusCode(200)
- .body("lessonList[0].timeslot", notNullValue(null))
- .body("lessonList[0].room", notNullValue(null));
-
- await().atMost(10L, TimeUnit.SECONDS).until(() -> {
- TimeTable result = RestAssured.get("/optaplanner/newBestSolution").then().extract().body().as(TimeTable.class);
- return result != null && result.getLessonList().get(0).getTimeslot() != null
- && result.getLessonList().get(0).getRoom() != null;
+ .statusCode(204);
+
+ // Poll for results
+ await().pollDelay(250, TimeUnit.MILLISECONDS).atMost(1, TimeUnit.MINUTES).until(() -> {
+ JsonPath json = RestAssured.given()
+ .get("/optaplanner/solution/solveAsync")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ return json.getLong("timeslot") > -1 && json.getLong("room") > -1;
});
}
+ @Test
+ public void optaplannerConsumerBestSolution() {
+ try {
+ // Start optaplanner consumer
+ RestAssured.given()
+ .post("/optaplanner/consumer/true")
+ .then()
+ .statusCode(204);
+
+ // Initiate asynchronous solving
+ RestAssured.given()
+ .post("/optaplanner/solveAsync")
+ .then()
+ .statusCode(204);
+
+ // Poll for results
+ await().pollDelay(250, TimeUnit.MILLISECONDS).atMost(1, TimeUnit.MINUTES).until(() -> {
+ JsonPath json = RestAssured.given()
+ .get("/optaplanner/solution/solveAsync")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ return json.getLong("timeslot") > -1 && json.getLong("room") > -1;
+ });
+
+ await().pollDelay(250, TimeUnit.MILLISECONDS).atMost(1, TimeUnit.MINUTES).until(() -> {
+ JsonPath json = RestAssured.given()
+ .get("/optaplanner/solution/bestSolution")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ return json.getLong("timeslot") > -1 && json.getLong("room") > -1;
+ });
+ } finally {
+ // Stop optaplanner consumer
+ RestAssured.given()
+ .post("/optaplanner/consumer/false")
+ .then()
+ .statusCode(204);
+ }
+ }
+
}
[camel-quarkus] 12/22: Remove freemarker inaccurate documentation
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 748bbe59e0fa3b94fa4e5c48a71045fd5a8fcd7d
Author: aldettinger <al...@gmail.com>
AuthorDate: Fri Feb 11 17:24:58 2022 +0100
Remove freemarker inaccurate documentation
---
.../pages/reference/extensions/freemarker.adoc | 42 ----------------------
.../runtime/src/main/doc/configuration.adoc | 42 ----------------------
2 files changed, 84 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
index 89a3c1b..3255a54 100644
--- a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
@@ -45,48 +45,6 @@ The `allowContextMapAll` option is not supported in native mode as it requires r
== Additional Camel Quarkus configuration
-== Class path resources
-
-For the FreeMarker templates loaded from class path to work flawlessly in native mode, you need to list all your
-template files using `quarkus.native.resources.includes` and `quarkus.native.resources.excludes`
-options in `application.properties`.
-
-Here is an example: If your application's resources look like this
-
-[source,shell]
-----
-$ tree src/main/resources
-src/main/resources
-└── templates
-   ├── email.ftl
-   ├── page.html
- └── unwanted-file.txt
-----
-
-and if your configuration is like this
-
-[source,properties]
-----
-quarkus.native.resources.includes = templates/*.ftl,templates/*.html
-quarkus.native.resources.excludes = templates/unwanted*
-----
-
-then, resources `templates/email.ftl` and `templates/page.ftl` will be available in the native image,
-while file `unwanted-file.txt` will not be available.
-
-You can thus use the available templates in a Camel route, e.g.:
-
-[source,java]
-----
-public class MyRoutes extends RouteBuilder {
- @Override
- public void configure() {
- from("direct:example")
- .to("freemarker:templates/email.ftl")
- }
-}
-----
-
== Quarkiverse Freemarker and its configuration
Camel Quarkus Freemarker uses dev/index.html[Quarkiverse Freemarker] under the hood.
diff --git a/extensions/freemarker/runtime/src/main/doc/configuration.adoc b/extensions/freemarker/runtime/src/main/doc/configuration.adoc
index 323fd41..0bc095f 100644
--- a/extensions/freemarker/runtime/src/main/doc/configuration.adoc
+++ b/extensions/freemarker/runtime/src/main/doc/configuration.adoc
@@ -1,45 +1,3 @@
-== Class path resources
-
-For the FreeMarker templates loaded from class path to work flawlessly in native mode, you need to list all your
-template files using `quarkus.native.resources.includes` and `quarkus.native.resources.excludes`
-options in `application.properties`.
-
-Here is an example: If your application's resources look like this
-
-[source,shell]
-----
-$ tree src/main/resources
-src/main/resources
-└── templates
-   ├── email.ftl
-   ├── page.html
- └── unwanted-file.txt
-----
-
-and if your configuration is like this
-
-[source,properties]
-----
-quarkus.native.resources.includes = templates/*.ftl,templates/*.html
-quarkus.native.resources.excludes = templates/unwanted*
-----
-
-then, resources `templates/email.ftl` and `templates/page.ftl` will be available in the native image,
-while file `unwanted-file.txt` will not be available.
-
-You can thus use the available templates in a Camel route, e.g.:
-
-[source,java]
-----
-public class MyRoutes extends RouteBuilder {
- @Override
- public void configure() {
- from("direct:example")
- .to("freemarker:templates/email.ftl")
- }
-}
-----
-
== Quarkiverse Freemarker and its configuration
Camel Quarkus Freemarker uses dev/index.html[Quarkiverse Freemarker] under the hood.
[camel-quarkus] 02/22: Disable FileTest.charset on Windows due to #3530
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit dec8f795d5685ea6eea9199501b4434e11f92cd3
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 7 15:14:39 2022 +0000
Disable FileTest.charset on Windows due to #3530
---
.../test/java/org/apache/camel/quarkus/component/file/it/FileTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java b/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
index d6e06c2..3a02d19 100644
--- a/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
+++ b/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
@@ -36,6 +36,8 @@ import io.restassured.response.ValidatableResponse;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.apache.camel.quarkus.component.file.it.FileResource.CONSUME_BATCH;
import static org.apache.camel.quarkus.component.file.it.FileResource.SEPARATOR;
@@ -80,6 +82,7 @@ class FileTest {
.body(equalTo(FILE_BODY));
}
+ @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/apache/camel-quarkus/issues/3530")
@Test
public void charset() throws UnsupportedEncodingException {
// Create a new file
[camel-quarkus] 15/22: Fix #3548 to exclude geronimo-jta_1.1_spec in camel-activemq (#3550)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit f4a8fd57e22f882caa974bb808eacbba3609af6e
Author: Amos Feng <zf...@redhat.com>
AuthorDate: Wed Feb 16 10:20:26 2022 +0800
Fix #3548 to exclude geronimo-jta_1.1_spec in camel-activemq (#3550)
---
poms/bom/pom.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index c841cd0..ff4619a 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -123,6 +123,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
[camel-quarkus] 20/22: Increase azure-storage-blob extension test coverage
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 8d003ace4628bef29a3258d7934aebe11508fa46
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Feb 22 15:10:04 2022 +0000
Increase azure-storage-blob extension test coverage
Fixes #3561
---
integration-test-groups/azure/README.adoc | 3 +-
.../azure/azure-eventhubs/pom.xml | 2 +-
integration-test-groups/azure/azure-resources.sh | 9 +-
.../azure/azure-storage-blob/pom.xml | 48 ++
.../storage/blob/it/AzureStorageBlobProducers.java | 49 ++
.../storage/blob/it/AzureStorageBlobResource.java | 394 ++++++++++++++--
.../storage/blob/it/AzureStorageBlobRoutes.java | 125 ++++++
.../storage/blob/it/AzureStorageBlobTest.java | 500 +++++++++++++++++++--
.../test/mock/backend/MockBackendDisabled.java | 30 ++
integration-tests/azure-grouped/pom.xml | 41 +-
10 files changed, 1111 insertions(+), 90 deletions(-)
diff --git a/integration-test-groups/azure/README.adoc b/integration-test-groups/azure/README.adoc
index 33c21ec..7115205 100644
--- a/integration-test-groups/azure/README.adoc
+++ b/integration-test-groups/azure/README.adoc
@@ -15,11 +15,12 @@ Prerequisites:
* A https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal[general-purpose v2 Azure storage account] and
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal[create a container]
+* The https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#enable-and-disable-the-change-feed[change feed] is enabled on your storage account
* View the https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal#view-account-access-keys[account keys] and set the following environment variables:
* An https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create[Azure Event Hub]
* An https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string[Event Hubs connection string]
-To create all of the above, you can use `azure-resources.sh` script as follows:
+To create all of the above, you can use `azure-resources.sh` script as follows. Ensure that you have installed the https://docs.microsoft.com/en-us/cli/azure/[Azure CLI] beforehand:
[source,shell]
----
diff --git a/integration-test-groups/azure/azure-eventhubs/pom.xml b/integration-test-groups/azure/azure-eventhubs/pom.xml
index a87ed56..838b66d 100644
--- a/integration-test-groups/azure/azure-eventhubs/pom.xml
+++ b/integration-test-groups/azure/azure-eventhubs/pom.xml
@@ -49,7 +49,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy-jackson</artifactId>
+ <artifactId>quarkus-resteasy-jsonb</artifactId>
</dependency>
<!-- test dependencies -->
diff --git a/integration-test-groups/azure/azure-resources.sh b/integration-test-groups/azure/azure-resources.sh
index 8b7a4b6..8bdcbaa 100755
--- a/integration-test-groups/azure/azure-resources.sh
+++ b/integration-test-groups/azure/azure-resources.sh
@@ -16,6 +16,13 @@
# limitations under the License.
#
+if ! which az > /dev/null 2>&1; then
+ echo "$(basename $0) requires the Azure CLI."
+ echo
+ echo "https://docs.microsoft.com/en-us/cli/azure/"
+ echo
+ exit 1
+fi
suffix="$(az ad signed-in-user show --query displayName -o tsv | tr '[:upper:]' '[:lower:]' | tr -cd '[:alnum:]' | cut -c-12)"
suffix="${suffix}4"
@@ -33,6 +40,7 @@ function createResources() {
az group create --name ${RESOURCE_GROUP} --location ${ZONE}
az storage account create --name ${AZURE_STORAGE_ACCOUNT_NAME} --resource-group ${RESOURCE_GROUP} --location ${ZONE} --sku Standard_LRS --kind StorageV2
+ az storage account blob-service-properties update --enable-change-feed true --delete-retention-days 1 -n ${AZURE_STORAGE_ACCOUNT_NAME} -g ${RESOURCE_GROUP}
SUBSCRIPTION_ID="$(az account list --query '[0].id' -o tsv)"
USER_ID="$(az ad signed-in-user show --query objectId -o tsv)"
@@ -79,4 +87,3 @@ delete) echo "Deleting Azure resources"
*) echo "usage: $0 [create|delete]"
;;
esac
-
diff --git a/integration-test-groups/azure/azure-storage-blob/pom.xml b/integration-test-groups/azure/azure-storage-blob/pom.xml
index e5837f2..0c19ae3 100644
--- a/integration-test-groups/azure/azure-storage-blob/pom.xml
+++ b/integration-test-groups/azure/azure-storage-blob/pom.xml
@@ -36,9 +36,21 @@
<artifactId>camel-quarkus-azure-storage-blob</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-seda</artifactId>
+ </dependency>
+ <dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jsonb</artifactId>
+ </dependency>
<!-- test dependencies -->
<dependency>
@@ -52,6 +64,16 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-test-support</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-tests-support-azure</artifactId>
<scope>test</scope>
@@ -108,6 +130,32 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-seda-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</profile>
<profile>
diff --git a/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobProducers.java b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobProducers.java
new file mode 100644
index 0000000..dfd65be
--- /dev/null
+++ b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobProducers.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.azure.storage.blob.it;
+
+import javax.inject.Named;
+
+import com.azure.core.http.policy.HttpLogDetailLevel;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.storage.blob.BlobServiceClient;
+import com.azure.storage.blob.BlobServiceClientBuilder;
+import com.azure.storage.common.StorageSharedKeyCredential;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+public class AzureStorageBlobProducers {
+
+ @ConfigProperty(name = "azure.storage.account-name")
+ String azureStorageAccountName;
+
+ @ConfigProperty(name = "azure.storage.account-key")
+ String azureStorageAccountKey;
+
+ @ConfigProperty(name = "azure.blob.service.url")
+ String azureBlobServiceUrl;
+
+ @Named("azureBlobServiceClient")
+ public BlobServiceClient createBlobClient() throws Exception {
+ StorageSharedKeyCredential credentials = new StorageSharedKeyCredential(azureStorageAccountName,
+ azureStorageAccountKey);
+ return new BlobServiceClientBuilder()
+ .endpoint(azureBlobServiceUrl)
+ .credential(credentials)
+ .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS).setPrettyPrintBody(true))
+ .buildClient();
+ }
+}
diff --git a/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobResource.java b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobResource.java
index 95e7bb0..790cbb1 100644
--- a/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobResource.java
+++ b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobResource.java
@@ -16,105 +16,407 @@
*/
package org.apache.camel.quarkus.component.azure.storage.blob.it;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
+import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
+import java.time.OffsetDateTime;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+import java.util.stream.Collectors;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
-import javax.inject.Named;
+import javax.json.Json;
+import javax.json.JsonArrayBuilder;
+import javax.json.JsonObject;
+import javax.json.JsonObjectBuilder;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.PATCH;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import com.azure.core.http.policy.HttpLogDetailLevel;
-import com.azure.core.http.policy.HttpLogOptions;
-import com.azure.storage.blob.BlobServiceClient;
-import com.azure.storage.blob.BlobServiceClientBuilder;
-import com.azure.storage.common.StorageSharedKeyCredential;
+import com.azure.storage.blob.changefeed.models.BlobChangefeedEvent;
+import com.azure.storage.blob.changefeed.models.BlobChangefeedEventType;
+import com.azure.storage.blob.models.BlobContainerItem;
+import com.azure.storage.blob.models.BlobItem;
+import com.azure.storage.blob.models.BlobStorageException;
+import com.azure.storage.blob.models.Block;
+import com.azure.storage.blob.models.BlockList;
+import com.azure.storage.blob.models.BlockListType;
+import com.azure.storage.blob.models.PageList;
+import com.azure.storage.blob.models.PageRange;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.ConsumerTemplate;
import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
import org.apache.camel.ProducerTemplate;
-import org.apache.camel.component.azure.storage.blob.BlobOperationsDefinition;
+import org.apache.camel.component.azure.storage.blob.BlobBlock;
+import org.apache.camel.component.azure.storage.blob.BlobConstants;
+import org.apache.camel.quarkus.core.util.FileUtils;
import org.eclipse.microprofile.config.inject.ConfigProperty;
@Path("/azure-storage-blob")
@ApplicationScoped
public class AzureStorageBlobResource {
- private static final String BLOB_NAME = "test";
@Inject
ProducerTemplate producerTemplate;
- @ConfigProperty(name = "azure.storage.account-name")
- String azureStorageAccountName;
+ @Inject
+ ConsumerTemplate consumerTemplate;
- @ConfigProperty(name = "azure.storage.account-key")
- String azureStorageAccountKey;
+ @Inject
+ CamelContext context;
- @ConfigProperty(name = "azure.blob.service.url")
- String azureBlobServiceUrl;
+ @ConfigProperty(name = "azure.storage.account-name")
+ public String azureStorageAccountName;
@ConfigProperty(name = "azure.blob.container.name")
- String azureBlobContainerName;
-
- @javax.enterprise.inject.Produces
- @Named("azureBlobServiceClient")
- public BlobServiceClient createBlobClient() throws Exception {
- StorageSharedKeyCredential credentials = new StorageSharedKeyCredential(azureStorageAccountName,
- azureStorageAccountKey);
- return new BlobServiceClientBuilder()
- .endpoint(azureBlobServiceUrl)
- .credential(credentials)
- .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS).setPrettyPrintBody(true))
- .buildClient();
- }
+ public String azureBlobContainerName;
@Path("/blob/create")
@POST
@Consumes(MediaType.TEXT_PLAIN)
- public Response createBlob(String message) throws Exception {
- producerTemplate.sendBody(componentUri(BlobOperationsDefinition.uploadBlockBlob),
- message);
- return Response.created(new URI("https://camel.apache.org/")).build();
+ public Response createBlob(String content) throws Exception {
+ Exchange exchange = producerTemplate.request("direct:create", new Processor() {
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ exchange.getMessage().setBody(content);
+ }
+ });
+
+ if (!exchange.isFailed()) {
+ Message message = exchange.getMessage();
+ return Response.created(new URI("https://camel.apache.org/"))
+ .entity(message.getHeader(BlobConstants.E_TAG))
+ .build();
+ }
+
+ return Response.serverError().build();
}
@Path("/blob/read")
@GET
@Produces(MediaType.TEXT_PLAIN)
- public String readBlob() throws Exception {
+ public String readBlob(@QueryParam("containerName") String containerName) {
+ if (containerName == null) {
+ containerName = azureBlobContainerName;
+ }
+
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(Exchange.CHARSET_NAME, StandardCharsets.UTF_8.name());
+ headers.put(BlobConstants.BLOB_CONTAINER_NAME, containerName);
+ return producerTemplate.requestBodyAndHeaders("direct:read", null, headers, String.class);
+ }
+
+ @Path("/blob/read/bytes")
+ @GET
+ @Produces(MediaType.APPLICATION_OCTET_STREAM)
+ public byte[] readBlobBytes() {
return producerTemplate.requestBodyAndHeader(
- componentUri(BlobOperationsDefinition.getBlob),
- null, Exchange.CHARSET_NAME, StandardCharsets.UTF_8.name(), String.class);
+ "direct:read",
+ null, Exchange.CHARSET_NAME, StandardCharsets.UTF_8.name(), byte[].class);
+ }
+
+ @Path("/blob/list")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @SuppressWarnings("unchecked")
+ public JsonObject listBlobs() {
+ JsonObjectBuilder objectBuilder = Json.createObjectBuilder();
+ JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
+
+ List<BlobItem> blobs = producerTemplate.requestBody("direct:list", null, List.class);
+ blobs.stream()
+ .map(blobItem -> objectBuilder.add("name", blobItem.getName()))
+ .forEach(arrayBuilder::add);
+
+ objectBuilder.add("blobs", arrayBuilder);
+
+ return objectBuilder.build();
}
@Path("/blob/update")
@PATCH
@Consumes(MediaType.TEXT_PLAIN)
- public Response updateBlob(String message) throws Exception {
- producerTemplate.sendBody(
- componentUri(BlobOperationsDefinition.uploadBlockBlob),
- message);
+ public Response updateBlob(String message) {
+ producerTemplate.sendBody("direct:update", message);
return Response.ok().build();
}
@Path("/blob/delete")
@DELETE
- public Response deleteBlob() throws Exception {
- producerTemplate.sendBody(
- componentUri(BlobOperationsDefinition.deleteBlob),
- null);
+ public Response deleteBlob() {
+ try {
+ producerTemplate.sendBody("direct:delete", null);
+ } catch (CamelExecutionException e) {
+ Throwable cause = e.getCause();
+ if (cause instanceof BlobStorageException) {
+ BlobStorageException bse = (BlobStorageException) cause;
+ return Response.status(bse.getStatusCode()).build();
+ }
+ }
return Response.noContent().build();
}
- private String componentUri(final BlobOperationsDefinition operation) {
- return String.format("azure-storage-blob://%s/%s?blobServiceClient=#azureBlobServiceClient&operation=%s&blobName=%s",
- azureStorageAccountName, azureBlobContainerName,
- operation.name(), BLOB_NAME);
+ @Path("/blob/download")
+ @GET
+ public Response downloadBlob() {
+ File file = producerTemplate.requestBody("direct:download", null, File.class);
+ String downloadPath = FileUtils.nixifyPath(file.getAbsolutePath());
+ return Response.ok(downloadPath).build();
+ }
+
+ @Path("/blob/download/link")
+ @GET
+ public Response downloadLink() {
+ String link = producerTemplate.requestBody("direct:downloadLink", null, String.class);
+ return Response.ok(link).build();
+ }
+
+ @Path("/block/blob/create")
+ @POST
+ @Consumes(MediaType.TEXT_PLAIN)
+ public Response createBlockBlob(String content) throws Exception {
+ producerTemplate.sendBody("direct:uploadBlockBlob", content);
+ return Response.created(new URI("https://camel.apache.org/")).build();
+ }
+
+ /**
+ * Note: The 'blob block' naming is retained here instead of the alternative 'block blob' naming used
+ * for other operations. Both the Camel and official Azure documentation have this inconsistency.
+ */
+ @Path("/blob/block/list")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public JsonObject readBlobBlockList(@QueryParam("blockListType") String blockListType) {
+ BlockListType listType = BlockListType.valueOf(blockListType.toUpperCase());
+ BlockList list = producerTemplate.requestBodyAndHeader(
+ "direct:readBlobBlocks",
+ null, BlobConstants.BLOCK_LIST_TYPE, listType, BlockList.class);
+
+ JsonObjectBuilder builder = Json.createObjectBuilder();
+ if (listType.equals(BlockListType.ALL) || listType.equals(BlockListType.UNCOMMITTED)) {
+ extractBlockNames(builder, list.getUncommittedBlocks(), BlockListType.UNCOMMITTED);
+ }
+
+ if (listType.equals(BlockListType.ALL) || listType.equals(BlockListType.COMMITTED)) {
+ extractBlockNames(builder, list.getCommittedBlocks(), BlockListType.COMMITTED);
+ }
+
+ return builder.build();
+ }
+
+ @Path("/block/blob/stage")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Boolean stageBlockBlobs(List<String> blockContent) {
+ List<BlobBlock> blocks = blockContent.stream()
+ .map(String::getBytes)
+ .map(ByteArrayInputStream::new)
+ .map(inputStream -> {
+ try {
+ return BlobBlock.createBlobBlock(inputStream);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ })
+ .collect(Collectors.toList());
+ return producerTemplate.requestBody("direct:stageBlockBlob", blocks, Boolean.class);
+ }
+
+ @Path("/block/blob/commit")
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Boolean commitBlockBlobs(List<String> blockNames) {
+ List<Block> blocks = blockNames.stream()
+ .map(name -> {
+ Block block = new Block();
+ block.setName(name);
+ return block;
+ })
+ .collect(Collectors.toList());
+
+ return producerTemplate.requestBody("direct:commitBlockBlob", blocks, Boolean.class);
+ }
+
+ @Path("/append/blob/create")
+ @POST
+ @Consumes(MediaType.TEXT_PLAIN)
+ public Response createAppendBlob(String content) throws URISyntaxException {
+ producerTemplate.sendBody("direct:createAppendBlob", content);
+ return Response.created(new URI("https://camel.apache.org/")).build();
+ }
+
+ @Path("/append/blob/commit")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Boolean commitAppendBlob(String contentToAppend) {
+ byte[] bytes = contentToAppend.getBytes(StandardCharsets.UTF_8);
+ return producerTemplate.requestBody("direct:commitAppendBlob", new ByteArrayInputStream(bytes), Boolean.class);
+ }
+
+ @Path("/page/blob/create")
+ @POST
+ public Response createPageBlob() throws URISyntaxException {
+ producerTemplate.sendBody("direct:createPageBlob", null);
+ return Response.created(new URI("https://camel.apache.org/")).build();
+ }
+
+ @Path("/page/blob/upload")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Boolean uploadPageBlob(@QueryParam("pageStart") int start, @QueryParam("pageEnd") int end) {
+ byte[] dataBytes = new byte[end + 1];
+ new Random().nextBytes(dataBytes);
+ InputStream dataStream = new ByteArrayInputStream(dataBytes);
+ PageRange pageRange = new PageRange().setStart(start).setEnd(end);
+ return producerTemplate.requestBodyAndHeader("direct:uploadPageBlob", dataStream,
+ BlobConstants.PAGE_BLOB_RANGE, pageRange, Boolean.class);
+ }
+
+ @Path("/page/blob/resize")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Boolean resizePageBlob(@QueryParam("pageStart") int start, @QueryParam("pageEnd") int end) {
+ PageRange pageRange = new PageRange().setStart(start).setEnd(end);
+ return producerTemplate.requestBodyAndHeader("direct:resizePageBlob", null,
+ BlobConstants.PAGE_BLOB_RANGE, pageRange, Boolean.class);
+ }
+
+ @Path("/page/blob/clear")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Boolean clearPageBlob(@QueryParam("pageStart") int start, @QueryParam("pageEnd") int end) {
+ PageRange pageRange = new PageRange().setStart(start).setEnd(end);
+ return producerTemplate.requestBodyAndHeader("direct:clearPageBlob", null,
+ BlobConstants.PAGE_BLOB_RANGE, pageRange, Boolean.class);
+ }
+
+ @Path("/page/blob")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public JsonObject getPageBlobRanges(@QueryParam("pageStart") int start, @QueryParam("pageEnd") int end) {
+ PageRange pageRange = new PageRange().setStart(start).setEnd(end);
+ PageList pageList = producerTemplate.requestBodyAndHeader("direct:getPageBlobRanges", null,
+ BlobConstants.PAGE_BLOB_RANGE, pageRange, PageList.class);
+
+ JsonObjectBuilder objectBuilder = Json.createObjectBuilder();
+ JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
+ pageList.getPageRange()
+ .stream()
+ .map(pr -> Json.createObjectBuilder()
+ .add("start", pr.getStart())
+ .add("end", pr.getEnd())
+ .build())
+ .forEach(arrayBuilder::add);
+
+ objectBuilder.add("ranges", arrayBuilder.build());
+ return objectBuilder.build();
+ }
+
+ @Path("/blob/container")
+ @POST
+ public Response createBlobContainer(@QueryParam("containerName") String containerName) throws Exception {
+ producerTemplate.sendBodyAndHeader("direct:createBlobContainer", null, BlobConstants.BLOB_CONTAINER_NAME,
+ containerName);
+ return Response.created(new URI("https://camel.apache.org/")).build();
+ }
+
+ @Path("/blob/container")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @SuppressWarnings("unchecked")
+ public JsonObject listBlobContainers() throws Exception {
+ JsonObjectBuilder objectBuilder = Json.createObjectBuilder();
+ JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
+
+ List<BlobContainerItem> containers = producerTemplate.requestBody("direct:listBlobContainers", null, List.class);
+ containers.stream()
+ .map(container -> Json.createObjectBuilder()
+ .add("name", container.getName())
+ .build())
+ .forEach(arrayBuilder::add);
+
+ objectBuilder.add("containers", arrayBuilder.build());
+ return objectBuilder.build();
}
+ @Path("/blob/container")
+ @DELETE
+ public void deleteBlobContainer(@QueryParam("containerName") String containerName) {
+ producerTemplate.sendBodyAndHeader("direct:deleteBlobContainer", null, BlobConstants.BLOB_CONTAINER_NAME,
+ containerName);
+ }
+
+ @Path("/blob/copy")
+ @POST
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response copyBlob(@QueryParam("containerName") String containerName) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(BlobConstants.BLOB_CONTAINER_NAME, containerName);
+ headers.put(BlobConstants.BLOB_NAME, AzureStorageBlobRoutes.BLOB_NAME);
+ headers.put(BlobConstants.SOURCE_BLOB_CONTAINER_NAME, azureBlobContainerName);
+ headers.put(BlobConstants.SOURCE_BLOB_ACCOUNT_NAME, azureStorageAccountName);
+ String result = producerTemplate.requestBodyAndHeaders("direct:copy", null, headers, String.class);
+ return Response.ok(result).build();
+ }
+
+ @Path("/changes")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ @SuppressWarnings("unchecked")
+ public boolean getChangeFeed(
+ @QueryParam("startTime") String startTime,
+ @QueryParam("endTime") String endTime,
+ @QueryParam("etag") String eTag) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(BlobConstants.BLOB_NAME, AzureStorageBlobRoutes.BLOB_NAME);
+ headers.put(BlobConstants.CHANGE_FEED_START_TIME, OffsetDateTime.parse(startTime));
+ headers.put(BlobConstants.CHANGE_FEED_END_TIME, OffsetDateTime.parse(endTime));
+
+ List<BlobChangefeedEvent> events = producerTemplate.requestBodyAndHeaders("direct:getChangeFeed", null, headers,
+ List.class);
+ return events.stream()
+ .filter(event -> event.getEventType().equals(BlobChangefeedEventType.BLOB_CREATED))
+ .anyMatch(event -> event.getData().getETag().equals(eTag));
+ }
+
+ @Path("/consumed/blobs")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public String getConsumedBlobs() {
+ return consumerTemplate.receiveBody("seda:blobs", 10000, String.class);
+ }
+
+ @POST
+ @Path("consumer/{enable}")
+ public void mangeBlobConsumer(@PathParam("enable") boolean enable) throws Exception {
+ if (enable) {
+ context.getRouteController().startRoute("blob-consumer");
+ } else {
+ context.getRouteController().stopRoute("blob-consumer");
+ }
+ }
+
+ private void extractBlockNames(JsonObjectBuilder builder, List<Block> blocks, BlockListType listType) {
+ JsonArrayBuilder arrayBuilder = Json.createArrayBuilder();
+ blocks.stream().map(Block::getName).forEach(arrayBuilder::add);
+ builder.add(listType.toString(), arrayBuilder);
+ }
}
diff --git a/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobRoutes.java b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobRoutes.java
new file mode 100644
index 0000000..a1de8d5
--- /dev/null
+++ b/integration-test-groups/azure/azure-storage-blob/src/main/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobRoutes.java
@@ -0,0 +1,125 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.component.azure.storage.blob.it;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.azure.storage.blob.BlobConstants;
+import org.apache.camel.component.azure.storage.blob.BlobOperationsDefinition;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class AzureStorageBlobRoutes extends RouteBuilder {
+
+ public static final String BLOB_NAME = "test";
+
+ @ConfigProperty(name = "azure.storage.account-name")
+ public String azureStorageAccountName;
+
+ @ConfigProperty(name = "azure.blob.container.name")
+ public String azureBlobContainerName;
+
+ @ConfigProperty(name = "azure.storage.account-key")
+ public String azureStorageAccountKey;
+
+ @Override
+ public void configure() throws Exception {
+ fromF("azure-storage-blob://%s/%s", azureStorageAccountName, azureBlobContainerName)
+ .id("blob-consumer")
+ .autoStartup(false)
+ .to("seda:blobs");
+
+ from("direct:create")
+ .to(componentUri(BlobOperationsDefinition.uploadBlockBlob));
+
+ from("direct:read")
+ .to(componentUri(BlobOperationsDefinition.getBlob));
+
+ from("direct:update")
+ .to(componentUri(BlobOperationsDefinition.uploadBlockBlob));
+
+ from("direct:delete")
+ .to(componentUri(BlobOperationsDefinition.deleteBlob));
+
+ from("direct:list")
+ .to(componentUri(BlobOperationsDefinition.listBlobs));
+
+ from("direct:download")
+ .to(componentUri(BlobOperationsDefinition.downloadBlobToFile) + "&fileDir=target");
+
+ from("direct:copy")
+ .to(componentUri(BlobOperationsDefinition.copyBlob) + "&sourceBlobAccessKey=RAW("
+ + azureStorageAccountKey + ")");
+
+ from("direct:downloadLink")
+ .to(componentUri(BlobOperationsDefinition.downloadLink))
+ .setBody().header(BlobConstants.DOWNLOAD_LINK);
+
+ from("direct:uploadBlockBlob")
+ .to(componentUri(BlobOperationsDefinition.uploadBlockBlob));
+
+ from("direct:stageBlockBlob")
+ .to(componentUri(BlobOperationsDefinition.stageBlockBlobList));
+
+ from("direct:commitBlockBlob")
+ .to(componentUri(BlobOperationsDefinition.commitBlobBlockList));
+
+ from("direct:readBlobBlocks")
+ .to(componentUri(BlobOperationsDefinition.getBlobBlockList));
+
+ from("direct:createAppendBlob")
+ .to(componentUri(BlobOperationsDefinition.createAppendBlob));
+
+ from("direct:commitAppendBlob")
+ .to(componentUri(BlobOperationsDefinition.commitAppendBlob));
+
+ from("direct:createPageBlob")
+ .to(componentUri(BlobOperationsDefinition.createPageBlob));
+
+ from("direct:uploadPageBlob")
+ .to(componentUri(BlobOperationsDefinition.uploadPageBlob));
+
+ from("direct:resizePageBlob")
+ .to(componentUri(BlobOperationsDefinition.resizePageBlob));
+
+ from("direct:clearPageBlob")
+ .to(componentUri(BlobOperationsDefinition.clearPageBlob));
+
+ from("direct:getPageBlobRanges")
+ .to(componentUri(BlobOperationsDefinition.getPageBlobRanges));
+
+ from("direct:getChangeFeed")
+ .toF(componentUri(BlobOperationsDefinition.getChangeFeed));
+
+ from("direct:createBlobContainer")
+ .to(componentUri(BlobOperationsDefinition.createBlobContainer));
+
+ from("direct:listBlobContainers")
+ .to(componentUri(BlobOperationsDefinition.listBlobContainers));
+
+ from("direct:deleteBlobContainer")
+ .to(componentUri(BlobOperationsDefinition.deleteBlobContainer));
+ }
+
+ private String componentUri(final BlobOperationsDefinition operation) {
+ return String.format("azure-storage-blob://%s/%s?operation=%s&blobName=%s",
+ azureStorageAccountName,
+ azureBlobContainerName,
+ operation.name(), BLOB_NAME);
+ }
+}
diff --git a/integration-test-groups/azure/azure-storage-blob/src/test/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobTest.java b/integration-test-groups/azure/azure-storage-blob/src/test/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobTest.java
index de63caf..6594824 100644
--- a/integration-test-groups/azure/azure-storage-blob/src/test/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobTest.java
+++ b/integration-test-groups/azure/azure-storage-blob/src/test/java/org/apache/camel/quarkus/component/azure/storage/blob/it/AzureStorageBlobTest.java
@@ -16,40 +16,64 @@
*/
package org.apache.camel.quarkus.component.azure.storage.blob.it;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.OffsetDateTime;
+import java.time.temporal.ChronoUnit;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.BlobServiceClient;
import com.azure.storage.blob.BlobServiceClientBuilder;
+import com.azure.storage.blob.models.BlockListType;
import com.azure.storage.common.StorageSharedKeyCredential;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
+import io.restassured.path.json.JsonPath;
+import org.apache.camel.quarkus.test.EnabledIf;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendDisabled;
import org.apache.camel.quarkus.test.support.azure.AzureStorageTestResource;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.testcontainers.shaded.org.awaitility.Awaitility;
+import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.StringEndsWith.endsWith;
+import static org.hamcrest.text.MatchesPattern.matchesPattern;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
@QuarkusTest
@QuarkusTestResource(AzureStorageTestResource.class)
class AzureStorageBlobTest {
+ private static final String BLOB_CONTENT = "Hello Camel Quarkus Azure Blob";
+
@BeforeAll
static void beforeAll() {
- blobContainer().create();
+ getClient().create();
}
@AfterAll
static void afterAll() {
- blobContainer().delete();
+ getClient().delete();
}
- private static BlobContainerClient blobContainer() {
+ private static BlobContainerClient getClient() {
final Config config = ConfigProvider.getConfig();
final String azureStorageAccountName = config.getValue("azure.storage.account-name",
String.class);
@@ -63,47 +87,443 @@ class AzureStorageBlobTest {
.credential(credentials)
.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS).setPrettyPrintBody(true))
.buildClient();
- BlobContainerClient blobContainer = client
- .getBlobContainerClient(config.getValue("azure.blob.container.name", String.class));
- return blobContainer;
+
+ String containerName = config.getValue("azure.blob.container.name", String.class);
+ return client.getBlobContainerClient(containerName);
}
@Test
public void crud() {
- String blobContent = "Hello Camel Quarkus Azure Blob";
-
- // Create
- RestAssured.given()
- .contentType(ContentType.TEXT)
- .body(blobContent)
- .post("/azure-storage-blob/blob/create")
- .then()
- .statusCode(201);
-
- // Read
- RestAssured.get("/azure-storage-blob/blob/read")
- .then()
- .statusCode(200)
- .body(is(blobContent));
-
- // Update
- String updatedContent = blobContent + " updated";
- RestAssured.given()
- .contentType(ContentType.TEXT)
- .body(updatedContent)
- .patch("/azure-storage-blob/blob/update")
- .then()
- .statusCode(200);
-
- RestAssured.get("/azure-storage-blob/blob/read")
- .then()
- .statusCode(200)
- .body(is(updatedContent));
-
- // Delete
- RestAssured.delete("/azure-storage-blob/blob/delete")
- .then()
- .statusCode(204);
+ try {
+ // Create
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Read
+ RestAssured.get("/azure-storage-blob/blob/read")
+ .then()
+ .statusCode(200)
+ .body(is(BLOB_CONTENT));
+
+ // List
+ RestAssured.get("/azure-storage-blob/blob/list")
+ .then()
+ .statusCode(200)
+ .body("blobs[0].name", is(AzureStorageBlobRoutes.BLOB_NAME));
+
+ // Update
+ String updatedContent = BLOB_CONTENT + " updated";
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(updatedContent)
+ .patch("/azure-storage-blob/blob/update")
+ .then()
+ .statusCode(200);
+
+ RestAssured.get("/azure-storage-blob/blob/read")
+ .then()
+ .statusCode(200)
+ .body(is(updatedContent));
+ } finally {
+ // Delete
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void download() throws IOException {
+ Path path = null;
+ try {
+ // Create
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Download file
+ String downloadPath = RestAssured.get("/azure-storage-blob/blob/download")
+ .then()
+ .statusCode(200)
+ .body(endsWith("target/test"))
+ .extract()
+ .body()
+ .asString();
+
+ path = Paths.get(downloadPath);
+ assertEquals(BLOB_CONTENT, Files.readString(path));
+
+ // Download link
+ RestAssured.get("/azure-storage-blob/blob/download/link")
+ .then()
+ .statusCode(200)
+ .body(matchesPattern("^(https?)://.*/test.*"));
+ } finally {
+ if (path != null) {
+ try {
+ Files.deleteIfExists(path);
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+
+ // Delete
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void blockBlobStageCommit() {
+ try {
+ List<String> blockContent = Arrays.asList(BLOB_CONTENT.split(" "));
+
+ // Stage blocks
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(blockContent)
+ .post("/azure-storage-blob/block/blob/stage")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ // Verify blocks uncommitted
+ JsonPath json = RestAssured.given()
+ .queryParam("blockListType", BlockListType.UNCOMMITTED)
+ .get("/azure-storage-blob/blob/block/list")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ List<String> uncommittedBlocks = json.getList(BlockListType.UNCOMMITTED.toString());
+ assertNotNull(uncommittedBlocks);
+ assertEquals(blockContent.size(), uncommittedBlocks.size());
+
+ // Commit blocks
+ RestAssured.given()
+ .contentType(ContentType.JSON)
+ .body(uncommittedBlocks)
+ .post("/azure-storage-blob/block/blob/commit")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ // Verify blocks committed
+ json = RestAssured.given()
+ .queryParam("blockListType", BlockListType.COMMITTED)
+ .get("/azure-storage-blob/blob/block/list")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+
+ List<String> committedBlocks = json.getList(BlockListType.COMMITTED.toString());
+ assertNotNull(committedBlocks);
+ assertEquals(blockContent.size(), committedBlocks.size());
+ } finally {
+ // Delete
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void appendBlob() {
+ try {
+ // Create
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/append/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Commit
+ String appendedContent = BLOB_CONTENT + " Appended";
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(appendedContent)
+ .post("/azure-storage-blob/append/blob/commit")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ // Read
+ RestAssured.get("/azure-storage-blob/blob/read")
+ .then()
+ .statusCode(200)
+ .body(is(appendedContent));
+ } finally {
+ // Delete
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void pageBlob() {
+ try {
+ // Create
+ RestAssured.given()
+ .post("/azure-storage-blob/page/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Upload
+ RestAssured.given()
+ .queryParam("pageStart", 0)
+ .queryParam("pageEnd", 511)
+ .post("/azure-storage-blob/page/blob/upload")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ byte[] pageData = RestAssured.get("/azure-storage-blob/blob/read/bytes")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .asByteArray();
+
+ assertEquals(512, pageData.length);
+
+ // Get ranges
+ RestAssured.given()
+ .queryParam("pageStart", 0)
+ .queryParam("pageEnd", 511)
+ .get("/azure-storage-blob/page/blob")
+ .then()
+ .statusCode(200)
+ .body("ranges[0].start", is(0),
+ "ranges[0].end", is(511));
+
+ // Resize
+ RestAssured.given()
+ .queryParam("pageStart", 0)
+ .queryParam("pageEnd", 1023)
+ .post("/azure-storage-blob/page/blob/resize")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ // Read after resize
+ pageData = RestAssured.get("/azure-storage-blob/blob/read/bytes")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .asByteArray();
+
+ assertEquals(1024, pageData.length);
+
+ // Verify page data beyond the resized point is empty
+ for (int i = 512; i < pageData.length; i++) {
+ if (pageData[i] != 0) {
+ fail("Expected byte element at position " + i + " to be zero value");
+ }
+ }
+
+ // Clear
+ RestAssured.given()
+ .queryParam("pageStart", 0)
+ .queryParam("pageEnd", 1023)
+ .post("/azure-storage-blob/page/blob/clear")
+ .then()
+ .statusCode(200)
+ .body(is("true"));
+
+ // Read after clear
+ pageData = RestAssured.get("/azure-storage-blob/blob/read/bytes")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .asByteArray();
+
+ // Verify all page data is empty
+ for (int i = 0; i < pageData.length; i++) {
+ if (pageData[i] != 0) {
+ fail("Expected byte element at position " + i + " to be zero value");
+ }
+ }
+ } finally {
+ // Delete
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
}
+ @Test
+ public void blobContainer() {
+ String alternativeContainerName = "cq-test-" + UUID.randomUUID();
+
+ try {
+ // Create
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .post("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(201);
+
+ // List
+ String containerName = ConfigProvider.getConfig().getValue("azure.blob.container.name", String.class);
+ RestAssured.get("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(200)
+ .body("containers.name",
+ containsInAnyOrder(containerName, alternativeContainerName));
+ } finally {
+ // Delete
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .delete("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void copyBlob() {
+ String alternativeContainerName = "cq-test-" + UUID.randomUUID();
+
+ try {
+ // Create container to copy to
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .post("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(201);
+
+ // List
+ String containerName = ConfigProvider.getConfig().getValue("azure.blob.container.name", String.class);
+ RestAssured.get("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(200)
+ .body("containers.name",
+ containsInAnyOrder(containerName, alternativeContainerName));
+
+ // Create blob in first container
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Read
+ RestAssured.get("/azure-storage-blob/blob/read")
+ .then()
+ .statusCode(200)
+ .body(is(BLOB_CONTENT));
+
+ // Copy blob to alternate storage container
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .post("/azure-storage-blob/blob/copy")
+ .then()
+ .statusCode(200);
+
+ // Read blob from alternate storage container
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .get("/azure-storage-blob/blob/read")
+ .then()
+ .statusCode(200)
+ .body(is(BLOB_CONTENT));
+ } finally {
+ // Delete
+ RestAssured.given()
+ .queryParam("containerName", alternativeContainerName)
+ .delete("/azure-storage-blob/blob/container")
+ .then()
+ .statusCode(204);
+
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ @Test
+ public void blobConsumer() {
+ try {
+ // Start blob consumer
+ RestAssured.given()
+ .post("/azure-storage-blob/consumer/true")
+ .then()
+ .statusCode(204);
+
+ // Create blob
+ RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/blob/create")
+ .then()
+ .statusCode(201);
+
+ // Fetch results
+ RestAssured.get("/azure-storage-blob/consumed/blobs")
+ .then()
+ .statusCode(200)
+ .body(is(BLOB_CONTENT));
+ } finally {
+ // Stop blob consumer
+ RestAssured.given()
+ .post("/azure-storage-blob/consumer/false")
+ .then()
+ .statusCode(204);
+ }
+ }
+
+ // Change feed is not available in Azurite
+ @EnabledIf({ MockBackendDisabled.class })
+ @Test
+ public void changeFeed() {
+ try {
+ String eTag = RestAssured.given()
+ .contentType(ContentType.TEXT)
+ .body(BLOB_CONTENT)
+ .post("/azure-storage-blob/blob/create")
+ .then()
+ .statusCode(201)
+ .extract()
+ .body()
+ .asString();
+
+ OffsetDateTime now = OffsetDateTime.now();
+ OffsetDateTime startTime = now.minus(5, ChronoUnit.MINUTES);
+ OffsetDateTime endTime = now.plus(5, ChronoUnit.MINUTES);
+
+ // Poll change feed until the blob just created is present
+ Awaitility.await().pollInterval(5, TimeUnit.SECONDS).timeout(5, TimeUnit.MINUTES).until(() -> RestAssured.given()
+ .queryParam("startTime", startTime.toString())
+ .queryParam("endTime", endTime.toString())
+ .queryParam("etag", eTag)
+ .get("/azure-storage-blob/changes")
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .asString()
+ .equals("true"));
+ } finally {
+ RestAssured.delete("/azure-storage-blob/blob/delete")
+ .then()
+ .statusCode(204);
+ }
+ }
}
diff --git a/integration-tests-support/mock-backend/src/main/java/org/apache/camel/quarkus/test/mock/backend/MockBackendDisabled.java b/integration-tests-support/mock-backend/src/main/java/org/apache/camel/quarkus/test/mock/backend/MockBackendDisabled.java
new file mode 100644
index 0000000..40d88fe
--- /dev/null
+++ b/integration-tests-support/mock-backend/src/main/java/org/apache/camel/quarkus/test/mock/backend/MockBackendDisabled.java
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.test.mock.backend;
+
+import java.util.function.BooleanSupplier;
+
+/**
+ * {@link BooleanSupplier} for use with org.apache.camel.quarkus.test.EnabledIf to enable tests if the mock back end is
+ * disabled.
+ */
+public class MockBackendDisabled implements BooleanSupplier {
+ @Override
+ public boolean getAsBoolean() {
+ return !MockBackendUtils.startMockBackend(false);
+ }
+}
diff --git a/integration-tests/azure-grouped/pom.xml b/integration-tests/azure-grouped/pom.xml
index f42d214..ca58d99 100644
--- a/integration-tests/azure-grouped/pom.xml
+++ b/integration-tests/azure-grouped/pom.xml
@@ -42,7 +42,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy-jackson</artifactId>
+ <artifactId>quarkus-resteasy-jsonb</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
@@ -58,9 +58,17 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mock</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-seda</artifactId>
+ </dependency>
+ <dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
@@ -72,6 +80,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-test-support</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-tests-support-azure</artifactId>
<scope>test</scope>
</dependency>
@@ -216,6 +229,19 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-direct-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-mock-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
@@ -227,6 +253,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-seda-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</profile>
<profile>
[camel-quarkus] 11/22: Honor extension deprecation in Catalog and in documentation
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit bdb3d8563dedd2219906ee5c427bb62cb870f9a8
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Fri Feb 11 17:06:58 2022 +0100
Honor extension deprecation in Catalog and in documentation
---
.../org/apache/camel/quarkus/maven/CamelQuarkusExtension.java | 9 +++++++++
.../src/main/java/org/apache/camel/quarkus/maven/CqUtils.java | 4 ++--
.../apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java | 2 +-
.../apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java | 2 +-
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CamelQuarkusExtension.java b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CamelQuarkusExtension.java
index c6999ca..785c301 100644
--- a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CamelQuarkusExtension.java
+++ b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CamelQuarkusExtension.java
@@ -75,6 +75,7 @@ public class CamelQuarkusExtension {
: ExtensionStatus.valueOf(extensionStatus);
final boolean unlisted = !nativeSupported
|| Boolean.parseBoolean(props.getProperty("quarkus.metadata.unlisted", "false"));
+ final boolean deprecated = Boolean.parseBoolean(props.getProperty("quarkus.metadata.deprecated", "false"));
final String rawKind = (String) props.get(CAMEL_QUARKUS_KIND);
final Kind kind = rawKind == null ? null : Kind.valueOf(rawKind);
@@ -92,6 +93,7 @@ public class CamelQuarkusExtension {
nativeSupported,
status,
unlisted,
+ deprecated,
deps == null ? Collections.emptyList() : Collections.unmodifiableList(deps),
kind,
props.getProperty("cq.quarkus.aws.client.baseName"),
@@ -114,6 +116,7 @@ public class CamelQuarkusExtension {
private final List<Dependency> dependencies;
private final ExtensionStatus status;
private final boolean unlisted;
+ private final boolean deprecated;
private final Kind kind;
private final String quarkusAwsClientBaseName;
private final String quarkusAwsClientFqClassName;
@@ -131,6 +134,7 @@ public class CamelQuarkusExtension {
boolean nativeSupported,
ExtensionStatus status,
boolean unlisted,
+ boolean deprecated,
List<Dependency> dependencies,
Kind kind,
String quarkusAwsClientBaseName,
@@ -148,6 +152,7 @@ public class CamelQuarkusExtension {
this.nativeSupported = nativeSupported;
this.status = status;
this.unlisted = unlisted;
+ this.deprecated = deprecated;
this.dependencies = dependencies;
this.kind = kind;
this.quarkusAwsClientBaseName = quarkusAwsClientBaseName;
@@ -210,6 +215,10 @@ public class CamelQuarkusExtension {
return unlisted;
}
+ public boolean isDeprecated() {
+ return deprecated;
+ }
+
public Kind getKind() {
return kind;
}
diff --git a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
index b22e83d..da3c906 100644
--- a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
+++ b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/CqUtils.java
@@ -229,8 +229,8 @@ public class CqUtils {
}
}
- public static boolean isDeprecated(String title, Collection<ArtifactModel<?>> models) {
- return title.contains("(deprecated)") || models.stream().anyMatch(m -> m.isDeprecated());
+ public static boolean isDeprecated(String title, Collection<ArtifactModel<?>> models, boolean deprecated) {
+ return deprecated || title.contains("(deprecated)") || models.stream().anyMatch(m -> m.isDeprecated());
}
static Path copyJar(Path localRepository, String groupId, String artifactId, String version) {
diff --git a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
index 936989b..5e2fc00 100644
--- a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
+++ b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
@@ -133,7 +133,7 @@ public class PrepareCatalogQuarkusMojo extends AbstractExtensionListMojo {
model.setTitle(title);
model.setDescription(ext.getDescription().orElseThrow(() -> new RuntimeException(
"description is missing in " + ext.getRuntimePomXmlPath())));
- model.setDeprecated(CqUtils.isDeprecated(title, models));
+ model.setDeprecated(CqUtils.isDeprecated(title, models, ext.isDeprecated()));
model.setLabel(ext.getLabel().orElse("quarkus"));
update(model, ext, nativeSupported);
CqCatalog.serialize(catalogPath, model);
diff --git a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
index 029d823..aecfe89 100644
--- a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
+++ b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/UpdateExtensionDocPageMojo.java
@@ -115,7 +115,7 @@ public class UpdateExtensionDocPageMojo extends AbstractDocGeneratorMojo {
final String description = CqUtils.getDescription(models, ext.getDescription().orElse(null), getLog());
model.put("description", description);
model.put("status", ext.getStatus().getCapitalized());
- final boolean deprecated = CqUtils.isDeprecated(title, models);
+ final boolean deprecated = CqUtils.isDeprecated(title, models, ext.isDeprecated());
model.put("statusDeprecation",
deprecated ? ext.getStatus().getCapitalized() + " Deprecated" : ext.getStatus().getCapitalized());
model.put("deprecated", deprecated);
[camel-quarkus] 14/22: Fix link to Quarkus Freemarker docs
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 3eafc117792e06f9e81eeeca270b94e4d2432790
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 14 08:25:47 2022 +0000
Fix link to Quarkus Freemarker docs
---
docs/modules/ROOT/pages/reference/extensions/freemarker.adoc | 2 +-
extensions/freemarker/runtime/src/main/doc/configuration.adoc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
index 3255a54..66431ba 100644
--- a/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/freemarker.adoc
@@ -51,7 +51,7 @@ Camel Quarkus Freemarker uses dev/index.html[Quarkiverse Freemarker] under the h
This means in particular, that the `freemarker.template.Configuration` bean produced by Quarkiverse Freemarker
is used by Camel Quarkus.
The bean can be configured via `quarkus.freemarker.*` properties
-- check https://quarkiverse.github.io/quarkiverse-docs/quarkiverse-freemarker/dev/index.html[Freemarker Configuration Reference]
+- check https://quarkiverse.github.io/quarkiverse-docs/quarkus-freemarker/dev/index.html[Freemarker Configuration Reference]
for more details.
If you wish to use your custom `Configuration` bean instead of the default provided by Quarkiverse Freemarker,
diff --git a/extensions/freemarker/runtime/src/main/doc/configuration.adoc b/extensions/freemarker/runtime/src/main/doc/configuration.adoc
index 0bc095f..6e9e155 100644
--- a/extensions/freemarker/runtime/src/main/doc/configuration.adoc
+++ b/extensions/freemarker/runtime/src/main/doc/configuration.adoc
@@ -4,7 +4,7 @@ Camel Quarkus Freemarker uses dev/index.html[Quarkiverse Freemarker] under the h
This means in particular, that the `freemarker.template.Configuration` bean produced by Quarkiverse Freemarker
is used by Camel Quarkus.
The bean can be configured via `quarkus.freemarker.*` properties
-- check https://quarkiverse.github.io/quarkiverse-docs/quarkiverse-freemarker/dev/index.html[Freemarker Configuration Reference]
+- check https://quarkiverse.github.io/quarkiverse-docs/quarkus-freemarker/dev/index.html[Freemarker Configuration Reference]
for more details.
If you wish to use your custom `Configuration` bean instead of the default provided by Quarkiverse Freemarker,
[camel-quarkus] 04/22: Fix build on windows
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 608a17e93f39e4c40d1670d90c4c551062ab5754
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Feb 7 11:03:03 2022 +0000
Fix build on windows
Fixes #1429
---
.gitattributes | 3 ++
docs/pom.xml | 4 +-
.../quarkus/core/deployment/CamelProcessor.java | 3 +-
.../quarkus/core/deployment/util/PathFilter.java | 4 +-
.../core/deployment/util/PathFilterTest.java | 21 ++++++++-
.../apache/camel/quarkus/core/util/FileUtils.java | 52 ++++++++++++++++++++++
.../csimple/deployment/CSimpleProcessor.java | 3 +-
.../aws2-quarkus-client/aws2-ddb/pom.xml | 2 +-
.../aws2-quarkus-client/aws2-s3/pom.xml | 2 +-
.../aws2-quarkus-client/aws2-ses/pom.xml | 2 +-
.../aws2-quarkus-client/aws2-sqs-sns/pom.xml | 2 +-
.../aws2-quarkus-client/aws2-sqs/pom.xml | 2 +-
integration-test-groups/aws2/aws2-s3/pom.xml | 2 +-
integration-tests/aws2-grouped/pom.xml | 2 +-
.../aws2-quarkus-client-grouped/pom.xml | 12 ++---
integration-tests/azure-grouped/pom.xml | 2 +-
.../component/dataformats/json/ParamType.java | 36 ---------------
.../dataformats/json/JsonComponentsTest.java | 4 +-
.../quarkus/component/dozer/it/DozerTest.java | 4 +-
.../camel/quarkus/component/file/it/FileTest.java | 9 +++-
.../component/flatpack/it/FlatpackTest.java | 3 +-
integration-tests/foundation-grouped/pom.xml | 2 +-
.../camel/quarkus/component/jslt/it/JsltTest.java | 6 +++
integration-tests/mongodb-grouped/pom.xml | 2 +-
.../stringtemplate/it/StringtemplateTest.java | 2 +-
pom.xml | 9 ++--
poms/build-parent/pom.xml | 2 +-
27 files changed, 127 insertions(+), 70 deletions(-)
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..f7163f6
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+* text=auto eol=lf
+*.cmd text eol=crlf
+
diff --git a/docs/pom.xml b/docs/pom.xml
index e0b8a7f..46ebe43 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -44,7 +44,7 @@
</goals>
<phase>validate</phase>
<configuration>
- <source>file://${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-config.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-config.groovy</source>
<properties>
<maven.multiModuleProjectDirectory>${maven.multiModuleProjectDirectory}</maven.multiModuleProjectDirectory>
</properties>
@@ -57,7 +57,7 @@
</goals>
<phase>validate</phase>
<configuration>
- <source>file://${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-yaml.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-yaml.groovy</source>
<properties>
<maven.multiModuleProjectDirectory>${maven.multiModuleProjectDirectory}</maven.multiModuleProjectDirectory>
</properties>
diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
index 0440d7b..77e8eb7 100644
--- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
+++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
@@ -73,6 +73,7 @@ import org.apache.camel.quarkus.core.deployment.spi.ContainerBeansBuildItem;
import org.apache.camel.quarkus.core.deployment.spi.RoutesBuilderClassExcludeBuildItem;
import org.apache.camel.quarkus.core.deployment.util.CamelSupport;
import org.apache.camel.quarkus.core.deployment.util.PathFilter;
+import org.apache.camel.quarkus.core.util.FileUtils;
import org.apache.camel.spi.TypeConverterLoader;
import org.apache.camel.spi.TypeConverterRegistry;
import org.jboss.jandex.AnnotationTarget;
@@ -328,7 +329,7 @@ class CamelProcessor {
camelServices.forEach(service -> {
recorder.factoryFinderResolverEntry(
builder,
- service.path.toString(),
+ FileUtils.nixifyPath(service.path),
CamelSupport.loadClass(service.type, TCCL));
});
diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/util/PathFilter.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/util/PathFilter.java
index 31965b1..1333438 100644
--- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/util/PathFilter.java
+++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/util/PathFilter.java
@@ -29,6 +29,7 @@ import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import org.apache.camel.quarkus.core.util.FileUtils;
import org.apache.camel.util.AntPathMatcher;
import org.apache.camel.util.ObjectHelper;
import org.jboss.jandex.DotName;
@@ -118,6 +119,7 @@ public class PathFilter {
.map(rootPath::relativize)
.map(Path::toString)
.map(stringPath -> stringPath.substring(0, stringPath.length() - CLASS_SUFFIX_LENGTH))
+ .map(FileUtils::nixifyPath)
.filter(stringPredicate)
.map(slashClassName -> slashClassName.replace('/', '.'))
.forEach(resultConsumer::accept);
@@ -133,7 +135,7 @@ public class PathFilter {
}
static String sanitize(String path) {
- path = path.trim();
+ path = FileUtils.nixifyPath(path.trim());
return (!path.isEmpty() && path.charAt(0) == '/')
? path.substring(1)
: path;
diff --git a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
index 7b7e16b..9ca7ea0 100644
--- a/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
+++ b/extensions-core/core/deployment/src/test/java/org/apache/camel/quarkus/core/deployment/util/PathFilterTest.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.quarkus.core.deployment.util;
+import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
@@ -25,6 +26,7 @@ import java.util.TreeSet;
import java.util.function.Predicate;
import java.util.stream.Stream;
+import org.apache.camel.util.FileUtil;
import org.jboss.jandex.DotName;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -69,7 +71,24 @@ public class PathFilterTest {
@Test
public void pathFilter() {
- Predicate<Path> predicate = new PathFilter.Builder()
+ PathFilter.Builder builder = new PathFilter.Builder();
+ Stream.of("/foo/bar/*", "moo/mar/*")
+ .forEach(path -> {
+ if (FileUtil.isWindows()) {
+ path = path.replace("/", File.pathSeparator);
+ }
+ builder.include(path);
+ });
+
+ Stream.of("/foo/baz/*", "moo/maz/*")
+ .forEach(path -> {
+ if (FileUtil.isWindows()) {
+ path = path.replace("/", File.pathSeparator);
+ }
+ builder.exclude(path);
+ });
+
+ Predicate<Path> predicate = builder
.include("/foo/bar/*")
.include("moo/mar/*")
.exclude("/foo/baz/*")
diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/util/FileUtils.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/util/FileUtils.java
new file mode 100644
index 0000000..0b1133d
--- /dev/null
+++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/util/FileUtils.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.camel.quarkus.core.util;
+
+import java.io.File;
+import java.nio.file.Path;
+
+import org.apache.camel.util.FileUtil;
+
+public final class FileUtils {
+
+ private FileUtils() {
+ // Utility class
+ }
+
+ /**
+ * Converts non-*nix path separator characters to the *nix alternative
+ *
+ * @param path The {@link java.nio.file.Path} to convert
+ * @return String representation of the path with *nix separators
+ */
+ public static String nixifyPath(Path path) {
+ return nixifyPath(path.toString());
+ }
+
+ /**
+ * Converts non-*nix path separator characters to the *nix alternative
+ *
+ * @param path The path String to convert
+ * @return String representation of the path with *nix separators
+ */
+ public static String nixifyPath(String path) {
+ if (FileUtil.isWindows()) {
+ return path.replace(File.separatorChar, '/');
+ }
+ return path;
+ }
+}
diff --git a/extensions/csimple/deployment/src/main/java/org/apache/camel/quarkus/component/csimple/deployment/CSimpleProcessor.java b/extensions/csimple/deployment/src/main/java/org/apache/camel/quarkus/component/csimple/deployment/CSimpleProcessor.java
index c5266fd..70f70ac 100644
--- a/extensions/csimple/deployment/src/main/java/org/apache/camel/quarkus/component/csimple/deployment/CSimpleProcessor.java
+++ b/extensions/csimple/deployment/src/main/java/org/apache/camel/quarkus/component/csimple/deployment/CSimpleProcessor.java
@@ -78,6 +78,7 @@ import org.apache.camel.quarkus.core.deployment.spi.CamelBeanBuildItem;
import org.apache.camel.quarkus.core.deployment.spi.CamelContextBuildItem;
import org.apache.camel.quarkus.core.deployment.spi.CamelRoutesBuilderClassBuildItem;
import org.apache.camel.quarkus.core.deployment.spi.CompiledCSimpleExpressionBuildItem;
+import org.apache.camel.quarkus.core.util.FileUtils;
import org.apache.camel.util.PropertiesHelper;
import org.jboss.logging.Logger;
@@ -230,7 +231,7 @@ class CSimpleProcessor {
.filter(p -> p.getFileName().toString().endsWith(CLASS_EXT))
.forEach(p -> {
final Path relPath = csimpleClassesDir.relativize(p);
- String className = relPath.toString();
+ String className = FileUtils.nixifyPath(relPath.toString());
className = className.substring(0, className.length() - CLASS_EXT.length());
try {
final GeneratedClassBuildItem item = new GeneratedClassBuildItem(true, className,
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
index 8837bb4..0b09e41 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-ddb/pom.xml
@@ -114,7 +114,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-ddb</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
index 4fba947..d5ff595 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-s3/pom.xml
@@ -118,7 +118,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-s3</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
index a71542e..e992ee1f 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-ses/pom.xml
@@ -119,7 +119,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-ses</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
index 8436323..719e593 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-sqs-sns/pom.xml
@@ -122,7 +122,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-sqs-sns</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml b/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
index 3af7acf..ee6b380 100644
--- a/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
+++ b/integration-test-groups/aws2-quarkus-client/aws2-sqs/pom.xml
@@ -119,7 +119,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-sqs</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-test-groups/aws2/aws2-s3/pom.xml b/integration-test-groups/aws2/aws2-s3/pom.xml
index a47d83b..6024f04 100644
--- a/integration-test-groups/aws2/aws2-s3/pom.xml
+++ b/integration-test-groups/aws2/aws2-s3/pom.xml
@@ -113,7 +113,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-s</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-tests/aws2-grouped/pom.xml b/integration-tests/aws2-grouped/pom.xml
index edab93a..ec8a546 100644
--- a/integration-tests/aws2-grouped/pom.xml
+++ b/integration-tests/aws2-grouped/pom.xml
@@ -170,7 +170,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
<properties>
<group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2</group-tests.source.dir>
<group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
diff --git a/integration-tests/aws2-quarkus-client-grouped/pom.xml b/integration-tests/aws2-quarkus-client-grouped/pom.xml
index 91f3cc1..a29e175 100644
--- a/integration-tests/aws2-quarkus-client-grouped/pom.xml
+++ b/integration-tests/aws2-quarkus-client-grouped/pom.xml
@@ -154,7 +154,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
<properties>
<group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2-quarkus-client</group-tests.source.dir>
<group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
@@ -169,7 +169,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-ses</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
@@ -184,7 +184,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-ddb</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
@@ -199,7 +199,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-s3</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
@@ -214,7 +214,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-sqs</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
@@ -229,7 +229,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/copy-tests.groovy</source>
<properties>
<copy-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/aws2/aws2-sqs-sns</copy-tests.source.dir>
<copy-tests.dest.module.dir>${project.basedir}</copy-tests.dest.module.dir>
diff --git a/integration-tests/azure-grouped/pom.xml b/integration-tests/azure-grouped/pom.xml
index 1e956a6..f42d214 100644
--- a/integration-tests/azure-grouped/pom.xml
+++ b/integration-tests/azure-grouped/pom.xml
@@ -125,7 +125,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
<properties>
<group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/azure</group-tests.source.dir>
<group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
diff --git a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/ParamType.java b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/ParamType.java
index 68afb95..275ec02 100644
--- a/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/ParamType.java
+++ b/integration-tests/dataformats-json/src/main/java/org/apache/camel/quarkus/component/dataformats/json/ParamType.java
@@ -16,42 +16,6 @@
*/
package org.apache.camel.quarkus.component.dataformats.json;
-/*
- * 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.
- */
-/*
- * 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.
- */
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
diff --git a/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java b/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
index a0676bc..4217f87 100644
--- a/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
+++ b/integration-tests/dataformats-json/src/test/java/org/apache/camel/quarkus/component/dataformats/json/JsonComponentsTest.java
@@ -104,7 +104,7 @@ public class JsonComponentsTest {
@Test
void jacksonXml() {
- final String xml = "<PojoA>\n <name>Joe</name>\n</PojoA>\n";
+ final String xml = "<PojoA><name>Joe</name></PojoA>";
final String json = JsonbBuilder.create().toJson(new PojoA("Joe"));
RestAssured.given()
.contentType(ContentType.JSON)
@@ -112,7 +112,7 @@ public class JsonComponentsTest {
.post("/dataformats-json/jacksonxml/marshal")
.then()
.statusCode(200)
- .body(equalTo(xml));
+ .body("PojoA.name", equalTo("Joe"));
RestAssured.given()
.contentType("text/xml")
diff --git a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java b/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
index 0117fab..94512a4 100644
--- a/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
+++ b/integration-tests/dozer/src/test/java/org/apache/camel/quarkus/component/dozer/it/DozerTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.quarkus.component.dozer.it;
+import java.io.File;
+
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import org.junit.jupiter.api.Test;
@@ -46,7 +48,7 @@ class DozerTest {
"address.zip", is("12345"),
"address.street", is("Camel Street"),
"created", containsString("1990"),
- "internalFileAsString", is("/test"),
+ "internalFileAsString", is(File.separator + "test"),
"internalClassAsString", is("java.lang.String"),
"internalUrl", is("http://customer"),
"internal.text", is("hello internal"));
diff --git a/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java b/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
index 3a02d19..ded7443 100644
--- a/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
+++ b/integration-tests/file/src/test/java/org/apache/camel/quarkus/component/file/it/FileTest.java
@@ -33,6 +33,7 @@ import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.path.json.JsonPath;
import io.restassured.response.ValidatableResponse;
+import org.apache.camel.quarkus.core.util.FileUtils;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
@@ -275,7 +276,7 @@ class FileTest {
}
static String createFile(byte[] content, String path, String charset, String fileName) {
- return RestAssured.given()
+ String createdFilePath = RestAssured.given()
.urlEncodingEnabled(true)
.queryParam("charset", charset)
.contentType(ContentType.BINARY)
@@ -287,6 +288,8 @@ class FileTest {
.extract()
.body()
.asString();
+
+ return FileUtils.nixifyPath(createdFilePath);
}
static void startRouteAndWait(String routeId) throws InterruptedException {
@@ -322,7 +325,9 @@ class FileTest {
final JsonPath json = response
.extract()
.jsonPath();
- return file.toString().equals(json.getString("path")) && type.equals(json.getString("type"));
+ String expectedPath = FileUtils.nixifyPath(file);
+ String actualPath = json.getString("path");
+ return expectedPath.equals(actualPath) && type.equals(json.getString("type"));
default:
throw new RuntimeException("Unexpected status code " + response.extract().statusCode());
}
diff --git a/integration-tests/flatpack/src/test/java/org/apache/camel/quarkus/component/flatpack/it/FlatpackTest.java b/integration-tests/flatpack/src/test/java/org/apache/camel/quarkus/component/flatpack/it/FlatpackTest.java
index 2588689..2d666f7 100644
--- a/integration-tests/flatpack/src/test/java/org/apache/camel/quarkus/component/flatpack/it/FlatpackTest.java
+++ b/integration-tests/flatpack/src/test/java/org/apache/camel/quarkus/component/flatpack/it/FlatpackTest.java
@@ -63,7 +63,8 @@ class FlatpackTest {
secondRow.put("LAST_RECV_DT", "20040601");
data.add(secondRow);
- String expected = "ITEM_DESC,IN_STOCK,PRICE,LAST_RECV_DT\nAN ENGINE,100,1000.00,20040601\n";
+ String expected = "ITEM_DESC,IN_STOCK,PRICE,LAST_RECV_DT" + System.lineSeparator() + "AN ENGINE,100,1000.00,20040601"
+ + System.lineSeparator();
given().contentType(ContentType.JSON).body(data).when().get("/flatpack/delimited-marshal").then().statusCode(200)
.body(is(expected));
}
diff --git a/integration-tests/foundation-grouped/pom.xml b/integration-tests/foundation-grouped/pom.xml
index 9bc540b..25a3635 100644
--- a/integration-tests/foundation-grouped/pom.xml
+++ b/integration-tests/foundation-grouped/pom.xml
@@ -198,7 +198,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
<properties>
<group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/foundation</group-tests.source.dir>
<group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
diff --git a/integration-tests/jslt/src/test/java/org/apache/camel/quarkus/component/jslt/it/JsltTest.java b/integration-tests/jslt/src/test/java/org/apache/camel/quarkus/component/jslt/it/JsltTest.java
index e6ac493..c7aef54 100644
--- a/integration-tests/jslt/src/test/java/org/apache/camel/quarkus/component/jslt/it/JsltTest.java
+++ b/integration-tests/jslt/src/test/java/org/apache/camel/quarkus/component/jslt/it/JsltTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.quarkus.component.jslt.it;
import java.io.IOException;
import io.quarkus.test.junit.QuarkusTest;
+import org.apache.camel.util.FileUtil;
import org.junit.jupiter.api.Test;
import static java.nio.charset.StandardCharsets.UTF_8;
@@ -58,6 +59,11 @@ class JsltTest {
String expected = resourceToString("/demoPlayground/outputPrettyPrint.json", UTF_8);
String input = resourceToString("/demoPlayground/input.json", UTF_8);
+ if (FileUtil.isWindows()) {
+ // Jackson ObjectMapper pretty printing uses platform line endings by default
+ expected = expected.replace("\n", System.lineSeparator());
+ }
+
given().when().body(input).get("/jslt/transformFromHeaderWithPrettyPrint").then().statusCode(200).body(is(expected));
}
diff --git a/integration-tests/mongodb-grouped/pom.xml b/integration-tests/mongodb-grouped/pom.xml
index d367ded..192a1bf 100644
--- a/integration-tests/mongodb-grouped/pom.xml
+++ b/integration-tests/mongodb-grouped/pom.xml
@@ -117,7 +117,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
- <source>file:///${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/group-tests.groovy</source>
<properties>
<group-tests.source.dir>${maven.multiModuleProjectDirectory}/integration-test-groups/mongodb</group-tests.source.dir>
<group-tests.dest.module.dir>${project.basedir}</group-tests.dest.module.dir>
diff --git a/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java b/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
index 4b3b371..4e7d770 100644
--- a/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
+++ b/integration-tests/stringtemplate/src/test/java/org/apache/camel/quarkus/component/stringtemplate/it/StringtemplateTest.java
@@ -108,7 +108,7 @@ class StringtemplateTest {
.then()
.statusCode(201)
.body(containsString(
- text + "WORKS!\n"));
+ text + "WORKS!"));
}
@Test
diff --git a/pom.xml b/pom.xml
index 04b1e0c..44086d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -515,6 +515,7 @@
<exclude>.envrc</exclude>
<exclude>**/.idea/**</exclude>
<exclude>**/k8s-sb/**</exclude>
+ <exclude>.gitattributes</exclude>
</excludes>
<mapping>
<cli>CAMEL_PROPERTIES_STYLE</cli>
@@ -691,7 +692,7 @@
</goals>
<phase>process-resources</phase>
<configuration>
- <source>file:///${project.basedir}/tooling/scripts/validate-github-workflows.groovy</source>
+ <source>file:${project.basedir}/tooling/scripts/validate-github-workflows.groovy</source>
</configuration>
</execution>
<execution>
@@ -702,7 +703,7 @@
</goals>
<phase>verify</phase>
<configuration>
- <source>file:///${project.basedir}/tooling/scripts/validate-extension-metadata.groovy</source>
+ <source>file:${project.basedir}/tooling/scripts/validate-extension-metadata.groovy</source>
<properties>
<extensionDirs>extensions-core,extensions-support,extensions</extensionDirs>
</properties>
@@ -1006,7 +1007,7 @@
</goals>
<phase>validate</phase>
<configuration>
- <source>file://${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-yaml.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/update-antora-yaml.groovy</source>
<properties>
<maven.multiModuleProjectDirectory>${maven.multiModuleProjectDirectory}</maven.multiModuleProjectDirectory>
</properties>
@@ -1189,7 +1190,7 @@
</goals>
<phase>verify</phase>
<configuration>
- <source>file:///${project.basedir}/tooling/scripts/report-build-status.groovy</source>
+ <source>file:${project.basedir}/tooling/scripts/report-build-status.groovy</source>
</configuration>
</execution>
</executions>
diff --git a/poms/build-parent/pom.xml b/poms/build-parent/pom.xml
index 51d11d6..8554c14 100644
--- a/poms/build-parent/pom.xml
+++ b/poms/build-parent/pom.xml
@@ -194,7 +194,7 @@
</goals>
<phase>validate</phase>
<configuration>
- <source>file://${maven.multiModuleProjectDirectory}/tooling/scripts/sanity-checks.groovy</source>
+ <source>file:${maven.multiModuleProjectDirectory}/tooling/scripts/sanity-checks.groovy</source>
<properties>
<maven.multiModuleProjectDirectory>${maven.multiModuleProjectDirectory}</maven.multiModuleProjectDirectory>
</properties>
[camel-quarkus] 07/22: Disable flaky messaging resequence test on GitHub CI (#2957)
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit e4e68ccd77f616c2fbede0e47a01edaf9508285f
Author: James Netherton <ja...@gmail.com>
AuthorDate: Thu Feb 10 13:35:17 2022 +0000
Disable flaky messaging resequence test on GitHub CI (#2957)
---
.../camel/quarkus/component/messaging/it/AbstractMessagingTest.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/integration-tests/messaging/common/src/test/java/org/apache/camel/quarkus/component/messaging/it/AbstractMessagingTest.java b/integration-tests/messaging/common/src/test/java/org/apache/camel/quarkus/component/messaging/it/AbstractMessagingTest.java
index 59f1d32..e5fdafc 100644
--- a/integration-tests/messaging/common/src/test/java/org/apache/camel/quarkus/component/messaging/it/AbstractMessagingTest.java
+++ b/integration-tests/messaging/common/src/test/java/org/apache/camel/quarkus/component/messaging/it/AbstractMessagingTest.java
@@ -26,6 +26,7 @@ import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
@@ -123,6 +124,7 @@ public abstract class AbstractMessagingTest {
.body(is("JMS Transaction Success"));
}
+ @DisabledIfEnvironmentVariable(named = "CI", matches = "true", disabledReason = "https://github.com/apache/camel-quarkus/issues/2957")
@Test
public void testResequence() {
final List<String> messages = Arrays.asList("a", "b", "c", "c", "d");