camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1296785 - in /camel/trunk/camel-core/src/test/java/org/apache/camel/processor: MDCResetTest.java MDCTest.java MDCWireTapTest.java MDCWithBreadcrumbTest.java
Date Sun, 04 Mar 2012 12:27:54 GMT
Author: davsclaus
Date: Sun Mar  4 12:27:53 2012
New Revision: 1296785

URL: http://svn.apache.org/viewvc?rev=1296785&view=rev
Log:
CAMEL-5047: MDC logging keys has been prefixed with camel. Adjusted tests.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java?rev=1296785&r1=1296784&r2=1296785&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java Sun
Mar  4 12:27:53 2012
@@ -61,8 +61,8 @@ public class MDCResetTest extends Contex
                 from("direct:a").routeId("route-a")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-a", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                                assertEquals("route-a", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
                             }
                         })
                         .to("log:foo").to("direct:b")
@@ -76,8 +76,8 @@ public class MDCResetTest extends Contex
                         })
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-a", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                                assertEquals("route-a", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
                             }
                         })
                         .to("log:result").to("mock:result");
@@ -85,8 +85,8 @@ public class MDCResetTest extends Contex
                 from("direct:b").routeId("route-b")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-b", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                                assertEquals("route-b", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
 
                                 exchange.getOut().setBody("Good Afternoon World");
                             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java?rev=1296785&r1=1296784&r2=1296785&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java Sun Mar 
4 12:27:53 2012
@@ -58,9 +58,9 @@ public class MDCTest extends ContextTest
                 from("direct:a").routeId("route-a")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-a", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
-                                assertEquals(exchange.getIn().getMessageId(), MDC.get("messageId"));
+                                assertEquals("route-a", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
+                                assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.messageId"));
                             }
                         })
                         .to("log:foo").to("direct:b");
@@ -68,9 +68,9 @@ public class MDCTest extends ContextTest
                 from("direct:b").routeId("route-b")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-b", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
-                                assertEquals(exchange.getIn().getMessageId(), MDC.get("messageId"));
+                                assertEquals("route-b", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
+                                assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.messageId"));
                             }
                         })
                         .to("log:bar").to("mock:result");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java?rev=1296785&r1=1296784&r2=1296785&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java Sun
Mar  4 12:27:53 2012
@@ -47,8 +47,8 @@ public class MDCWireTapTest extends Cont
                 from("direct:a").routeId("route-a")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
-                            assertEquals("route-a", MDC.get("routeId"));
-                            assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                            assertEquals("route-a", MDC.get("camel.routeId"));
+                            assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
                         }
                     })
                     .to("log:before-wiretap")
@@ -56,8 +56,8 @@ public class MDCWireTapTest extends Cont
                     .delay(2000)
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-a", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                                assertEquals("route-a", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
                             }
                         })
                     .to("log:a-done")
@@ -66,8 +66,8 @@ public class MDCWireTapTest extends Cont
                 from("direct:b").routeId("route-b")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-b", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
+                                assertEquals("route-b", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
                             }
                         })
                     .to("log:b-done").to("mock:b");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java?rev=1296785&r1=1296784&r2=1296785&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
Sun Mar  4 12:27:53 2012
@@ -38,9 +38,9 @@ public class MDCWithBreadcrumbTest exten
                 from("direct:a").routeId("route-a")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-a", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
-                                assertEquals(exchange.getIn().getMessageId(), MDC.get("breadcrumbId"));
+                                assertEquals("route-a", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
+                                assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.breadcrumbId"));
                             }
                         })
                         .to("log:foo").to("direct:b");
@@ -48,9 +48,9 @@ public class MDCWithBreadcrumbTest exten
                 from("direct:b").routeId("route-b")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                assertEquals("route-b", MDC.get("routeId"));
-                                assertEquals(exchange.getExchangeId(), MDC.get("exchangeId"));
-                                assertEquals(exchange.getIn().getMessageId(), MDC.get("breadcrumbId"));
+                                assertEquals("route-b", MDC.get("camel.routeId"));
+                                assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
+                                assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.breadcrumbId"));
                             }
                         })
                         .to("log:bar").to("mock:result");



Mime
View raw message