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

gnodet pushed a commit to branch misc-test-fixes
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 74e36c6707b11ab9f0061c54519b9ac89c80e106
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri Mar 20 06:32:17 2026 +0100

    CAMEL-23214: Harden NettyHttpSSLHandshakeErrorTest against Netty exception 
wrapping
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../camel/component/netty/http/NettyHttpSSLHandshakeErrorTest.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSSLHandshakeErrorTest.java
 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSSLHandshakeErrorTest.java
index 29e1fd32527f..9eb2f11668ba 100644
--- 
a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSSLHandshakeErrorTest.java
+++ 
b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSSLHandshakeErrorTest.java
@@ -24,7 +24,6 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
@@ -62,7 +61,11 @@ public class NettyHttpSSLHandshakeErrorTest extends 
BaseNettyTestSupport {
 
         assertTrue(response.isFailed(), "should have failed");
         assertNotNull(ex);
-        assertEquals(javax.net.ssl.SSLHandshakeException.class, ex.getClass(), 
"SSLHandshakeException expected");
+        // Netty may wrap SSLHandshakeException in DecoderException
+        boolean isSslError = ex instanceof javax.net.ssl.SSLHandshakeException
+                || (ex.getCause() instanceof 
javax.net.ssl.SSLHandshakeException);
+        assertTrue(isSslError,
+                "Expected SSLHandshakeException (possibly wrapped) but got: " 
+ ex.getClass().getName());
 
         MockEndpoint.assertIsSatisfied(context);
     }

Reply via email to