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

davsclaus pushed a commit to branch camel-4.10.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.10.x by this push:
     new f743b84f7624 CAMEL-22741: pollEnrich EIP doesn't preserve the original 
headers. Updated test.
f743b84f7624 is described below

commit f743b84f76240f7af853550788811b07bb4dcd9e
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Dec 4 08:04:26 2025 +0100

    CAMEL-22741: pollEnrich EIP doesn't preserve the original headers. Updated 
test.
---
 .../camel/component/file/PollEnrichHeaderPropagationTest.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/core/camel-core/src/test/java/org/apache/camel/component/file/PollEnrichHeaderPropagationTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/component/file/PollEnrichHeaderPropagationTest.java
index f98a620a80a2..4a6d40e0bc33 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/component/file/PollEnrichHeaderPropagationTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/component/file/PollEnrichHeaderPropagationTest.java
@@ -36,6 +36,8 @@ public class PollEnrichHeaderPropagationTest extends 
ContextTestSupport {
         mock.expectedBodiesReceived("Hello Camel from file");
         mock.expectedHeaderReceived("foo", "bar");
         mock.expectedHeaderReceived("customHeader", "customValue");
+        mock.expectedPropertyReceived("customProp", "cheese");
+        mock.expectedVariableReceived("myVar", "beer");
 
         // Create a file to be consumed by pollEnrich
         template.sendBodyAndHeader(fileUri(), "Hello Camel from file", 
Exchange.FILE_NAME, "file.txt");
@@ -59,9 +61,11 @@ public class PollEnrichHeaderPropagationTest extends 
ContextTestSupport {
                 from("direct:start")
                         .setHeader("foo", constant("bar"))
                         .setHeader("customHeader", constant("customValue"))
+                        .setProperty("customProp", constant("cheese"))
+                        .setVariable("myVar", constant("beer"))
                         .pollEnrich(fileUri("?fileName=file.txt"), 3000)
                         .convertBodyTo(String.class)
-                        .log("${headers}")
+                        .to("log:result?showAll=true")
                         .to("mock:result");
             }
         };

Reply via email to