mirror of https://github.com/apache/activemq.git
removed some system.out logging
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@399249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3cbd06152b
commit
9f9fe90d85
|
@ -30,11 +30,15 @@ import java.util.ArrayList;
|
|||
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 @@ abstract public class DataFileGenerator extends Assert {
|
|||
* @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 @@ abstract public class DataFileGenerator extends Assert {
|
|||
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 @@ abstract public class DataFileGenerator extends Assert {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,9 +56,13 @@ import org.apache.activemq.openwire.v1.ActiveMQTextMessageTest;
|
|||
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 @@ public abstract class DataFileGeneratorTestSupport extends TestSupport {
|
|||
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 @@ public abstract class DataFileGeneratorTestSupport extends TestSupport {
|
|||
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 @@ public abstract class DataFileGeneratorTestSupport extends TestSupport {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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 @@ import junit.framework.TestCase;
|
|||
*/
|
||||
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 @@ public class NumberRangesWhileMarshallingTest extends TestCase {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue