activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r534495 - in /activemq/camel/trunk/camel-core/src/test/java/org/apache/camel: builder/ builder/xml/ component/file/ component/queue/ converter/ impl/
Date Wed, 02 May 2007 14:53:40 GMT
Author: jstrachan
Date: Wed May  2 07:53:38 2007
New Revision: 534495

URL: http://svn.apache.org/viewvc?view=rev&rev=534495
Log:
tidied up the tests to use debug logging to quieten them down some when running a build

Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
Wed May  2 07:53:38 2007
@@ -71,7 +71,7 @@
         // END SNIPPET: e2
 
         Map<Endpoint<Exchange>, Processor> routeMap = builder.getRouteMap();
-        log.info(routeMap);
+        log.debug(routeMap);
 
         Set<Map.Entry<Endpoint<Exchange>, Processor>> routes = routeMap.entrySet();
         assertEquals("Number routes created", 2, routes.size());

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/InterceptorBuilderTest.java
Wed May  2 07:53:38 2007
@@ -68,7 +68,7 @@
             }
         };        
         container.addRoutes(builder);
-        container.start();
+        container.start();                                                   
         
         Endpoint<Exchange> endpoint = container.getEndpoint("direct:a");
         Exchange exchange = endpoint.createExchange();
@@ -82,7 +82,7 @@
         expected.add("END:2");
         expected.add("END:1");
         
-        System.out.println("Interceptor invocation order:"+order);
+        log.debug("Interceptor invocation order:"+order);
         assertEquals(expected, order);
         
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyInterceptorProcessor.java
Wed May  2 07:53:38 2007
@@ -5,11 +5,15 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.processor.DelegateProcessor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class MyInterceptorProcessor extends DelegateProcessor {
-	public void process(Exchange exchange) throws Exception {
-		System.out.println("START of onExchange: "+exchange);
+    private static final transient Log log = LogFactory.getLog(MyInterceptorProcessor.class);
+
+    public void process(Exchange exchange) throws Exception {
+		log.debug("START of onExchange: "+exchange);
 		next.process(exchange);
-		System.out.println("END of onExchange: "+exchange);
+		log.debug("END of onExchange: "+exchange);
 	}
 }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/MyProcessor.java
Wed May  2 07:53:38 2007
@@ -18,10 +18,14 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class MyProcessor implements Processor {
+    private static final transient Log log = LogFactory.getLog(MyProcessor.class);
+    
     public void process(Exchange exchange) {
-        System.out.println("Called with exchange: " + exchange);
+        log.debug("Called with exchange: " + exchange);
     }
 
     @Override

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
Wed May  2 07:53:38 2007
@@ -86,7 +86,7 @@
         RouteBuilder builder = buildSimpleRouteWithHeaderPredicate();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -118,7 +118,7 @@
         RouteBuilder builder = buildSimpleRouteWithChoice();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -144,7 +144,7 @@
         // START SNIPPET: e4
         myProcessor = new Processor() {
             public void process(Exchange exchange) {
-                System.out.println("Called with exchange: " + exchange);
+                log.debug("Called with exchange: " + exchange);
             }
         };
 
@@ -187,7 +187,7 @@
         RouteBuilder builder = buildCustomProcessorWithFilter();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -215,7 +215,7 @@
         RouteBuilder builder = buildWireTap();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -257,7 +257,7 @@
         RouteBuilder builder = buildRouteWithInterceptor();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -285,7 +285,7 @@
         // END SNIPPET: e7
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 2, routes.size());
         for (Route route : routes) {
@@ -293,7 +293,7 @@
             assertEquals("From endpoint", "queue:a", key.getEndpointUri());
             Processor processor = getProcessorWithoutErrorHandler(route);
 
-            System.out.println("processor: " + processor);
+            log.debug("processor: " + processor);
             /* TODO
             FilterProcessor filterProcessor = assertIsInstanceOf(FilterProcessor.class, processor);
 
@@ -330,7 +330,7 @@
         RouteBuilder builder = buildDynamicRecipientList();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -358,7 +358,7 @@
         RouteBuilder builder = buildSplitter();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {
@@ -388,7 +388,7 @@
         RouteBuilder builder = buildIdempotentConsumer();
 
         List<Route> routes = builder.getRouteList();
-        System.out.println("Created routes: " + routes);
+        log.debug("Created routes: " + routes);
 
         assertEquals("Number routes created", 1, routes.size());
         for (Route route : routes) {

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathTest.java
Wed May  2 07:53:38 2007
@@ -61,7 +61,7 @@
             instance = Class.forName("org.apache.xalan.extensions.XPathFunctionResolverImpl").newInstance();
         }
         catch (Throwable e) {
-            log.info("Could not find Xalan on the classpath so ignoring this test case: "
+ e);
+            log.debug("Could not find Xalan on the classpath so ignoring this test case:
" + e);
         }
         
         if (instance instanceof XPathFunctionResolver) {

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteTest.java
Wed May  2 07:53:38 2007
@@ -80,7 +80,7 @@
             public void configure() {
                 from(uri).process(new Processor() {
                     public void process(Exchange e) {
-                        System.out.println("Received exchange: " + e.getIn());
+                        log.debug("Received exchange: " + e.getIn());
                         receivedExchange = e;
                         latch.countDown();
                     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/queue/QueueRouteTest.java
Wed May  2 07:53:38 2007
@@ -24,6 +24,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
+import org.apache.camel.TestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
 
@@ -33,7 +34,7 @@
 /**
  * @version $Revision: 520220 $
  */
-public class QueueRouteTest extends TestCase {
+public class QueueRouteTest extends TestSupport {
 
 	
     public void testSedaQueue() throws Exception {
@@ -47,7 +48,7 @@
                 from("queue:test.a").to("queue:test.b");
                 from("queue:test.b").process(new Processor() {
                     public void process(Exchange e) {
-                        System.out.println("Received exchange: " + e.getIn());
+                        log.debug("Received exchange: " + e.getIn());
                         latch.countDown();
                     }
                 });
@@ -84,7 +85,7 @@
                 from("queue:test.a").to("queue:test.b");
                 from("queue:test.b").process(new Processor() {
                     public void process(Exchange e) {
-                        System.out.println("Received exchange: " + e.getIn());
+                        log.debug("Received exchange: " + e.getIn());
                         latch.countDown();
                     }
                 });

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
Wed May  2 07:53:38 2007
@@ -129,7 +129,7 @@
         // now lets go back to a List again
         List resultList = converter.convertTo(List.class, intArray);
         assertEquals("List size", 2, resultList.size());
-        log.info("From primitive type array we've created the list: " + resultList);
+        log.debug("From primitive type array we've created the list: " + resultList);
 
     }
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java?view=diff&rev=534495&r1=534494&r2=534495
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java
Wed May  2 07:53:38 2007
@@ -53,7 +53,7 @@
 
         DefaultProducer producer = new DefaultProducer(endpoint) {
             public void process(Exchange exchange) throws Exception {
-                log.info("Received: " + exchange);
+                log.debug("Received: " + exchange);
             }
         };
 



Mime
View raw message