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 d592232 CAMEL-17514: Fix MDC logging to ensure data is setup before
processing. Error handler calling processors must do so in UoW.
d592232 is described below
commit d592232b1137a6f39c7cf593e41f67844b3ccade
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Jan 22 18:53:49 2022 +0100
CAMEL-17514: Fix MDC logging to ensure data is setup before processing.
Error handler calling processors must do so in UoW.
---
.../test/java/org/apache/camel/processor/MDCErrorHandlerTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
index 2d8a47c..bea130e 100644
---
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
+++
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
@@ -44,7 +44,8 @@ public class MDCErrorHandlerTest extends ContextTestSupport {
public void process(Exchange exchange) throws Exception {
var m = MDC.getCopyOfContextMap();
Assertions.assertEquals(5, m.size());
-
Assertions.assertEquals(exchange.getMessage().getHeader(Exchange.BREADCRUMB_ID),
m.get("camel.breadcrumbId"));
+
Assertions.assertEquals(exchange.getMessage().getHeader(Exchange.BREADCRUMB_ID),
+ m.get("camel.breadcrumbId"));
Assertions.assertEquals("start",
m.get("camel.routeId"));
}
}));
@@ -59,7 +60,8 @@ public class MDCErrorHandlerTest extends ContextTestSupport {
public void process(Exchange exchange) throws
Exception {
var m = MDC.getCopyOfContextMap();
Assertions.assertEquals(5, m.size());
-
Assertions.assertEquals(exchange.getMessage().getHeader(Exchange.BREADCRUMB_ID),
m.get("camel.breadcrumbId"));
+
Assertions.assertEquals(exchange.getMessage().getHeader(Exchange.BREADCRUMB_ID),
+ m.get("camel.breadcrumbId"));
Assertions.assertEquals("dead",
m.get("camel.routeId"));
}
})