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

davsclaus pushed a commit to branch quick-fix/greeter-client-test-mute-exception
in repository https://gitbox.apache.org/repos/asf/camel.git

commit bb5a626900f0178bfc8625c5a3a061d4a26c05d5
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Aug 29 10:40:13 2026 +0200

    chore: update GreeterClientTest for camel-cxf muteException default
    
    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. Update the
    inherited assertion in testServiceWithNotAuthorizedUser (also used by
    GreeterClientCxfMessageTest) to match the new, intended behavior.
    
    No JIRA needed - this is a test catching up to an already-merged,
    already-documented security hardening default, not a bug fix.
    
    Co-authored-by: Claude Sonnet 5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../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