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 2022/01/22 17:55:22 UTC
[camel] 02/02: CAMEL-17514: Fix MDC logging to ensure data is setup before processing. Error handler calling processors must do so in UoW.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit da482b6f8d16571aacd18513b65b5f5215500a2d
Author: Claus Ibsen <cl...@gmail.com>
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"));
}
})