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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 6af45599d65 CAMEL-20477: do not shut down shared static services
6af45599d65 is described below

commit 6af45599d65ac57654711d2133c38cd21cbbd037
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Thu Feb 29 13:24:53 2024 +0000

    CAMEL-20477: do not shut down shared static services
---
 .../component/jms/tx/JmsToJmsTransactedTest.java      | 19 +++++++++++++++++--
 .../camel/component/jms/tx/JmsToJmsTransactedTest.xml |  2 +-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.java
 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.java
index 2cedf70aa98..80e23d0d990 100644
--- 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.java
+++ 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.java
@@ -17,20 +17,35 @@
 package org.apache.camel.component.jms.tx;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.AbstractSpringJMSTestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.infra.artemis.services.ArtemisService;
+import org.apache.camel.test.infra.artemis.services.ArtemisServiceFactory;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Tags;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.extension.RegisterExtension;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 @TestInstance(TestInstance.Lifecycle.PER_METHOD)
 @Tags({ @Tag("not-parallel"), @Tag("spring"), @Tag("tx") })
-public class JmsToJmsTransactedTest extends AbstractSpringJMSTestSupport {
+public final class JmsToJmsTransactedTest extends CamelSpringTestSupport {
+
+    @RegisterExtension
+    public static ArtemisService service = 
ArtemisServiceFactory.createVMService();
+
+    /**
+     * Used by spring xml configurations
+     *
+     * @return
+     */
+    public static String getServiceAddress() {
+        return service.serviceAddress();
+    }
 
     @BeforeEach
     public void beforeEach() {
diff --git 
a/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.xml
 
b/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.xml
index 8c8ea5a8757..e592f2fd0b5 100644
--- 
a/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.xml
+++ 
b/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/JmsToJmsTransactedTest.xml
@@ -31,7 +31,7 @@
 
     <bean id="jmsConnectionFactory" 
class="org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory">
         <property name="brokerURL">
-            <bean 
class="org.apache.camel.component.jms.AbstractSpringJMSTestSupport"  
factory-method="getServiceAddress"/>
+            <bean 
class="org.apache.camel.component.jms.tx.JmsToJmsTransactedTest"  
factory-method="getServiceAddress"/>
         </property>
     </bean>
 

Reply via email to