This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch 3.27.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit aef77cfdf3e49b8b95715b7cf51e4ba2a80ee019
Author: James Netherton <[email protected]>
AuthorDate: Fri Sep 26 11:44:40 2025 +0100

    Test camel-quarkus-activemq against Artemis broker
---
 .../camel/quarkus/messaging/jms/JmsResource.java   |  2 +-
 integration-tests/activemq/pom.xml                 |  5 ++
 .../it/ActiveMQConnectionFactoryProducer.java      |  2 +-
 .../component/activemq/it/ActiveMQTest.java        |  6 +-
 .../activemq/it/ActiveMQTestResource.java          | 72 ----------------------
 pom.xml                                            |  1 -
 6 files changed, 12 insertions(+), 76 deletions(-)

diff --git 
a/integration-tests-support/messaging/jms/src/main/java/org/apache/camel/quarkus/messaging/jms/JmsResource.java
 
b/integration-tests-support/messaging/jms/src/main/java/org/apache/camel/quarkus/messaging/jms/JmsResource.java
index fd96c74cfd..3249cf8ba0 100644
--- 
a/integration-tests-support/messaging/jms/src/main/java/org/apache/camel/quarkus/messaging/jms/JmsResource.java
+++ 
b/integration-tests-support/messaging/jms/src/main/java/org/apache/camel/quarkus/messaging/jms/JmsResource.java
@@ -125,7 +125,7 @@ public class JmsResource {
     public Response testTransferException(@PathParam("queueName") String 
queueName) {
         try {
             producerTemplate.requestBody(
-                    componentScheme + ":queue:" + queueName + 
"?transferException=true",
+                    componentScheme + ":queue:" + queueName + 
"?transferException=true&replyTo=exception.queue",
                     "bad payload");
         } catch (RuntimeCamelException e) {
             Class<? extends Throwable> exception = e.getCause().getClass();
diff --git a/integration-tests/activemq/pom.xml 
b/integration-tests/activemq/pom.xml
index 12ce5dcb88..0c698815df 100644
--- a/integration-tests/activemq/pom.xml
+++ b/integration-tests/activemq/pom.xml
@@ -44,6 +44,11 @@
         </dependency>
 
         <!-- test dependencies -->
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            
<artifactId>camel-quarkus-integration-tests-support-activemq</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-junit5</artifactId>
diff --git 
a/integration-tests/activemq/src/main/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQConnectionFactoryProducer.java
 
b/integration-tests/activemq/src/main/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQConnectionFactoryProducer.java
index fcf89e3e44..a12d401626 100644
--- 
a/integration-tests/activemq/src/main/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQConnectionFactoryProducer.java
+++ 
b/integration-tests/activemq/src/main/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQConnectionFactoryProducer.java
@@ -30,7 +30,7 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
 @ApplicationScoped
 public class ActiveMQConnectionFactoryProducer {
 
-    @ConfigProperty(name = "camel.component.activemq.broker-url")
+    @ConfigProperty(name = "camel.component.activemq.brokerUrl")
     String brokerUrl;
 
     @Singleton
diff --git 
a/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
 
b/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
index f084f912fa..a6c95dca5b 100644
--- 
a/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
+++ 
b/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTest.java
@@ -17,11 +17,15 @@
 package org.apache.camel.quarkus.component.activemq.it;
 
 import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.ResourceArg;
 import io.quarkus.test.junit.QuarkusTest;
 import org.apache.camel.quarkus.messaging.jms.AbstractJmsMessagingTest;
+import org.apache.camel.quarkus.test.support.activemq.ActiveMQTestResource;
 
 @QuarkusTest
-@QuarkusTestResource(ActiveMQTestResource.class)
+@QuarkusTestResource(initArgs = {
+        @ResourceArg(name = "modules", value = "camel.component.activemq")
+}, value = ActiveMQTestResource.class)
 class ActiveMQTest extends AbstractJmsMessagingTest {
 
 }
diff --git 
a/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTestResource.java
 
b/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTestResource.java
deleted file mode 100644
index 9d8ef914c3..0000000000
--- 
a/integration-tests/activemq/src/test/java/org/apache/camel/quarkus/component/activemq/it/ActiveMQTestResource.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.activemq.it;
-
-import java.util.Collections;
-import java.util.Map;
-
-import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
-import org.eclipse.microprofile.config.ConfigProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.output.Slf4jLogConsumer;
-import org.testcontainers.containers.wait.strategy.Wait;
-
-public class ActiveMQTestResource implements 
QuarkusTestResourceLifecycleManager {
-    private static final Logger LOGGER = 
LoggerFactory.getLogger(ActiveMQTestResource.class);
-
-    private static final String ACTIVEMQ_IMAGE = 
ConfigProvider.getConfig().getValue("activemq.container.image", String.class);
-    private static final int TCP_PORT = 61616;
-
-    private GenericContainer<?> container;
-
-    @Override
-    public Map<String, String> start() {
-        try {
-            container = new GenericContainer<>(ACTIVEMQ_IMAGE)
-                    .withExposedPorts(TCP_PORT)
-                    .withLogConsumer(new Slf4jLogConsumer(LOGGER))
-                    .waitingFor(Wait.forLogMessage(".*ActiveMQ.*started.*", 
1));
-
-            container.start();
-
-            return Collections.singletonMap(
-                    "camel.component.activemq.broker-url",
-                    String.format(
-                            
"tcp://%s:%d?connectionTimeout=5000&tcpNoDelay=false&socket.OOBInline=false" +
-                                    
"&jms.checkForDuplicates=false&jms.redeliveryPolicy.redeliveryDelay=1000" +
-                                    
"&jms.prefetchPolicy.queuePrefetch=1000&jms.blobTransferPolicy.bufferSize=102400",
-                            container.getHost(),
-                            container.getMappedPort(TCP_PORT)));
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Override
-    public void stop() {
-        try {
-            if (container != null) {
-                container.stop();
-            }
-        } catch (Exception e) {
-            // ignored
-        }
-    }
-}
diff --git a/pom.xml b/pom.xml
index b051417d85..0550e33a56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -224,7 +224,6 @@
         <rpkgtests-maven-plugin.version>1.0.0</rpkgtests-maven-plugin.version>
 
         <!-- Test container image properties -->
-        
<activemq.container.image>mirror.gcr.io/rmohr/activemq:5.15.9-alpine</activemq.container.image>
         
<arangodb.container.image>mirror.gcr.io/arangodb:3.12.0</arangodb.container.image>
         
<azurite.container.image>mcr.microsoft.com/azure-storage/azurite:3.35.0</azurite.container.image>
         
<calculator-ws.container.image>quay.io/l2x6/calculator-ws:1.2</calculator-ws.container.image>

Reply via email to