camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/4] git commit: CAMEL-6383: Disable tracer by default.
Date Tue, 21 May 2013 12:19:16 GMT
CAMEL-6383: Disable tracer by default.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/390467c8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/390467c8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/390467c8

Branch: refs/heads/master
Commit: 390467c81e0caede610327b6abdcc97f58b1064e
Parents: 5fb81ec
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue May 21 11:47:34 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue May 21 12:11:36 2013 +0200

----------------------------------------------------------------------
 .../processor/interceptor/DefaultChannel.java      |    4 ++++
 .../org/apache/camel/impl/CustomIdFactoryTest.java |    4 ++--
 .../issues/AdviceWithStartTargetIssueTest.java     |    2 +-
 .../camel/management/ManagedTracerOptionsTest.java |    2 ++
 .../processor/RouteServicesStartupOrderTest.java   |    9 +++++----
 .../processor/async/AsyncTraceHandlerTest.java     |    2 ++
 .../processor/interceptor/TracingTestBase.java     |    2 ++
 7 files changed, 18 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
index 2347dfd..fc3b4a5 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
@@ -34,6 +34,7 @@ import org.apache.camel.model.ModelChannel;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.ProcessorDefinitionHelper;
 import org.apache.camel.model.RouteDefinition;
+import org.apache.camel.model.RouteDefinitionHelper;
 import org.apache.camel.processor.CamelInternalProcessor;
 import org.apache.camel.processor.InterceptorToAsyncProcessorBridge;
 import org.apache.camel.processor.WrapProcessor;
@@ -188,6 +189,9 @@ public class DefaultChannel extends ServiceSupport implements ModelChannel
{
             childDefinition.setParent(outputDefinition);
         }
 
+        // force the creation of an id
+        RouteDefinitionHelper.forceAssignIds(routeContext.getCamelContext(), definition);
+
         // first wrap the output with the managed strategy if any
         InterceptStrategy managed = routeContext.getManagedInterceptStrategy();
         if (managed != null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
index 56b6ae2..2ef40d2 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/CustomIdFactoryTest.java
@@ -89,7 +89,7 @@ public class CustomIdFactoryTest extends ContextTestSupport {
         assertMockEndpointsSatisfied();
 
         // this should take the when path (first to)
-        assertEquals("#choice5##to2#", ids);
+        assertEquals("#choice7##to3#", ids);
     }
 
     /**
@@ -103,7 +103,7 @@ public class CustomIdFactoryTest extends ContextTestSupport {
         assertMockEndpointsSatisfied();
 
         // this should take the otherwise path
-        assertEquals("#choice5##log3##to4#", ids);
+        assertEquals("#choice7##log5##to6#", ids);
     }
 
     private static class MyDebuggerCheckingId implements InterceptStrategy {

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
b/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
index 6a379a5..509b702 100644
--- a/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/issues/AdviceWithStartTargetIssueTest.java
@@ -78,7 +78,7 @@ public class AdviceWithStartTargetIssueTest extends ContextTestSupport {
                     // we just count number of interceptions
                     count++;
                     LOG.info("I am the container wide interceptor. Intercepted total count:
" + count);
-                    nextTarget.process(exchange);
+                    target.process(exchange);
                 }
 
                 @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
b/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
index a553101..67627aa 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedTracerOptionsTest.java
@@ -155,6 +155,8 @@ public class ManagedTracerOptionsTest extends ManagementTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                context.setTracing(true);
+
                 from("direct:start").to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/processor/RouteServicesStartupOrderTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/RouteServicesStartupOrderTest.java
b/camel-core/src/test/java/org/apache/camel/processor/RouteServicesStartupOrderTest.java
index fbebd90..6177d86 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/RouteServicesStartupOrderTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/RouteServicesStartupOrderTest.java
@@ -26,6 +26,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.spi.RouteStartupOrder;
+import org.apache.camel.support.ServiceSupport;
 
 /**
  * @version 
@@ -58,7 +59,7 @@ public class RouteServicesStartupOrderTest extends ContextTestSupport {
         assertEquals("direct://bar", order.get(3).getRoute().getEndpoint().getEndpointUri());
 
         // assert route service was started in order as well
-        assertEquals("22114433", startOrder);
+        assertEquals("2143", startOrder);
     }
 
     @Override
@@ -77,7 +78,7 @@ public class RouteServicesStartupOrderTest extends ContextTestSupport {
         };
     }
 
-    public class MyServiceBean implements Processor, Service {
+    public class MyServiceBean extends ServiceSupport implements Processor {
 
         private String name;
         private boolean started;
@@ -86,12 +87,12 @@ public class RouteServicesStartupOrderTest extends ContextTestSupport
{
             this.name = name;
         }
 
-        public void start() throws Exception {
+        protected void doStart() throws Exception {
             startOrder += name;
             started = true;
         }
 
-        public void stop() throws Exception {
+        protected void doStop() throws Exception {
             started = false;
         }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/processor/async/AsyncTraceHandlerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncTraceHandlerTest.java
b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncTraceHandlerTest.java
index 7f18477..5320240 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/async/AsyncTraceHandlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/async/AsyncTraceHandlerTest.java
@@ -63,6 +63,8 @@ public class AsyncTraceHandlerTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                context.setTracing(true);
+
                 context.addComponent("async", new MyAsyncComponent());
 
                 from("direct:start")

http://git-wip-us.apache.org/repos/asf/camel/blob/390467c8/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracingTestBase.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracingTestBase.java
b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracingTestBase.java
index 33c42ba..dbdf2f1 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracingTestBase.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracingTestBase.java
@@ -121,6 +121,8 @@ public abstract class TracingTestBase extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                context.setTracing(true);
+
                 from("direct:start")
                         .tracing()
                         .process(processor)


Mime
View raw message