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

davsclaus 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 f922ada7c747 chore: update GreeterClientTest for camel-cxf 
muteException default (#25880)
f922ada7c747 is described below

commit f922ada7c747a580235a8b7f8b9d8d8eff4b4dcf
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Aug 29 12:14:47 2026 +0200

    chore: update GreeterClientTest for camel-cxf muteException default (#25880)
    
    CAMEL-24477 changed CxfEndpoint's muteException consumer option to
    default to true, so an undeclared route failure like this test's
    authorization denial no longer leaks its internal exception message
    to the SOAP caller - it now returns the generic "Exchange processing
    failed" fault, per the documented 4.23 upgrade guide entry. Updated
    the inherited assertion in testServiceWithNotAuthorizedUser (also
    used by GreeterClientCxfMessageTest) to match the intended behavior.
    
    Closes #25880
---
 .../java/org/apache/camel/itest/security/GreeterClientTest.java  | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/security/GreeterClientTest.java
 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/security/GreeterClientTest.java
index 9592e1e2bed4..055a44ffa03b 100644
--- 
a/tests/camel-itest/src/test/java/org/apache/camel/itest/security/GreeterClientTest.java
+++ 
b/tests/camel-itest/src/test/java/org/apache/camel/itest/security/GreeterClientTest.java
@@ -118,12 +118,9 @@ public class GreeterClientTest {
             fail("should fail");
         } catch (Exception ex) {
             assertTrue(ex instanceof SOAPFaultException, "Get a wrong type 
exception.");
-            assertTrue(ex.getMessage().startsWith("Cannot access the processor 
which has been protected."),
-                    "Get a wrong exception message");
-            assertTrue(
-                    ex.getMessage().endsWith(
-                            "Caused by: 
[org.springframework.security.authorization.AuthorizationDeniedException - 
Access Denied]"),
-                    "Get a wrong exception message");
+            // CxfEndpoint's muteException consumer option defaults to true 
(CAMEL-24477): an undeclared
+            // route failure - such as this authorization denial - no longer 
leaks its message to the caller.
+            assertEquals("Exchange processing failed", ex.getMessage(), "Get a 
wrong exception message");
         }
     }
 

Reply via email to