CAMEL-11359: Optimise old tracer to not use TraceNodeRoute if not enabled. This is a compromise so we can still have it working for backwards compatible but have it marked as deprecated for a better solution with message history eip in the future.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b97c0307 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b97c0307 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b97c0307 Branch: refs/heads/master Commit: b97c03070353442cb257851c37512bcdc222ee1b Parents: 24ac603 Author: Claus Ibsen <[email protected]> Authored: Mon May 29 20:48:42 2017 +0200 Committer: Claus Ibsen <[email protected]> Committed: Mon May 29 20:48:42 2017 +0200 ---------------------------------------------------------------------- .../apache/camel/impl/DefaultUnitOfWork.java | 13 +- .../camel/processor/MulticastProcessor.java | 185 +++++++++++-------- .../processor/interceptor/DefaultChannel.java | 45 +++++ .../java/org/apache/camel/spi/UnitOfWork.java | 1 + .../ManagedCamelContextTracerTest.java | 3 - .../ManagedRouteContextTracerTest.java | 3 - .../management/ManagedTracerOptionsTest.java | 3 - ...DefaultErrorHandlerOnExceptionTraceTest.java | 3 - .../processor/OnCompletionGlobalTraceTest.java | 3 - .../camel/processor/TracePerRouteTest.java | 3 - .../processor/TraceableUnitOfWorkTest.java | 3 - .../InterceptSimpleRouteTraceTest.java | 3 - ...tTraceEventMessageCausedByExceptionTest.java | 3 - .../DefaultTraceEventMessageTest.java | 3 - .../interceptor/TraceFormatterTest.java | 3 - .../processor/interceptor/TraceHandlerTest.java | 3 - .../TraceInterceptorCustomJpaMessageTest.java | 3 - .../TraceInterceptorDestinationTest.java | 3 - ...aceInterceptorFactoryCreatesHandlerTest.java | 3 - .../TraceInterceptorSubclassTest.java | 3 - .../camel/processor/interceptor/TracerTest.java | 2 - .../processor/interceptor/TracingTestBase.java | 3 - 22 files changed, 163 insertions(+), 134 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java index f725859..14d379c 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java @@ -63,6 +63,7 @@ public class DefaultUnitOfWork implements UnitOfWork, Service { private CamelContext context; private List<Synchronization> synchronizations; private Message originalInMessage; + private TracedRouteNodes tracedRouteNodes; private Set<Object> transactedBy; private final Stack<RouteContext> routeContextStack = new Stack<RouteContext>(); private Stack<DefaultSubUnitOfWork> subUnitOfWorks; @@ -77,8 +78,15 @@ public class DefaultUnitOfWork implements UnitOfWork, Service { if (log.isTraceEnabled()) { log.trace("UnitOfWork created for ExchangeId: {} with {}", exchange.getExchangeId(), exchange); } + context = exchange.getContext(); + // only use tracer if explicit enabled + if (context.isTracing() != null && context.isTracing()) { + // backwards compatible + tracedRouteNodes = new DefaultTracedRouteNodes(); + } + if (context.isAllowUseOriginalMessage()) { // special for JmsMessage as it can cause it to loose headers later. if (exchange.getIn().getClass().getName().equals("org.apache.camel.component.jms.JmsMessage")) { @@ -160,6 +168,9 @@ public class DefaultUnitOfWork implements UnitOfWork, Service { if (synchronizations != null) { synchronizations.clear(); } + if (tracedRouteNodes != null) { + tracedRouteNodes.clear(); + } if (transactedBy != null) { transactedBy.clear(); } @@ -293,7 +304,7 @@ public class DefaultUnitOfWork implements UnitOfWork, Service { } public TracedRouteNodes getTracedRouteNodes() { - return null; + return tracedRouteNodes; } public boolean isTransacted() { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java index 1873f82..896372b 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java @@ -675,92 +675,52 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor Processor processor = pair.getProcessor(); final Producer producer = pair.getProducer(); - StopWatch sw = null; - if (producer != null) { - boolean sending = EventHelper.notifyExchangeSending(exchange.getContext(), exchange, producer.getEndpoint()); - if (sending) { - sw = new StopWatch(); - } - } + TracedRouteNodes traced = exchange.getUnitOfWork() != null ? exchange.getUnitOfWork().getTracedRouteNodes() : null; - // compute time taken if sending to another endpoint - final StopWatch watch = sw; - - // let the prepared process it, remember to begin the exchange pair - AsyncProcessor async = AsyncProcessorConverterHelper.convert(processor); - pair.begin(); - sync = async.process(exchange, new AsyncCallback() { - public void done(boolean doneSync) { - // we are done with the exchange pair - pair.done(); - - // okay we are done, so notify the exchange was sent - if (producer != null && watch != null) { - long timeTaken = watch.taken(); - Endpoint endpoint = producer.getEndpoint(); - // emit event that the exchange was sent to the endpoint - EventHelper.notifyExchangeSent(exchange.getContext(), exchange, endpoint, timeTaken); - } + try { + // prepare tracing starting from a new block + if (traced != null) { + traced.pushBlock(); + } - // we only have to handle async completion of the routing slip - if (doneSync) { - return; + StopWatch sw = null; + if (producer != null) { + boolean sending = EventHelper.notifyExchangeSending(exchange.getContext(), exchange, producer.getEndpoint()); + if (sending) { + sw = new StopWatch(); } + } - // continue processing the multicast asynchronously - Exchange subExchange = exchange; - - // Decide whether to continue with the multicast or not; similar logic to the Pipeline - // remember to test for stop on exception and aggregate before copying back results - boolean continueProcessing = PipelineHelper.continueProcessing(subExchange, "Sequential processing failed for number " + total.get(), LOG); - if (stopOnException && !continueProcessing) { - if (subExchange.getException() != null) { - // wrap in exception to explain where it failed - subExchange.setException(new CamelExchangeException("Sequential processing failed for number " + total, subExchange, subExchange.getException())); - } else { - // we want to stop on exception, and the exception was handled by the error handler - // this is similar to what the pipeline does, so we should do the same to not surprise end users - // so we should set the failed exchange as the result and be done - result.set(subExchange); - } - // and do the done work - doDone(original, subExchange, pairs, callback, false, true); - return; - } + // compute time taken if sending to another endpoint + final StopWatch watch = sw; - try { - if (parallelAggregate) { - doAggregateInternal(getAggregationStrategy(subExchange), result, subExchange); - } else { - doAggregate(getAggregationStrategy(subExchange), result, subExchange); + // let the prepared process it, remember to begin the exchange pair + AsyncProcessor async = AsyncProcessorConverterHelper.convert(processor); + pair.begin(); + sync = async.process(exchange, new AsyncCallback() { + public void done(boolean doneSync) { + // we are done with the exchange pair + pair.done(); + + // okay we are done, so notify the exchange was sent + if (producer != null && watch != null) { + long timeTaken = watch.taken(); + Endpoint endpoint = producer.getEndpoint(); + // emit event that the exchange was sent to the endpoint + EventHelper.notifyExchangeSent(exchange.getContext(), exchange, endpoint, timeTaken); } - } catch (Throwable e) { - // wrap in exception to explain where it failed - subExchange.setException(new CamelExchangeException("Sequential processing failed for number " + total, subExchange, e)); - // and do the done work - doDone(original, subExchange, pairs, callback, false, true); - return; - } - - total.incrementAndGet(); - - // maybe there are more processors to multicast - while (it.hasNext()) { - - // prepare and run the next - ProcessorExchangePair pair = it.next(); - subExchange = pair.getExchange(); - updateNewExchange(subExchange, total.get(), pairs, it); - boolean sync = doProcessSequential(original, result, pairs, it, pair, callback, total); - if (!sync) { - LOG.trace("Processing exchangeId: {} is continued being processed asynchronously", original.getExchangeId()); + // we only have to handle async completion of the routing slip + if (doneSync) { return; } + // continue processing the multicast asynchronously + Exchange subExchange = exchange; + // Decide whether to continue with the multicast or not; similar logic to the Pipeline // remember to test for stop on exception and aggregate before copying back results - continueProcessing = PipelineHelper.continueProcessing(subExchange, "Sequential processing failed for number " + total.get(), LOG); + boolean continueProcessing = PipelineHelper.continueProcessing(subExchange, "Sequential processing failed for number " + total.get(), LOG); if (stopOnException && !continueProcessing) { if (subExchange.getException() != null) { // wrap in exception to explain where it failed @@ -776,7 +736,6 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor return; } - // must catch any exceptions from aggregation try { if (parallelAggregate) { doAggregateInternal(getAggregationStrategy(subExchange), result, subExchange); @@ -792,13 +751,68 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor } total.incrementAndGet(); - } - // do the done work - subExchange = result.get() != null ? result.get() : null; - doDone(original, subExchange, pairs, callback, false, true); + // maybe there are more processors to multicast + while (it.hasNext()) { + + // prepare and run the next + ProcessorExchangePair pair = it.next(); + subExchange = pair.getExchange(); + updateNewExchange(subExchange, total.get(), pairs, it); + boolean sync = doProcessSequential(original, result, pairs, it, pair, callback, total); + + if (!sync) { + LOG.trace("Processing exchangeId: {} is continued being processed asynchronously", original.getExchangeId()); + return; + } + + // Decide whether to continue with the multicast or not; similar logic to the Pipeline + // remember to test for stop on exception and aggregate before copying back results + continueProcessing = PipelineHelper.continueProcessing(subExchange, "Sequential processing failed for number " + total.get(), LOG); + if (stopOnException && !continueProcessing) { + if (subExchange.getException() != null) { + // wrap in exception to explain where it failed + subExchange.setException(new CamelExchangeException("Sequential processing failed for number " + total, subExchange, subExchange.getException())); + } else { + // we want to stop on exception, and the exception was handled by the error handler + // this is similar to what the pipeline does, so we should do the same to not surprise end users + // so we should set the failed exchange as the result and be done + result.set(subExchange); + } + // and do the done work + doDone(original, subExchange, pairs, callback, false, true); + return; + } + + // must catch any exceptions from aggregation + try { + if (parallelAggregate) { + doAggregateInternal(getAggregationStrategy(subExchange), result, subExchange); + } else { + doAggregate(getAggregationStrategy(subExchange), result, subExchange); + } + } catch (Throwable e) { + // wrap in exception to explain where it failed + subExchange.setException(new CamelExchangeException("Sequential processing failed for number " + total, subExchange, e)); + // and do the done work + doDone(original, subExchange, pairs, callback, false, true); + return; + } + + total.incrementAndGet(); + } + + // do the done work + subExchange = result.get() != null ? result.get() : null; + doDone(original, subExchange, pairs, callback, false, true); + } + }); + } finally { + // pop the block so by next round we have the same staring point and thus the tracing looks accurate + if (traced != null) { + traced.popBlock(); } - }); + } return sync; } @@ -808,9 +822,16 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor Processor processor = pair.getProcessor(); Producer producer = pair.getProducer(); + TracedRouteNodes traced = exchange.getUnitOfWork() != null ? exchange.getUnitOfWork().getTracedRouteNodes() : null; + // compute time taken if sending to another endpoint StopWatch watch = null; try { + // prepare tracing starting from a new block + if (traced != null) { + traced.pushBlock(); + } + if (producer != null) { boolean sending = EventHelper.notifyExchangeSending(exchange.getContext(), exchange, producer.getEndpoint()); if (sending) { @@ -824,6 +845,10 @@ public class MulticastProcessor extends ServiceSupport implements AsyncProcessor AsyncProcessorHelper.process(async, exchange); } finally { pair.done(); + // pop the block so by next round we have the same staring point and thus the tracing looks accurate + if (traced != null) { + traced.popBlock(); + } if (producer != null && watch != null) { Endpoint endpoint = producer.getEndpoint(); long timeTaken = watch.taken(); http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/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 a88bd71..296397b 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 @@ -247,6 +247,18 @@ public class DefaultChannel extends CamelInternalProcessor implements ModelChann addAdvice(new MessageHistoryAdvice(factory, targetOutputDef)); } + // the regular tracer is not a task on internalProcessor as this is not really needed + // end users have to explicit enable the tracer to use it, and then its okay if we wrap + // the processors (but by default tracer is disabled, and therefore we do not wrap processors) + tracer = getOrCreateTracer(); + if (tracer != null) { + camelContext.addService(tracer); + TraceInterceptor trace = (TraceInterceptor) tracer.wrapProcessorInInterceptors(routeContext.getCamelContext(), targetOutputDef, target, null); + // trace interceptor need to have a reference to route context so we at runtime can enable/disable tracing on-the-fly + trace.setRouteContext(routeContext); + target = trace; + } + // sort interceptors according to ordered interceptors.sort(OrderedComparator.get()); // then reverse list so the first will be wrapped last, as it would then be first being invoked @@ -308,6 +320,39 @@ public class DefaultChannel extends CamelInternalProcessor implements ModelChann // noop } + private InterceptStrategy getOrCreateTracer() { + // only use tracer if explicit enabled + if (camelContext.isTracing() != null && !camelContext.isTracing()) { + return null; + } + + InterceptStrategy tracer = Tracer.getTracer(camelContext); + if (tracer == null) { + if (camelContext.getRegistry() != null) { + // lookup in registry + Map<String, Tracer> map = camelContext.getRegistry().findByTypeWithName(Tracer.class); + if (map.size() == 1) { + tracer = map.values().iterator().next(); + } + } + if (tracer == null) { + // fallback to use the default tracer + tracer = camelContext.getDefaultTracer(); + + // configure and use any trace formatter if any exists + Map<String, TraceFormatter> formatters = camelContext.getRegistry().findByTypeWithName(TraceFormatter.class); + if (formatters.size() == 1) { + TraceFormatter formatter = formatters.values().iterator().next(); + if (tracer instanceof Tracer) { + ((Tracer) tracer).setFormatter(formatter); + } + } + } + } + + return tracer; + } + private InterceptStrategy getOrCreateBacklogTracer() { InterceptStrategy tracer = BacklogTracer.getBacklogTracer(camelContext); if (tracer == null) { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/main/java/org/apache/camel/spi/UnitOfWork.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/spi/UnitOfWork.java b/camel-core/src/main/java/org/apache/camel/spi/UnitOfWork.java index 99d1640..c93bca3 100644 --- a/camel-core/src/main/java/org/apache/camel/spi/UnitOfWork.java +++ b/camel-core/src/main/java/org/apache/camel/spi/UnitOfWork.java @@ -122,6 +122,7 @@ public interface UnitOfWork extends Service { * * @return trace information */ + @Deprecated TracedRouteNodes getTracedRouteNodes(); /** http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTracerTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTracerTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTracerTest.java index af241aa..8ea7d80 100644 --- a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTracerTest.java +++ b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTracerTest.java @@ -24,13 +24,10 @@ import org.apache.camel.LoggingLevel; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class ManagedCamelContextTracerTest extends ManagementTestSupport { public void testCamelContextTracing() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java index fa5eeb1..578fd24 100644 --- a/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java +++ b/camel-core/src/test/java/org/apache/camel/management/ManagedRouteContextTracerTest.java @@ -24,13 +24,10 @@ import org.apache.camel.LoggingLevel; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class ManagedRouteContextTracerTest extends ManagementTestSupport { public void testRouteTracing() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/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 77d9513..617a75a 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 @@ -22,13 +22,10 @@ import javax.management.ObjectName; import org.apache.camel.LoggingLevel; import org.apache.camel.builder.RouteBuilder; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class ManagedTracerOptionsTest extends ManagementTestSupport { public void testManagedTracerOptions() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java b/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java index f3111f5..4ec4441 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java @@ -24,15 +24,12 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.impl.JndiRegistry; import org.apache.camel.processor.interceptor.TraceEventMessage; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * Default error handler test with trace * * @version */ -@Deprecated -@Ignore public class DefaultErrorHandlerOnExceptionTraceTest extends ContextTestSupport { @Override http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java b/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java index c82f4ff..45d9329 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java @@ -25,13 +25,10 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.impl.JndiRegistry; import org.apache.camel.processor.interceptor.TraceEventMessage; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class OnCompletionGlobalTraceTest extends ContextTestSupport { @Override http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java b/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java index 819915c..829a6b2 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/TracePerRouteTest.java @@ -20,13 +20,10 @@ import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class TracePerRouteTest extends ContextTestSupport { public void testTracingPerRoute() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/TraceableUnitOfWorkTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/TraceableUnitOfWorkTest.java b/camel-core/src/test/java/org/apache/camel/processor/TraceableUnitOfWorkTest.java index 4d03a4a..d2601a7 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/TraceableUnitOfWorkTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/TraceableUnitOfWorkTest.java @@ -26,13 +26,10 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.JndiRegistry; import org.apache.camel.management.InstrumentationProcessor; import org.apache.camel.spi.TracedRouteNodes; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class TraceableUnitOfWorkTest extends ContextTestSupport { public void testSendingSomeMessages() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSimpleRouteTraceTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSimpleRouteTraceTest.java b/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSimpleRouteTraceTest.java index 29998d3..30f5cbf 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSimpleRouteTraceTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/intercept/InterceptSimpleRouteTraceTest.java @@ -20,13 +20,10 @@ import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.processor.interceptor.TraceEventMessage; import org.apache.camel.processor.interceptor.Tracer; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class InterceptSimpleRouteTraceTest extends ContextTestSupport { public void testIntercept() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageCausedByExceptionTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageCausedByExceptionTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageCausedByExceptionTest.java index 3481aa5..8be6f99 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageCausedByExceptionTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageCausedByExceptionTest.java @@ -19,13 +19,10 @@ package org.apache.camel.processor.interceptor; import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class DefaultTraceEventMessageCausedByExceptionTest extends ContextTestSupport { public void testCausedByException() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageTest.java index 1fd4350..de1705a 100755 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/DefaultTraceEventMessageTest.java @@ -27,13 +27,10 @@ import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.impl.DefaultExchange; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class DefaultTraceEventMessageTest extends ContextTestSupport { public void testDefaultTraceEventMessage() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceFormatterTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceFormatterTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceFormatterTest.java index 5cd2ff0..09e4904 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceFormatterTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceFormatterTest.java @@ -25,13 +25,10 @@ import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.model.ProcessorDefinition; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class TraceFormatterTest extends ContextTestSupport { private List<String> tracedBodies = new ArrayList<String>(); http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceHandlerTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceHandlerTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceHandlerTest.java index f2a9ca1..9dfa495 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceHandlerTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceHandlerTest.java @@ -19,10 +19,7 @@ package org.apache.camel.processor.interceptor; import java.util.LinkedList; import org.apache.camel.CamelContext; -import org.junit.Ignore; -@Deprecated -@Ignore public class TraceHandlerTest extends TracingTestBase { @Override http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorCustomJpaMessageTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorCustomJpaMessageTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorCustomJpaMessageTest.java index cb43d07..c3530dd 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorCustomJpaMessageTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorCustomJpaMessageTest.java @@ -19,10 +19,7 @@ package org.apache.camel.processor.interceptor; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.component.mock.MockEndpoint; -import org.junit.Ignore; -@Deprecated -@Ignore public class TraceInterceptorCustomJpaMessageTest extends TracingTestBase { @Override http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java index cc3b9ea..254613f 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java @@ -26,13 +26,10 @@ import org.apache.camel.LoggingLevel; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; -import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class TraceInterceptorDestinationTest extends ContextTestSupport { private List<String> tracedBodies = new ArrayList<String>(); http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java index 3c7c2d0..24d8e49 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorFactoryCreatesHandlerTest.java @@ -23,10 +23,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.DelegateProcessor; import org.apache.camel.Processor; import org.apache.camel.model.ProcessorDefinition; -import org.junit.Ignore; -@Deprecated -@Ignore public class TraceInterceptorFactoryCreatesHandlerTest extends TracingTestBase { private static class TraceInterceptorFactoryCreatesHandlerTestFactory implements TraceInterceptorFactory { http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorSubclassTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorSubclassTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorSubclassTest.java index 572ca58..f20e8fa 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorSubclassTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorSubclassTest.java @@ -19,10 +19,7 @@ package org.apache.camel.processor.interceptor; import java.util.LinkedList; import org.apache.camel.CamelContext; -import org.junit.Ignore; -@Deprecated -@Ignore public class TraceInterceptorSubclassTest extends TracingTestBase { @Override http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracerTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracerTest.java b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracerTest.java index dbed515..d0eaacd 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracerTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/TracerTest.java @@ -26,8 +26,6 @@ import org.junit.Ignore; /** * @version */ -@Deprecated -@Ignore public class TracerTest extends ContextTestSupport { private Tracer tracer; http://git-wip-us.apache.org/repos/asf/camel/blob/b97c0307/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 c28419d..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 @@ -21,10 +21,7 @@ import java.util.List; import org.apache.camel.ContextTestSupport; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; -import org.junit.Ignore; -@Deprecated -@Ignore public abstract class TracingTestBase extends ContextTestSupport { protected List<StringBuilder> tracedMessages; private TraceTestProcessor processor = new TraceTestProcessor();
