You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/08/29 08:40:26 UTC

(camel) branch quick-fix/greeter-client-test-mute-exception created (now bb5a626900f0)

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

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


      at bb5a626900f0 chore: update GreeterClientTest for camel-cxf muteException default

This branch includes the following new commits:

     new bb5a626900f0 chore: update GreeterClientTest for camel-cxf muteException default

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/01: chore: update GreeterClientTest for camel-cxf muteException default

Posted by da...@apache.org.
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 <cl...@gmail.com>
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 <no...@anthropic.com>
    Signed-off-by: Claus Ibsen <cl...@gmail.com>
---
 .../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");
         }
     }