activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r546554 - in /activemq/trunk/activemq-core/src/test/java/org/apache/activemq: ./ broker/ft/ broker/region/cursors/ kaha/ perf/ transport/ usecases/
Date Tue, 12 Jun 2007 16:19:50 GMT
Author: jstrachan
Date: Tue Jun 12 09:19:49 2007
New Revision: 546554

URL: http://svn.apache.org/viewvc?view=rev&rev=546554
Log:
removed tests cases using System.err to use log.error (or sometimes log.info) instead to tidy
up the maven build

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AMQDeadlockTest3.java Tue
Jun 12 09:19:49 2007
@@ -371,8 +371,7 @@
 				}
 
 			} catch (final Throwable e) {
-				System.err.println("Producer 1 is exiting.");
-				e.printStackTrace();
+				log.error("Producer 1 is exiting", e);
 			}
 		}
 	}
@@ -431,8 +430,7 @@
 				}
 
 			} catch (final Throwable e) {
-				System.err.println("Producer 1 is exiting.");
-				e.printStackTrace();
+				log.error("Producer 1 is exiting", e);
 			}
 		}
 	}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/AutoFailTestSupport.java
Tue Jun 12 09:19:49 2007
@@ -75,7 +75,7 @@
                 } 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);
                     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTest.java
Tue Jun 12 09:19:49 2007
@@ -22,6 +22,8 @@
 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 @@
  *
  */
 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 @@
         if (++inflightMessageCount >= failureCount){
             inflightMessageCount = 0;
             Thread.sleep(1000);
-            System.err.println("MASTER STOPPED!@!!!!");
+            log.error("MASTER STOPPED!@!!!!");
             master.stop();
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java
Tue Jun 12 09:19:49 2007
@@ -39,8 +39,8 @@
  * @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 @@
             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));
                }
                */
             }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/kaha/VolumeTest.java Tue
Jun 12 09:19:49 2007
@@ -23,8 +23,12 @@
 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 @@
         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 @@
             assertNotNull(i.next());
             count++;
             if (count%100000==0){
-                System.err.println("retrived  " + count);
+                log.error("retrived  " + count);
             }
         }
         assertEquals("Different retrieved to stored",NUMBER,count);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowConsumer.java
Tue Jun 12 09:19:49 2007
@@ -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();
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
Tue Jun 12 09:19:49 2007
@@ -173,7 +173,7 @@
         }
         //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());
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQDeadlockTestW4Brokers.java
Tue Jun 12 09:19:49 2007
@@ -50,6 +50,7 @@
 
 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 @@
                 }
             }
             catch (final Throwable e) {
-                System.err.println("Producer 1 is exiting.");
-                e.printStackTrace();
+                log.error("Producer 1 is exiting", e);
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java?view=diff&rev=546554&r1=546553&r2=546554
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueClientsReconnectTest.java
Tue Jun 12 09:19:49 2007
@@ -313,7 +313,7 @@
         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;
             }
         }



Mime
View raw message