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

davsclaus pushed a commit to branch fix/CAMEL-24298-siblings
in repository https://gitbox.apache.org/repos/asf/camel.git

commit dddfcd438eb4169b5b0ef12b954933ba1f2519d7
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Aug 6 14:04:16 2026 +0200

    CAMEL-24298: Add tests for allowedSchemes with ignoreInvalidEndpoints
    
    Verify that a disallowed scheme always hard-fails even when
    ignoreInvalidEndpoints is enabled on recipientList and pollEnrich.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../camel/processor/DynamicUriEipAllowedSchemesTest.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/DynamicUriEipAllowedSchemesTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/DynamicUriEipAllowedSchemesTest.java
index f9906ad016fa..0a3c4e604f91 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/DynamicUriEipAllowedSchemesTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/DynamicUriEipAllowedSchemesTest.java
@@ -69,6 +69,16 @@ class DynamicUriEipAllowedSchemesTest extends 
ContextTestSupport {
         assertRejected("direct:pe");
     }
 
+    @Test
+    void recipientListRejectsDisallowedSchemeEvenWithIgnoreInvalidEndpoints() {
+        assertRejected("direct:rl-ignore");
+    }
+
+    @Test
+    void pollEnrichRejectsDisallowedSchemeEvenWithIgnoreInvalidEndpoints() {
+        assertRejected("direct:pe-ignore");
+    }
+
     private void assertRejected(String from) {
         assertThatThrownBy(() -> template.sendBodyAndHeader(from, "Hello", 
"target", "seda:blocked"))
                 .isInstanceOf(CamelExecutionException.class)
@@ -95,6 +105,10 @@ class DynamicUriEipAllowedSchemesTest extends 
ContextTestSupport {
                 
from("direct:dr").dynamicRouter(method(DynamicUriEipAllowedSchemesTest.this, 
"slip")).allowedSchemes("mock");
                 
from("direct:en").enrich().simple("${header.target}").allowedSchemes("mock");
                 
from("direct:pe").pollEnrich().simple("${header.target}").allowedSchemes("mock").timeout(1000).end();
+
+                
from("direct:rl-ignore").recipientList(header("target")).ignoreInvalidEndpoints().allowedSchemes("mock");
+                
from("direct:pe-ignore").pollEnrich().simple("${header.target}").ignoreInvalidEndpoint()
+                        .allowedSchemes("mock").timeout(1000).end();
             }
         };
     }

Reply via email to