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

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

commit 9f4378833804690c8483982eed4f15447bd24256
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Sep 15 09:27:50 2026 +0200

    chore(deps): camel-jms - adapt JmsTestConnectionOnStartupTest to Artemis 
2.57.0 exception mapping
    
    Artemis 2.57.0 (Improve Core connection handshake) now converts
    ActiveMQException via JMSExceptionHelper instead of wrapping it in a
    JMSException("Failed to create session factory"), so assert on the
    exception type rather than the third-party message text.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../apache/camel/component/jms/JmsTestConnectionOnStartupTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
index 8a804cd529f7..4e9ec28d9ffb 100644
--- 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
+++ 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.jms;
 
 import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSException;
 
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.camel.CamelContext;
@@ -72,7 +73,9 @@ public class JmsTestConnectionOnStartupTest extends 
CamelTestSupport {
             assertTrue(e.getMessage()
                     .startsWith(
                             "Failed to create Producer for endpoint: 
activemq://queue:JmsTestConnectionOnStartupTest?testConnectionOnStartup=true."));
-            
assertTrue(e.getCause().toString().contains("jakarta.jms.JMSException: Failed 
to create session factory"));
+            // the exact message depends on the Artemis client version (2.57 
maps ActiveMQException
+            // via JMSExceptionHelper instead of wrapping it as "Failed to 
create session factory")
+            assertIsInstanceOf(JMSException.class, e.getCause());
         }
     }
 

Reply via email to