removed tests cases using System.err to use log.error (or sometimes log.info) instead to tidy up the maven build

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@546554 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-06-12 16:19:49 +00:00
parent 33be9eb4b1
commit b19f17c96b
9 changed files with 40 additions and 31 deletions

View File

@ -371,8 +371,7 @@ public class AMQDeadlockTest3 extends TestCase {
}
} catch (final Throwable e) {
System.err.println("Producer 1 is exiting.");
e.printStackTrace();
log.error("Producer 1 is exiting", e);
}
}
}
@ -431,8 +430,7 @@ public class AMQDeadlockTest3 extends TestCase {
}
} catch (final Throwable e) {
System.err.println("Producer 1 is exiting.");
e.printStackTrace();
log.error("Producer 1 is exiting", e);
}
}
}

View File

@ -75,7 +75,7 @@ public abstract class AutoFailTestSupport extends TestCase {
} finally {
// Check if the test was able to tear down succesfully, which usually means, it has finished its run.
if (!isTestSuccess.get()) {
System.err.println("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
log.error("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
log.fatal("Test case has exceeded the maximum allotted time to run of: " + getMaxTestTime() + " ms.");
System.exit(EXIT_ERROR);
}

View File

@ -22,6 +22,8 @@ import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.JmsTopicSendReceiveWithTwoConnectionsTest;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.xbean.BrokerFactoryBean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.io.ClassPathResource;
/**
@ -29,8 +31,7 @@ import org.springframework.core.io.ClassPathResource;
*
*/
public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsTest{
private static final transient Log log = LogFactory.getLog(QueueMasterSlaveTest.class);
protected BrokerService master;
protected BrokerService slave;
@ -81,7 +82,7 @@ public class QueueMasterSlaveTest extends JmsTopicSendReceiveWithTwoConnectionsT
if (++inflightMessageCount >= failureCount){
inflightMessageCount = 0;
Thread.sleep(1000);
System.err.println("MASTER STOPPED!@!!!!");
log.error("MASTER STOPPED!@!!!!");
master.stop();
}
}

View File

@ -39,8 +39,8 @@ import org.apache.commons.logging.LogFactory;
* @version $Revision: 1.3 $
*/
public abstract class CursorSupport extends TestCase{
protected static final Log log=LogFactory.getLog(CursorSupport.class);
protected static final int MESSAGE_COUNT=500;
protected static final int PREFETCH_SIZE=50;
protected BrokerService broker;
@ -136,13 +136,13 @@ public abstract class CursorSupport extends TestCase{
Message sent = (Message)senderList.get(i);
Message consumed = (Message)consumerList.get(i);
if (!sent.equals(consumed)) {
System.err.println("BAD MATCH AT POS " + i);
System.err.println(sent);
System.err.println(consumed);
log.error("BAD MATCH AT POS " + i);
log.error(sent);
log.error(consumed);
/*
System.err.println("\n\n\n\n\n");
log.error("\n\n\n\n\n");
for (int j = 0; j < consumerList.size(); j++) {
System.err.println(consumerList.get(j));
log.error(consumerList.get(j));
}
*/
}

View File

@ -23,8 +23,12 @@ import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class VolumeTest extends TestCase{
private static final transient Log log = LogFactory.getLog(VolumeTest.class);
protected Store store;
protected String name;
@ -41,7 +45,7 @@ public class VolumeTest extends TestCase{
for (int i =0; i< NUMBER; i++){
container.add(data);
if(i%100000==0){
System.err.println("persisted " + i);
log.error("persisted " + i);
}
}
@ -51,7 +55,7 @@ public class VolumeTest extends TestCase{
assertNotNull(i.next());
count++;
if (count%100000==0){
System.err.println("retrived " + count);
log.error("retrived " + count);
}
}
assertEquals("Different retrieved to stored",NUMBER,count);

View File

@ -17,29 +17,35 @@
*/
package org.apache.activemq.perf;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
/**
* @version $Revision: 1.3 $
*/
public class SlowConsumer extends PerfConsumer{
public SlowConsumer(ConnectionFactory fac,Destination dest,String consumerName)
throws JMSException{
super(fac,dest,consumerName);
public class SlowConsumer extends PerfConsumer {
private static final transient Log log = LogFactory.getLog(SlowConsumer.class);
public SlowConsumer(ConnectionFactory fac, Destination dest, String consumerName) throws JMSException {
super(fac, dest, consumerName);
}
public SlowConsumer(ConnectionFactory fac,Destination dest) throws JMSException{
super(fac,dest,null);
public SlowConsumer(ConnectionFactory fac, Destination dest) throws JMSException {
super(fac, dest, null);
}
public void onMessage(Message msg){
public void onMessage(Message msg) {
super.onMessage(msg);
System.err.println("GOT A MSG " + msg);
try{
log.debug("GOT A MSG " + msg);
try {
Thread.sleep(10000);
}catch(InterruptedException e){
}
catch (InterruptedException e) {
e.printStackTrace();
}
}

View File

@ -173,7 +173,7 @@ public class TopicClusterTest extends TestCase implements MessageListener {
}
//sleep a little - to check we don't get too many messages
Thread.sleep(2000);
System.err.println("GOT: " + receivedMessageCount.get());
log.info("GOT: " + receivedMessageCount.get());
assertEquals("Expected message count not correct", expectedReceiveCount(), receivedMessageCount.get());
}

View File

@ -50,6 +50,7 @@ import java.util.concurrent.atomic.AtomicInteger;
public class AMQDeadlockTestW4Brokers extends TestCase {
private static final transient Log log = LogFactory.getLog(AMQDeadlockTestW4Brokers.class);
private static final String BROKER_URL1 = "tcp://localhost:61616";
private static final String BROKER_URL2 = "tcp://localhost:61617";
private static final String BROKER_URL3 = "tcp://localhost:61618";
@ -320,8 +321,7 @@ public class AMQDeadlockTestW4Brokers extends TestCase {
}
}
catch (final Throwable e) {
System.err.println("Producer 1 is exiting.");
e.printStackTrace();
log.error("Producer 1 is exiting", e);
}
}
}

View File

@ -313,7 +313,7 @@ public class TwoBrokerQueueClientsReconnectTest extends JmsMultipleBrokersTestSu
for (i=0; i<msgCount; i++) {
msg = consumer.receive(1000);
if (msg == null) {
System.err.println("Consumer failed to receive exactly " + msgCount + " messages. Actual messages received is: " + i);
log.error("Consumer failed to receive exactly " + msgCount + " messages. Actual messages received is: " + i);
break;
}
}