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 2025/12/04 07:04:49 UTC
(camel) branch main updated: CAMEL-22741: pollEnrich EIP doesn't preserve the original headers. Updated test.
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 27e490547202 CAMEL-22741: pollEnrich EIP doesn't preserve the original headers. Updated test.
27e490547202 is described below
commit 27e490547202337a1e43c4898453264dbd55ee81
Author: Claus Ibsen <cl...@gmail.com>
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");
}
};