activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r399249 - in /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire: DataFileGenerator.java DataFileGeneratorTestSupport.java NumberRangesWhileMarshallingTest.java
Date Wed, 03 May 2006 10:50:54 GMT
Author: jstrachan
Date: Wed May  3 03:50:49 2006
New Revision: 399249

URL: http://svn.apache.org/viewcvs?rev=399249&view=rev
Log:
removed some system.out logging

Modified:
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java?rev=399249&r1=399248&r2=399249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGenerator.java
Wed May  3 03:50:49 2006
@@ -30,11 +30,15 @@
 import java.util.Iterator;
 
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import junit.framework.Assert;
 
 abstract public class DataFileGenerator extends Assert {
 
+    private static final Log log = LogFactory.getLog(DataFileGenerator.class);
+    
     static final File moduleBaseDir;
     static final File controlDir;
     static final File classFileDir; 
@@ -65,7 +69,7 @@
      * @throws IllegalAccessException
      */
     public static ArrayList getAllDataFileGenerators() throws Exception{
-        System.out.println("Looking for generators in : "+classFileDir);
+        log.info("Looking for generators in : "+classFileDir);
         ArrayList l = new ArrayList();
         File[] files = classFileDir.listFiles();
         for (int i = 0; files!=null && i < files.length; i++) {
@@ -85,11 +89,10 @@
         for (Iterator iter = generators.iterator(); iter.hasNext();) {
             DataFileGenerator object = (DataFileGenerator) iter.next();
             try {
-                System.out.println("Processing: "+object.getClass());
+                log.info("Processing: "+object.getClass());
                 object.generateControlFile();
             } catch (Exception e) {
-                System.out.println("Error while processing: "+object.getClass());
-                e.printStackTrace(System.out);
+                log.error("Error while processing: "+object.getClass() + ". Reason: " + e,
e);
             }
         }
     }
@@ -127,7 +130,7 @@
         ArrayList generators = getAllDataFileGenerators();
         for (Iterator iter = generators.iterator(); iter.hasNext();) {
             DataFileGenerator object = (DataFileGenerator) iter.next();
-            System.out.println("Processing: "+object.getClass());
+            log.info("Processing: "+object.getClass());
             object.assertControlFileIsEqual();
         }
     }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java?rev=399249&r1=399248&r2=399249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java
Wed May  3 03:50:49 2006
@@ -56,9 +56,13 @@
 import org.apache.activemq.openwire.v1.BrokerInfoTest;
 import org.apache.activemq.openwire.v1.MessageAckTest;
 import org.apache.activemq.test.TestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public abstract class DataFileGeneratorTestSupport extends TestSupport {
 
+    private static final Log log = LogFactory.getLog(DataFileGeneratorTestSupport.class);
+    
     protected static final Object[] EMPTY_ARGUMENTS = {};
     private static Throwable singletonException = new Exception("shared exception");
 
@@ -93,7 +97,7 @@
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
         DataOutputStream ds = new DataOutputStream(buffer);
         Object expected = createObject();
-        System.out.println("Created: " + expected);
+        log.info("Created: " + expected);
         openWireformat.marshal(expected, ds);
         ds.close();
 
@@ -102,7 +106,7 @@
         DataInputStream dis = new DataInputStream(in);
         Object actual = openWireformat.unmarshal(dis);
 
-        System.out.println("Parsed: " + actual);
+        log.info("Parsed: " + actual);
 
         assertBeansEqual("", new HashSet(), expected, actual);
     }
@@ -129,7 +133,7 @@
                     actualValue = method.invoke(actual, EMPTY_ARGUMENTS);
                 }
                 catch (Exception e) {
-                    System.out.println("Failed to access property: " + name);
+                    log.info("Failed to access property: " + name);
                 }
                 assertPropertyValuesEqual(message + name, comparedObjects, expectedValue,
actualValue);
             }

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java?rev=399249&r1=399248&r2=399249&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/NumberRangesWhileMarshallingTest.java
Wed May  3 03:50:49 2006
@@ -17,6 +17,8 @@
 package org.apache.activemq.openwire;
 
 import org.apache.activemq.command.SessionId;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -32,6 +34,8 @@
  */
 public class NumberRangesWhileMarshallingTest extends TestCase {
 
+    private static final Log log = LogFactory.getLog(NumberRangesWhileMarshallingTest.class);
+    
     protected String connectionId = "Cheese";
     protected ByteArrayOutputStream buffer = new ByteArrayOutputStream();
     protected DataOutputStream ds = new DataOutputStream(buffer);
@@ -97,7 +101,7 @@
         for (int i = 0; i < numberValues.length; i++) {
             long value = numberValues[i];
             String expected = Long.toHexString(value);
-            System.out.println("Unmarshaling value: " + i + " = " + expected);
+            log.info("Unmarshaling value: " + i + " = " + expected);
             
             SessionId command = (SessionId) openWireformat.unmarshal(dis);
             assertEquals("connection ID in object: "+ i, connectionId, command.getConnectionId());



Mime
View raw message