camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [camel] 03/04: CAMEL-13801 - Fixed CS for Camel-Spring
Date Thu, 01 Aug 2019 13:54:24 GMT
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 71b1f6c27635cdb5150a0c680a7adb3e258d6b63
Author: Andrea Cosentino <ancosen@gmail.com>
AuthorDate: Thu Aug 1 15:52:34 2019 +0200

    CAMEL-13801 - Fixed CS for Camel-Spring
---
 .../camel/spring/SpringMDCTransactedTest.java      | 52 +++++++++-------------
 1 file changed, 21 insertions(+), 31 deletions(-)

diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
index f357177..cd82347 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
@@ -30,7 +30,7 @@ import org.slf4j.MDC;
 
 public class SpringMDCTransactedTest extends CamelTestSupport {
 
-	@Override
+    @Override
     protected Registry createCamelRegistry() throws Exception {
         Registry result = new SimpleRegistry();
         result.bind("NOOP-TX", new NoopPlatformTransactionManager());
@@ -55,39 +55,29 @@ public class SpringMDCTransactedTest extends CamelTestSupport {
                 // enable MDC
                 context.setUseMDCLogging(true);
 
-                from("direct:a").routeId("route-a")
-                    .transacted()
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            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-before")
-                    .to("direct:b")
-                    .to("log:foo-after")
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            assertEquals("route-a", MDC.get("camel.routeId"));
-                            assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
-                            assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.messageId"));
-                        }
-                    });
+                from("direct:a").routeId("route-a").transacted().process(new Processor()
{
+                    public void process(Exchange exchange) throws Exception {
+                        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-before").to("direct:b").to("log:foo-after").process(new Processor()
{
+                    public void process(Exchange exchange) throws Exception {
+                        assertEquals("route-a", MDC.get("camel.routeId"));
+                        assertEquals(exchange.getExchangeId(), MDC.get("camel.exchangeId"));
+                        assertEquals(exchange.getIn().getMessageId(), MDC.get("camel.messageId"));
+                    }
+                });
 
-                from("direct:b").routeId("route-b")
-                    .process(new Processor() {
-                        public void process(Exchange exchange) throws Exception {
-                            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");
+                from("direct:b").routeId("route-b").process(new Processor() {
+                    public void process(Exchange exchange) throws Exception {
+                        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");
             }
         };
     }
 
-
 }


Mime
View raw message