activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564271 [17/18] - in /activemq/trunk: activemq-core/src/main/java/org/apache/activemq/ activemq-core/src/main/java/org/apache/activemq/advisory/ activemq-core/src/main/java/org/apache/activemq/blob/ activemq-core/src/main/java/org/apache/ac...
Date Thu, 09 Aug 2007 16:40:08 GMT
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java Thu Aug  9 09:37:49 2007
@@ -38,7 +38,7 @@
  * @version $Revision$
  */
 public class StompSubscriptionRemoveTest extends TestCase {
-    private static final Log log = LogFactory.getLog(StompSubscriptionRemoveTest.class);
+    private static final Log LOG = LogFactory.getLog(StompSubscriptionRemoveTest.class);
     private static final String COMMAND_MESSAGE = "MESSAGE";
     private static final String HEADER_MESSAGE_ID = "message-id";
     private static final int STOMP_PORT = 61613;
@@ -60,7 +60,7 @@
         Message message = session.createTextMessage("Testas");
         for (int idx = 0; idx < 2000; ++idx) {
             producer.send(message);
-            log.debug("Sending: " + idx);
+            LOG.debug("Sending: " + idx);
         }
         producer.close();
         session.close();
@@ -68,8 +68,8 @@
 
         stompConnection.open("localhost", STOMP_PORT);
 
-        String connect_frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
-        stompConnection.sendFrame(connect_frame);
+        String connectFrame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
+        stompConnection.sendFrame(connectFrame);
 
         stompConnection.receiveFrame();
         String frame = "SUBSCRIBE\n" + "destination:/queue/" + getDestinationName() + "\n" + "ack:client\n\n";
@@ -79,7 +79,7 @@
         int count = 0;
         while (count < 2) {
             String receiveFrame = stompConnection.receiveFrame();
-            log.debug("Received: " + receiveFrame);
+            LOG.debug("Received: " + receiveFrame);
             assertEquals("Unexpected frame received", COMMAND_MESSAGE, getCommand(receiveFrame));
             String messageId = getHeaderValue(receiveFrame, HEADER_MESSAGE_ID);
             String ackmessage = "ACK\n" + HEADER_MESSAGE_ID + ":" + messageId + "\n\n";
@@ -95,8 +95,8 @@
 
         stompConnection.open("localhost", STOMP_PORT);
 
-        connect_frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
-        stompConnection.sendFrame(connect_frame);
+        connectFrame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "\n";
+        stompConnection.sendFrame(connectFrame);
 
         stompConnection.receiveFrame();
 
@@ -105,7 +105,7 @@
         try {
             while (count != 2000) {
                 String receiveFrame = stompConnection.receiveFrame();
-                log.debug("Received: " + receiveFrame);
+                LOG.debug("Received: " + receiveFrame);
                 assertEquals("Unexpected frame received", COMMAND_MESSAGE, getCommand(receiveFrame));
                 String messageId = getHeaderValue(receiveFrame, HEADER_MESSAGE_ID);
                 String ackmessage = "ACK\n" + HEADER_MESSAGE_ID + ":" + messageId.trim() + "\n\n";
@@ -122,7 +122,7 @@
         stompConnection.close();
         broker.stop();
 
-        log.info("Total messages received: " + messagesCount);
+        LOG.info("Total messages received: " + messagesCount);
         assertTrue("Messages received after connection loss: " + messagesCount, messagesCount >= 2000);
 
         // The first ack messages has no chance complete, so we receiving more

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java Thu Aug  9 09:37:49 2007
@@ -37,8 +37,12 @@
 import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTextMessage;
+import org.apache.activemq.transport.reliable.UnreliableUdpTransportTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class StompTest extends CombinationTestSupport {
+    private static final Log LOG = LogFactory.getLog(StompTest.class);
 
     private BrokerService broker;
     private TransportConnector connector;
@@ -99,8 +103,8 @@
 
     public void testConnect() throws Exception {
 
-        String connect_frame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "request-id: 1\n" + "\n" + Stomp.NULL;
-        stompConnection.sendFrame(connect_frame);
+        String connectFrame = "CONNECT\n" + "login: brianm\n" + "passcode: wombats\n" + "request-id: 1\n" + "\n" + Stomp.NULL;
+        stompConnection.sendFrame(connectFrame);
 
         String f = stompConnection.receiveFrame();
         assertTrue(f.startsWith("CONNECTED"));
@@ -239,9 +243,9 @@
         assertTrue(frame.startsWith("MESSAGE"));
 
         Pattern cl = Pattern.compile("Content-length:\\s*(\\d+)", Pattern.CASE_INSENSITIVE);
-        Matcher cl_matcher = cl.matcher(frame);
-        assertTrue(cl_matcher.find());
-        assertEquals("5", cl_matcher.group(1));
+        Matcher clMmatcher = cl.matcher(frame);
+        assertTrue(clMmatcher.find());
+        assertEquals("5", clMmatcher.group(1));
 
         assertFalse(Pattern.compile("type:\\s*null", Pattern.CASE_INSENSITIVE).matcher(frame).find());
 
@@ -396,7 +400,7 @@
 
         try {
             frame = stompConnection.receiveFrame();
-            log.info("Received frame: " + frame);
+            LOG.info("Received frame: " + frame);
             fail("No message should have been received since subscription was removed");
         } catch (SocketTimeoutException e) {
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,8 +32,12 @@
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.transport.TransportServer;
+import org.apache.activemq.transport.stomp.StompTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class InactivityMonitorTest extends CombinationTestSupport implements TransportAcceptListener {
+    private static final Log LOG = LogFactory.getLog(InactivityMonitorTest.class);
 
     private TransportServer server;
     private Transport clientTransport;
@@ -71,7 +75,7 @@
 
             public void onException(IOException error) {
                 if (!ignoreClientError.get()) {
-                    log.info("Client transport error:");
+                    LOG.info("Client transport error:");
                     error.printStackTrace();
                     clientErrorCount.incrementAndGet();
                 }
@@ -101,12 +105,15 @@
         ignoreClientError.set(true);
         ignoreServerError.set(true);
         try {
-            if (clientTransport != null)
+            if (clientTransport != null) {
                 clientTransport.stop();
-            if (serverTransport != null)
+            }
+            if (serverTransport != null) {
                 serverTransport.stop();
-            if (server != null)
+            }
+            if (server != null) {
                 server.stop();
+            }
         } catch (Throwable e) {
             e.printStackTrace();
         }
@@ -115,7 +122,7 @@
 
     public void onAccept(Transport transport) {
         try {
-            log.info("[" + getName() + "] Server Accepted a Connection");
+            LOG.info("[" + getName() + "] Server Accepted a Connection");
             serverTransport = transport;
             serverTransport.setTransportListener(new TransportListener() {
                 public void onCommand(Object command) {
@@ -127,7 +134,7 @@
 
                 public void onException(IOException error) {
                     if (!ignoreClientError.get()) {
-                        log.info("Server transport error:");
+                        LOG.info("Server transport error:");
                         error.printStackTrace();
                         serverErrorCount.incrementAndGet();
                     }
@@ -166,7 +173,7 @@
 
             public void onException(IOException error) {
                 if (!ignoreClientError.get()) {
-                    log.info("Client transport error:");
+                    LOG.info("Client transport error:");
                     error.printStackTrace();
                     clientErrorCount.incrementAndGet();
                 }
@@ -222,7 +229,7 @@
         addCombinationValues("serverRunOnCommand", new Object[] {new Runnable() {
             public void run() {
                 try {
-                    log.info("Sleeping");
+                    LOG.info("Sleeping");
                     Thread.sleep(4000);
                 } catch (InterruptedException e) {
                 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java Thu Aug  9 09:37:49 2007
@@ -35,7 +35,7 @@
         System.setProperty("javax.net.ssl.keyStoreType", "jks");        
         //System.setProperty("javax.net.debug", "ssl,handshake,data,trustmanager");        
 
-        MAX_WAIT = 10000;
+        maxWait = 10000;
         super.setUp();
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java Thu Aug  9 09:37:49 2007
@@ -28,7 +28,7 @@
 import org.apache.commons.logging.LogFactory;
 
 public class SslTransportFactoryTest extends TestCase {
-    private static final transient Log log = LogFactory.getLog(SslTransportFactoryTest.class);
+    private static final Log LOG = LogFactory.getLog(SslTransportFactoryTest.class);
 
     private SslTransportFactory factory;
     private boolean verbose;
@@ -111,11 +111,11 @@
             }
 
             if (verbose) {
-                log.info("");
-                log.info("Iteration: " + i);
-                log.info("Map settings: " + options);
+                LOG.info("");
+                LOG.info("Iteration: " + i);
+                LOG.info("Map settings: " + options);
                 for (int x = 0; x < optionSettings.length; x++) {
-                    log.info("optionSetting[" + x + "] = " + optionSettings[x]);
+                    LOG.info("optionSetting[" + x + "] = " + optionSettings[x]);
                 }
             }
 
@@ -129,7 +129,7 @@
             }
 
             if (socketStub.getWantClientAuthStatus() != optionSettings[2]) {
-                log.info("sheiite");
+                LOG.info("sheiite");
             }
 
             assertEquals("wantClientAuth was not properly set for iteration: " + i, optionSettings[0],

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java Thu Aug  9 09:37:49 2007
@@ -45,10 +45,11 @@
     }
 
     public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException {
-        if (this.isVerified)
+        if (this.isVerified) {
             return new X509Certificate[] {this.cert};
-        else
+        } else {
             throw new SSLPeerUnverifiedException("Socket is unverified.");
+        }
     }
 
     // --- Stubbed methods ---

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java Thu Aug  9 09:37:49 2007
@@ -26,7 +26,7 @@
     }
 
     protected void setUp() throws Exception {
-        MAX_WAIT = 2000;
+        maxWait = 2000;
         super.setUp();
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -32,8 +32,11 @@
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.transport.TransportServer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class WireformatNegociationTest extends CombinationTestSupport {
+    private static final Log LOG = LogFactory.getLog(WireformatNegociationTest.class);
 
     private TransportServer server;
     private Transport clientTransport;
@@ -66,7 +69,7 @@
 
             public void onException(IOException error) {
                 if (!ignoreAsycError.get()) {
-                    log.info("Client transport error: ", error);
+                    LOG.info("Client transport error: ", error);
                     asyncError.set(error);
                     negociationCounter.countDown();
                 }
@@ -91,7 +94,7 @@
         server.setAcceptListener(new TransportAcceptListener() {
             public void onAccept(Transport transport) {
                 try {
-                    log.info("[" + getName() + "] Server Accepted a Connection");
+                    LOG.info("[" + getName() + "] Server Accepted a Connection");
                     serverTransport = transport;
                     serverTransport.setTransportListener(new TransportListener() {
                         public void onCommand(Object command) {
@@ -103,7 +106,7 @@
 
                         public void onException(IOException error) {
                             if (!ignoreAsycError.get()) {
-                                log.info("Server transport error: ", error);
+                                LOG.info("Server transport error: ", error);
                                 asyncError.set(error);
                                 negociationCounter.countDown();
                             }
@@ -131,12 +134,15 @@
     protected void tearDown() throws Exception {
         ignoreAsycError.set(true);
         try {
-            if (clientTransport != null)
+            if (clientTransport != null) {
                 clientTransport.stop();
-            if (serverTransport != null)
+            }
+            if (serverTransport != null) {
                 serverTransport.stop();
-            if (server != null)
+            }
+            if (server != null) {
                 server.stop();
+            }
         } catch (Throwable e) {
             e.printStackTrace();
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
  */
 public abstract class UdpTestSupport extends TestCase implements TransportListener {
 
-    protected static final Log log = LogFactory.getLog(UdpTestSupport.class);
+    private static final Log LOG = LogFactory.getLog(UdpTestSupport.class);
 
     protected Transport producer;
     protected Transport consumer;
@@ -62,7 +62,7 @@
         expected.setPrefetchSize(3456);
 
         try {
-            log.info("About to send: " + expected);
+            LOG.info("About to send: " + expected);
             producer.oneway(expected);
 
             Command received = assertCommandReceived();
@@ -72,7 +72,7 @@
             assertEquals("isExclusive", expected.isExclusive(), actual.isExclusive());
             assertEquals("getPrefetchSize", expected.getPrefetchSize(), actual.getPrefetchSize());
         } catch (Exception e) {
-            log.info("Caught: " + e);
+            LOG.info("Caught: " + e);
             e.printStackTrace();
             fail("Failed to send to transport: " + e);
         }
@@ -99,7 +99,7 @@
         expected.setDestination(destination);
 
         try {
-            log.info("About to send message of type: " + expected.getClass());
+            LOG.info("About to send message of type: " + expected.getClass());
             producer.oneway(expected);
 
             // lets send a dummy command to ensure things don't block if we
@@ -116,9 +116,9 @@
             assertEquals("getDestination", expected.getDestination(), actual.getDestination());
             assertEquals("getText", expected.getText(), actual.getText());
 
-            log.info("Received text message with: " + actual.getText().length() + " character(s)");
+            LOG.info("Received text message with: " + actual.getText().length() + " character(s)");
         } catch (Exception e) {
-            log.info("Caught: " + e);
+            LOG.info("Caught: " + e);
             e.printStackTrace();
             fail("Failed to send to transport: " + e);
         }
@@ -162,11 +162,11 @@
         producer = createProducer();
         producer.setTransportListener(new TransportListener() {
             public void onCommand(Object command) {
-                log.info("Producer received: " + command);
+                LOG.info("Producer received: " + command);
             }
 
             public void onException(IOException error) {
-                log.info("Producer exception: " + error);
+                LOG.info("Producer exception: " + error);
                 error.printStackTrace();
             }
 
@@ -195,7 +195,7 @@
     public void onCommand(Object o) {
         final Command command = (Command)o;
         if (command instanceof WireFormatInfo) {
-            log.info("Got WireFormatInfo: " + command);
+            LOG.info("Got WireFormatInfo: " + command);
         } else {
             if (command.isResponseRequired()) {
                 // lets send a response back...
@@ -203,16 +203,16 @@
 
             }
             if (large) {
-                log.info("### Received command: " + command.getClass() + " with id: " + command.getCommandId());
+                LOG.info("### Received command: " + command.getClass() + " with id: " + command.getCommandId());
             } else {
-                log.info("### Received command: " + command);
+                LOG.info("### Received command: " + command);
             }
 
             synchronized (lock) {
                 if (receivedCommand == null) {
                     receivedCommand = command;
                 } else {
-                    log.info("Ignoring superfluous command: " + command);
+                    LOG.info("Ignoring superfluous command: " + command);
                 }
                 lock.notifyAll();
             }
@@ -225,23 +225,23 @@
         try {
             consumer.oneway(response);
         } catch (IOException e) {
-            log.info("Caught: " + e);
+            LOG.info("Caught: " + e);
             e.printStackTrace();
             throw new RuntimeException(e);
         }
     }
 
     public void onException(IOException error) {
-        log.info("### Received error: " + error);
+        LOG.info("### Received error: " + error);
         error.printStackTrace();
     }
 
     public void transportInterupted() {
-        log.info("### Transport interrupted");
+        LOG.info("### Transport interrupted");
     }
 
     public void transportResumed() {
-        log.info("### Transport resumed");
+        LOG.info("### Transport resumed");
     }
 
     protected Command assertCommandReceived() throws InterruptedException {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java Thu Aug  9 09:37:49 2007
@@ -31,13 +31,13 @@
  */
 public class UdpTransportTest extends UdpTestSupport {
 
-    protected static final Log log = LogFactory.getLog(UdpTransportTest.class);
+    private static final Log LOG = LogFactory.getLog(UdpTransportTest.class);
 
     protected int consumerPort = 9123;
     protected String producerURI = "udp://localhost:" + consumerPort;
 
     protected Transport createProducer() throws Exception {
-        log.info("Producer using URI: " + producerURI);
+        LOG.info("Producer using URI: " + producerURI);
         
         // we are not using the TransportFactory as this assumes that
         // UDP transports talk to a server using a WireFormat Negotiation step
@@ -50,7 +50,7 @@
     }
 
     protected Transport createConsumer() throws Exception {
-        log.info("Consumer on port: " + consumerPort);
+        LOG.info("Consumer on port: " + consumerPort);
         OpenWireFormat wireFormat = createWireFormat();
         UdpTransport transport = new UdpTransport(wireFormat, consumerPort);
         transport.setSequenceGenerator(new IntSequenceGenerator());

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java Thu Aug  9 09:37:49 2007
@@ -23,12 +23,16 @@
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.transport.TransportServer;
+import org.apache.activemq.transport.tcp.WireformatNegociationTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 
  * @version $Revision$
  */
 public class UdpTransportUsingServerTest extends UdpTestSupport {
+    private static final Log LOG = LogFactory.getLog(UdpTransportUsingServerTest.class);
 
     protected int consumerPort = 9123;
     protected String producerURI = "udp://localhost:" + consumerPort;
@@ -38,16 +42,16 @@
         ConsumerInfo expected = new ConsumerInfo();
         expected.setSelector("Edam");
         expected.setResponseRequired(true);
-        log.info("About to send: " + expected);
+        LOG.info("About to send: " + expected);
         Response response = (Response) producer.request(expected, 2000);
 
-        log.info("Received: " + response);
+        LOG.info("Received: " + response);
         assertNotNull("Received a response", response);
         assertTrue("Should not be an exception", !response.isException());
     }
 
     protected Transport createProducer() throws Exception {
-        log.info("Producer using URI: " + producerURI);
+        LOG.info("Producer using URI: " + producerURI);
         URI uri = new URI(producerURI);
         return TransportFactory.connect(uri);
     }

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=564271&r1=564270&r2=564271
==============================================================================
--- 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 Thu Aug  9 09:37:49 2007
@@ -1,12 +1,12 @@
 /**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -50,7 +50,7 @@
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
 
 public class AMQDeadlockTestW4Brokers extends TestCase {
-    private static final transient Log log = LogFactory.getLog(AMQDeadlockTestW4Brokers.class);
+    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";
@@ -67,7 +67,7 @@
     private static final String QUEUE1_NAME = "test.queue.1";
     private static final int MAX_CONSUMERS = 5;
     private static final int NUM_MESSAGE_TO_SEND = 10000;
-    private static final CountDownLatch latch = new CountDownLatch(MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
+    private static final CountDownLatch LATCH = new CountDownLatch(MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
 
     @Override
     public void setUp() throws Exception {
@@ -143,8 +143,8 @@
                 executor.submit(task[i]);
             }
 
-            latch.await(15, TimeUnit.SECONDS);
-            assertTrue(latch.getCount() == MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
+            LATCH.await(15, TimeUnit.SECONDS);
+            assertTrue(LATCH.getCount() == MAX_CONSUMERS * NUM_MESSAGE_TO_SEND);
         } catch (Exception e) {
             e.printStackTrace();
         } finally {
@@ -249,11 +249,11 @@
                  */
                 int value = count.incrementAndGet();
                 if (value % 1000 == 0) {
-                    log.info("Consumed message: " + value);
+                    LOG.info("Consumed message: " + value);
                 }
 
                 Thread.sleep(waitTime);
-                latch.countDown();
+                LATCH.countDown();
                 /*
                  * } catch (JMSException e) { e.printStackTrace();
                  */
@@ -309,7 +309,7 @@
                     // Thread.sleep(1000);
                 }
             } catch (final Throwable e) {
-                log.error("Producer 1 is exiting", e);
+                LOG.error("Producer 1 is exiting", e);
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/AMQFailoverIssue.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.usecases;
 
 import java.net.URI;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java Thu Aug  9 09:37:49 2007
@@ -21,11 +21,15 @@
 
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
+import org.apache.activemq.transport.udp.UdpTransportUsingServerTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1.1.1 $
  */
 public class CompositeConsumeTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
+    private static final Log LOG = LogFactory.getLog(CompositeConsumeTest.class);
 
     public void testSendReceive() throws Exception {
         messages.clear();
@@ -37,7 +41,7 @@
             Message message = session.createTextMessage(data[i]);
 
             if (verbose) {
-                log.info("About to send a message: " + message + " with text: " + data[i]);
+                LOG.info("About to send a message: " + message + " with text: " + data[i]);
             }
 
             producer.send(destinations[destIdx], message);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java Thu Aug  9 09:37:49 2007
@@ -29,11 +29,15 @@
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.test.JmsSendReceiveTestSupport;
+import org.apache.activemq.test.retroactive.RetroactiveConsumerTestWithSimpleMessageListTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1.1.1 $
  */
 public class CompositePublishTest extends JmsSendReceiveTestSupport {
+    private static final Log LOG = LogFactory.getLog(CompositePublishTest.class);
 
     protected Connection sendConnection;
     protected Connection receiveConnection;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java Thu Aug  9 09:37:49 2007
@@ -23,12 +23,15 @@
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 import org.apache.activemq.EmbeddedBrokerAndConnectionTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 
  * @version $Revision: 1.1 $
  */
 public class CreateLotsOfTemporaryQueuesTest extends EmbeddedBrokerAndConnectionTestSupport {
+    private static final Log LOG = LogFactory.getLog(CreateLotsOfTemporaryQueuesTest.class);
 
     private static int numberToCreate = 500;
     private static long sleep = 20;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java Thu Aug  9 09:37:49 2007
@@ -63,9 +63,9 @@
     }
 
     public void testTemporaryQueueConsumer() throws Exception {
-        final int NUMBER = 20;
+        final int number = 20;
         final AtomicInteger count = new AtomicInteger(0);
-        for (int i = 0; i < NUMBER; i++) {
+        for (int i = 0; i < number; i++) {
             Thread thread = new Thread(new Runnable() {
                 public void run() {
                     try {
@@ -75,7 +75,7 @@
                         QueueReceiver consumer = session.createReceiver(queue);
                         connection.start();
 
-                        if (count.incrementAndGet() >= NUMBER) {
+                        if (count.incrementAndGet() >= number) {
                             synchronized (count) {
                                 count.notify();
                             }
@@ -91,7 +91,7 @@
         synchronized (count) {
             long waitTime = maxWaitTime;
             long start = System.currentTimeMillis();
-            while (count.get() < NUMBER) {
+            while (count.get() < number) {
                 if (waitTime <= 0) {
                     break;
                 } else {
@@ -100,7 +100,7 @@
                 }
             }
         }
-        assertTrue("Unexpected count: " + count, count.get() == NUMBER);
+        assertTrue("Unexpected count: " + count, count.get() == number);
     }
 
     protected QueueConnection createConnection() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java Thu Aug  9 09:37:49 2007
@@ -29,12 +29,15 @@
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.test.TestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1.1.1 $
  */
 public class DurableConsumerCloseAndReconnectTest extends TestSupport {
     protected static final long RECEIVE_TIMEOUT = 5000L;
+    private static final Log LOG = LogFactory.getLog(DurableConsumerCloseAndReconnectTest.class);
 
     private Connection connection;
     private Session session;
@@ -81,7 +84,7 @@
 
         closeConsumer();
 
-        log.info("Now lets create the consumer again and because we didn't ack, we should get it again");
+        LOG.info("Now lets create the consumer again and because we didn't ack, we should get it again");
         makeConsumer();
 
         message = consumer.receive(RECEIVE_TIMEOUT);
@@ -90,7 +93,7 @@
 
         closeConsumer();
 
-        log.info("Now lets create the consumer again and because we didn't ack, we should get it again");
+        LOG.info("Now lets create the consumer again and because we didn't ack, we should get it again");
         makeConsumer();
 
         message = consumer.receive(2000);
@@ -98,7 +101,7 @@
 
         closeConsumer();
 
-        log.info("Lets publish one more message now");
+        LOG.info("Lets publish one more message now");
         publish();
 
         makeConsumer();
@@ -154,7 +157,7 @@
     protected void makeConsumer() throws Exception {
         String durableName = getName();
         String clientID = getSubject();
-        log.info("Creating a durable subscribe for clientID: " + clientID + " and durable name: " + durableName);
+        LOG.info("Creating a durable subscribe for clientID: " + clientID + " and durable name: " + durableName);
         createSession(clientID);
         consumer = createConsumer(durableName);
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java Thu Aug  9 09:37:49 2007
@@ -36,7 +36,7 @@
 /**
  * @version $Revision: 1.1.1.1 $
  */
-abstract public class DurableSubscriptionTestSupport extends TestSupport {
+public abstract class DurableSubscriptionTestSupport extends TestSupport {
 
     private Connection connection;
     private Session session;
@@ -101,15 +101,17 @@
     }
 
     private void destroyBroker() throws Exception {
-        if (connection != null)
+        if (connection != null) {
             connection.close();
-        if (broker != null)
+        }
+        if (broker != null) {
             broker.stop();
+        }
     }
 
-    abstract protected PersistenceAdapter createPersistenceAdapter() throws Exception;
+    protected abstract PersistenceAdapter createPersistenceAdapter() throws Exception;
 
-    public void XtestUnsubscribeSubscription() throws Exception {
+    public void xtestUnsubscribeSubscription() throws Exception {
         session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
         Topic topic = session.createTopic("TestTopic");
         consumer = session.createDurableSubscriber(topic, "sub1");
@@ -142,7 +144,7 @@
         assertTextMessageEquals("Msg:3", consumer.receive(5000));
     }
 
-    public void XtestInactiveDurableSubscriptionTwoConnections() throws Exception {
+    public void xtestInactiveDurableSubscriptionTwoConnections() throws Exception {
         session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
         Topic topic = session.createTopic("TestTopic");
         consumer = session.createDurableSubscriber(topic, "sub1");
@@ -173,7 +175,7 @@
         assertTextMessageEquals("Msg:2", consumer.receive(5000));
     }
 
-    public void XtestInactiveDurableSubscriptionBrokerRestart() throws Exception {
+    public void xtestInactiveDurableSubscriptionBrokerRestart() throws Exception {
         session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
         Topic topic = session.createTopic("TestTopic");
         consumer = session.createDurableSubscriber(topic, "sub1");
@@ -239,7 +241,7 @@
         assertNull(consumer.receive(5000));
     }
 
-    public void XtestInactiveDurableSubscriptionOneConnection() throws Exception {
+    public void xtestInactiveDurableSubscriptionOneConnection() throws Exception {
         session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
         Topic topic = session.createTopic("TestTopic");
         consumer = session.createDurableSubscriber(topic, "sub1");
@@ -264,7 +266,7 @@
         assertTextMessageEquals("Msg:2", consumer.receive(5000));
     }
 
-    public void XtestSelectorChange() throws Exception {
+    public void xtestSelectorChange() throws Exception {
         session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
         Topic topic = session.createTopic("TestTopic");
         consumer = session.createDurableSubscriber(topic, "sub1", "color='red'", false);
@@ -299,7 +301,7 @@
         assertTextMessageEquals("Msg:4", consumer.receive(5000));
     }
 
-    public void XtestDurableSubWorksInNewSession() throws JMSException {
+    public void xtestDurableSubWorksInNewSession() throws JMSException {
 
         // Create the consumer.
         connection.start();
@@ -326,7 +328,7 @@
 
     }
 
-    public void XtestDurableSubWorksInNewConnection() throws Exception {
+    public void xtestDurableSubWorksInNewConnection() throws Exception {
 
         // Create the consumer.
         connection.start();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/KahaDurableSubscriptionTest.java Thu Aug  9 09:37:49 2007
@@ -1,17 +1,19 @@
 /**
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
- * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
- * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
- * License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.usecases;
 
 import java.io.File;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
             }
         }
 
-        MAX_SETUP_TIME = 5000;
+        maxSetupTime = 5000;
     }
 
     protected void bridgeBrokers(BrokerService localBroker, BrokerService remoteBroker) throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/NewConsumerCreatesDestinationTest.java Thu Aug  9 09:37:49 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -32,7 +32,7 @@
  * @version $Revision: $
  */
 public class NewConsumerCreatesDestinationTest extends EmbeddedBrokerAndConnectionTestSupport {
-    private static final transient Log log = LogFactory.getLog(NewConsumerCreatesDestinationTest.class);
+    private static final Log LOG = LogFactory.getLog(NewConsumerCreatesDestinationTest.class);
 
     private ActiveMQQueue wildcard;
     
@@ -42,8 +42,8 @@
         String wildcardText = "org.*" + getDestinationString().substring("org.apache".length());
         wildcard = new ActiveMQQueue(wildcardText);
 
-        log.info("Using wildcard: " + wildcard);
-        log.info("on destination: " + destination);
+        LOG.info("Using wildcard: " + wildcard);
+        LOG.info("on destination: " + destination);
         
         assertDestinationCreated(destination, false);
         assertDestinationCreated(wildcard, false);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java Thu Aug  9 09:37:49 2007
@@ -53,7 +53,7 @@
     private List messages = createConcurrentList();
     private final Object lock = new Object();
     private String[] data;
-    private String DATAFILE_ROOT = IOHelper.getDefaultDataDirectory();
+    private String dataFileRoot = IOHelper.getDefaultDataDirectory();
     private int messageCount = 3;
     private String url = "vm://localhost";
 
@@ -63,7 +63,7 @@
     // private String url = "tcp://localhost:61616";
 
     protected void setUp() throws Exception {
-        File dataFile = new File(DATAFILE_ROOT);
+        File dataFile = new File(dataFileRoot);
         recursiveDelete(dataFile);
         try {
             factory = new ActiveMQConnectionFactory(url);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java Thu Aug  9 09:37:49 2007
@@ -32,8 +32,8 @@
  * @version $Revision: 1.2 $
  */
 public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest {
-    private static final transient Log log = LogFactory.getLog(PublishOnQueueConsumedMessageUsingActivemqXMLTest.class);
     protected static final String JOURNAL_ROOT = "../data/";
+    private static final transient Log LOG = LogFactory.getLog(PublishOnQueueConsumedMessageUsingActivemqXMLTest.class);
     BrokerService broker;
 
     /**
@@ -55,9 +55,9 @@
         File journalFile = new File(JOURNAL_ROOT);
         recursiveDelete(journalFile);
         // Create broker from resource
-        log.info("Creating broker... ");
+        LOG.info("Creating broker... ");
         broker = createBroker("org/apache/activemq/usecases/activemq.xml");
-        log.info("Success");
+        LOG.info("Success");
         super.setUp();
     }
 
@@ -66,11 +66,11 @@
     * @see junit.framework.TestCase#tearDown()
     */
     protected void tearDown() throws Exception {
-        log.info("Closing Broker");
+        LOG.info("Closing Broker");
         if (broker != null) {
             broker.stop();
         }
-        log.info("Broker closed...");
+        LOG.info("Broker closed...");
     }
 
     /*

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java Thu Aug  9 09:37:49 2007
@@ -22,11 +22,16 @@
 import javax.jms.MessageProducer;
 
 import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1.1.1 $
  */
 public class PublishOnTopicConsumedMessageTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
+
+    private static final Log LOG = LogFactory.getLog(PublishOnTopicConsumedMessageTest.class);
+
     private MessageProducer replyProducer;
 
     public synchronized void onMessage(Message message) {
@@ -39,7 +44,7 @@
             // log.info("Sending reply: " + message);
             super.onMessage(message);
         } catch (JMSException e) {
-            log.info("Failed to send message: " + e);
+            LOG.info("Failed to send message: " + e);
             e.printStackTrace();
         }
     }
@@ -56,7 +61,7 @@
         }
 
         replyProducer = receiveSession.createProducer(replyDestination);
-        log.info("Created replyProducer: " + replyProducer);
+        LOG.info("Created replyProducer: " + replyProducer);
 
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java Thu Aug  9 09:37:49 2007
@@ -32,8 +32,9 @@
  * @version $Revision: 1.2 $
  */
 public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOnTopicConsumedMessageTest {
-    private static final transient Log log = LogFactory.getLog(PublishOnTopicConsumerMessageUsingActivemqXMLTest.class);
     protected static final String JOURNAL_ROOT = "../data/";
+    private static final transient Log LOG = LogFactory.getLog(PublishOnTopicConsumerMessageUsingActivemqXMLTest.class);
+
     BrokerService broker;
 
     /**
@@ -55,9 +56,9 @@
         File journalFile = new File(JOURNAL_ROOT);
         recursiveDelete(journalFile);
         // Create broker from resource
-        log.info("Creating broker... ");
+        LOG.info("Creating broker... ");
         broker = createBroker("org/apache/activemq/usecases/activemq.xml");
-        log.info("Success");
+        LOG.info("Success");
         super.setUp();
     }
 
@@ -66,11 +67,11 @@
     * @see junit.framework.TestCase#tearDown()
     */
     protected void tearDown() throws Exception {
-        log.info("Closing Broker");
+        LOG.info("Closing Broker");
         if (broker != null) {
             broker.stop();
         }
-        log.info("Broker closed...");
+        LOG.info("Broker closed...");
     }
 
     /*

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java Thu Aug  9 09:37:49 2007
@@ -42,7 +42,7 @@
 
 public class QueueDuplicatesTest extends TestCase {
 
-    private static final Log log = LogFactory.getLog(QueueDuplicatesTest.class);
+    private static final Log LOG = LogFactory.getLog(QueueDuplicatesTest.class);
 
     private static DateFormat formatter = new SimpleDateFormat("HH:mm:ss SSS");
     private String brokerUrl;
@@ -133,7 +133,7 @@
                     String txt = "Text Message: " + i;
                     TextMessage msg = session.createTextMessage(txt);
                     producer.send(msg);
-                    log.info(formatter.format(new Date()) + " Sent ==> " + msg + " to " + subject);
+                    LOG.info(formatter.format(new Date()) + " Sent ==> " + msg + " to " + subject);
                     Thread.sleep(1000);
                 }
                 session.close();
@@ -147,7 +147,7 @@
         private Map msgs = new HashMap();
 
         public void onMessage(Message message) {
-            log.info(formatter.format(new Date()) + " SimpleConsumer Message Received: " + message);
+            LOG.info(formatter.format(new Date()) + " SimpleConsumer Message Received: " + message);
             try {
                 String id = message.getJMSMessageID();
                 assertNull("Message is duplicate: " + id, msgs.get(id));

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
  */
 public final class QueueRepeaterTest extends TestCase {
 
-    private static final Log log = LogFactory.getLog(QueueRepeaterTest.class);
+    private static final Log LOG = LogFactory.getLog(QueueRepeaterTest.class);
 
     private volatile String receivedText;
 
@@ -74,18 +74,18 @@
                     receivedText = tm.getText();
                     latch.countDown();
 
-                    log.info("consumer received message :" + receivedText);
+                    LOG.info("consumer received message :" + receivedText);
                     consumerSession.commit();
-                    log.info("committed transaction");
+                    LOG.info("committed transaction");
                 } catch (JMSException e) {
                     try {
                         consumerSession.rollback();
-                        log.info("rolled back transaction");
+                        LOG.info("rolled back transaction");
                     } catch (JMSException e1) {
-                        log.info(e1);
+                        LOG.info(e1);
                         e1.printStackTrace();
                     }
-                    log.info(e);
+                    LOG.info(e);
                     e.printStackTrace();
                 }
             }
@@ -98,15 +98,15 @@
             tm = producerSession.createTextMessage();
             tm.setText("Hello, " + new Date());
             producer.send(tm);
-            log.info("producer sent message :" + tm.getText());
+            LOG.info("producer sent message :" + tm.getText());
         } catch (JMSException e) {
             e.printStackTrace();
         }
 
-        log.info("Waiting for latch");
+        LOG.info("Waiting for latch");
         latch.await();
 
-        log.info("test completed, destination=" + receivedText);
+        LOG.info("test completed, destination=" + receivedText);
     }
 
     protected void tearDown() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java Thu Aug  9 09:37:49 2007
@@ -1,9 +1,10 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -34,7 +35,7 @@
 public class StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest extends TestCase {
 
     public static interface Task {
-        public void execute() throws Exception;
+        void execute() throws Exception;
     }
 
     public void setUp() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/SubscribeClosePublishThenConsumeTest.java Thu Aug  9 09:37:49 2007
@@ -27,12 +27,15 @@
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.test.TestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @author Paul Smith
  * @version $Revision: 1.1.1.1 $
  */
 public class SubscribeClosePublishThenConsumeTest extends TestSupport {
+    private static final Log LOG = LogFactory.getLog(SubscribeClosePublishThenConsumeTest.class);
 
     public void testDurableTopic() throws Exception {
         ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://locahost");
@@ -92,13 +95,13 @@
         subscriber = session.createDurableSubscriber(topic, subscriberName);
         connection.start();
 
-        log.info("Started connection - now about to try receive the textMessage");
+        LOG.info("Started connection - now about to try receive the textMessage");
 
         long time = System.currentTimeMillis();
         Message message = subscriber.receive(15000L);
         long elapsed = System.currentTimeMillis() - time;
 
-        log.info("Waited for: " + elapsed + " millis");
+        LOG.info("Waited for: " + elapsed + " millis");
 
         assertNotNull("Should have received the message we published by now", message);
         assertTrue("should be text textMessage", message instanceof TextMessage);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TestSupport.java Thu Aug  9 09:37:49 2007
@@ -89,8 +89,9 @@
      */
     protected void assertTextMessageEqual(String message, TextMessage m1, TextMessage m2) throws JMSException {
         assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-        if (m1 == null)
+        if (m1 == null) {
             return;
+        }
         assertEquals(message, m1.getText(), m2.getText());
     }
 
@@ -105,8 +106,9 @@
      */
     protected void assertEquals(String message, Message m1, Message m2) throws JMSException {
         assertFalse(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1 == null ^ m2 == null);
-        if (m1 == null)
+        if (m1 == null) {
             return;
+        }
         assertTrue(message + ": expected {" + m1 + "}, but was {" + m2 + "}", m1.getClass() == m2.getClass());
         if (m1 instanceof TextMessage) {
             assertTextMessageEqual(message, (TextMessage)m1, (TextMessage)m2);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java Thu Aug  9 09:37:49 2007
@@ -33,7 +33,7 @@
     /**
      * BrokerA -> BrokerB -> BrokerC
      */
-    public void test_AB_BC_BrokerNetwork() throws Exception {
+    public void testABandBCbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerA", "BrokerB");
         bridgeBrokers("BrokerB", "BrokerC");
@@ -60,7 +60,7 @@
     /**
      * BrokerA <- BrokerB -> BrokerC
      */
-    public void test_BA_BC_BrokerNetwork() throws Exception {
+    public void testBAandBCbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerB", "BrokerA");
         bridgeBrokers("BrokerB", "BrokerC");
@@ -91,7 +91,7 @@
     /**
      * BrokerA -> BrokerB <- BrokerC
      */
-    public void test_AB_CB_BrokerNetwork() throws Exception {
+    public void testABandCBbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerA", "BrokerB");
         bridgeBrokers("BrokerC", "BrokerB");

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkUsingTcpTest.java Thu Aug  9 09:37:49 2007
@@ -56,7 +56,7 @@
             throw new Exception("Remote broker or local broker has no registered connectors.");
         }
 
-        MAX_SETUP_TIME = 2000;
+        maxSetupTime = 2000;
     }
 
     public void setUp() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkTest.java Thu Aug  9 09:37:49 2007
@@ -33,7 +33,7 @@
     /**
      * BrokerA -> BrokerB -> BrokerC
      */
-    public void test_AB_BC_BrokerNetwork() throws Exception {
+    public void testABandBCbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerA", "BrokerB");
         bridgeBrokers("BrokerB", "BrokerC");
@@ -72,7 +72,7 @@
     /**
      * BrokerA <- BrokerB -> BrokerC
      */
-    public void test_BA_BC_BrokerNetwork() throws Exception {
+    public void testBAandBCbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerB", "BrokerA");
         bridgeBrokers("BrokerB", "BrokerC");
@@ -111,7 +111,7 @@
     /**
      * BrokerA -> BrokerB <- BrokerC
      */
-    public void test_AB_CB_BrokerNetwork() throws Exception {
+    public void testABandCBbrokerNetwork() throws Exception {
         // Setup broker networks
         bridgeBrokers("BrokerA", "BrokerB");
         bridgeBrokers("BrokerC", "BrokerB");

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ThreeBrokerTopicNetworkUsingTcpTest.java Thu Aug  9 09:37:49 2007
@@ -56,7 +56,7 @@
             throw new Exception("Remote broker or local broker has no registered connectors.");
         }
 
-        MAX_SETUP_TIME = 2000;
+        maxSetupTime = 2000;
     }
 
     public void setUp() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java Thu Aug  9 09:37:49 2007
@@ -146,7 +146,7 @@
      * @throws Exception
      */
 
-    public void XtestTransactionRollbackOnSessionClose() throws Exception {
+    public void xtestTransactionRollbackOnSessionClose() throws Exception {
         Destination destination = createDestination(getClass().getName());
         Connection connection = createConnection();
         connection.setClientID(idGen.generateId());

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java Thu Aug  9 09:37:49 2007
@@ -43,7 +43,7 @@
  * @version $Revision: 1.1 $
  */
 public final class TransactionRollbackOrderTest extends TestCase {
-    private static final Log log = LogFactory.getLog(TransactionRollbackOrderTest.class);
+    private static final Log LOG = LogFactory.getLog(TransactionRollbackOrderTest.class);
 
     private volatile String receivedText;
 
@@ -55,7 +55,7 @@
     private MessageConsumer consumer;
     private Connection connection;
     private CountDownLatch latch = new CountDownLatch(1);
-    private int NUM_MESSAGES = 5;
+    private int numMessages = 5;
     private List msgSent = new ArrayList();
     private List msgCommitted = new ArrayList();
     private List msgRolledBack = new ArrayList();
@@ -89,29 +89,29 @@
                         msgRedelivered.add(receivedText);
                     }
 
-                    log.info("consumer received message: " + receivedText + (tm.getJMSRedelivered() ? " ** Redelivered **" : ""));
+                    LOG.info("consumer received message: " + receivedText + (tm.getJMSRedelivered() ? " ** Redelivered **" : ""));
                     if (msgCount == 3) {
                         msgRolledBack.add(receivedText);
                         consumerSession.rollback();
-                        log.info("[msg: " + receivedText + "] ** rolled back **");
+                        LOG.info("[msg: " + receivedText + "] ** rolled back **");
                     } else {
                         msgCommittedCount++;
                         msgCommitted.add(receivedText);
                         consumerSession.commit();
-                        log.info("[msg: " + receivedText + "] committed transaction ");
+                        LOG.info("[msg: " + receivedText + "] committed transaction ");
                     }
-                    if (msgCommittedCount == NUM_MESSAGES) {
+                    if (msgCommittedCount == numMessages) {
                         latch.countDown();
                     }
                 } catch (JMSException e) {
                     try {
                         consumerSession.rollback();
-                        log.info("rolled back transaction");
+                        LOG.info("rolled back transaction");
                     } catch (JMSException e1) {
-                        log.info(e1);
+                        LOG.info(e1);
                         e1.printStackTrace();
                     }
-                    log.info(e);
+                    LOG.info(e);
                     e.printStackTrace();
                 }
             }
@@ -120,30 +120,30 @@
 
         TextMessage tm = null;
         try {
-            for (int i = 1; i <= NUM_MESSAGES; i++) {
+            for (int i = 1; i <= numMessages; i++) {
                 tm = producerSession.createTextMessage();
                 tm.setText("Hello " + i);
                 msgSent.add(tm.getText());
                 producer.send(tm);
-                log.info("producer sent message: " + tm.getText());
+                LOG.info("producer sent message: " + tm.getText());
             }
         } catch (JMSException e) {
             e.printStackTrace();
         }
 
-        log.info("Waiting for latch");
+        LOG.info("Waiting for latch");
         latch.await();
 
         assertEquals(1, msgRolledBack.size());
         assertEquals(1, msgRedelivered.size());
 
-        log.info("msg RolledBack = " + msgRolledBack.get(0));
-        log.info("msg Redelivered = " + msgRedelivered.get(0));
+        LOG.info("msg RolledBack = " + msgRolledBack.get(0));
+        LOG.info("msg Redelivered = " + msgRedelivered.get(0));
 
         assertEquals(msgRolledBack.get(0), msgRedelivered.get(0));
 
-        assertEquals(NUM_MESSAGES, msgSent.size());
-        assertEquals(NUM_MESSAGES, msgCommitted.size());
+        assertEquals(numMessages, msgSent.size());
+        assertEquals(numMessages, msgCommitted.size());
 
         assertEquals(msgSent, msgCommitted);
 
@@ -151,7 +151,7 @@
 
     protected void tearDown() throws Exception {
         if (connection != null) {
-            log.info("Closing the connection");
+            LOG.info("Closing the connection");
             connection.close();
         }
         super.tearDown();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java Thu Aug  9 09:37:49 2007
@@ -41,7 +41,7 @@
  */
 public final class TransactionTest extends TestCase {
 
-    private static final Log log = LogFactory.getLog(TransactionTest.class);
+    private static final Log LOG = LogFactory.getLog(TransactionTest.class);
 
     private volatile String receivedText;
 
@@ -74,18 +74,18 @@
                     receivedText = tm.getText();
                     latch.countDown();
 
-                    log.info("consumer received message :" + receivedText);
+                    LOG.info("consumer received message :" + receivedText);
                     consumerSession.commit();
-                    log.info("committed transaction");
+                    LOG.info("committed transaction");
                 } catch (JMSException e) {
                     try {
                         consumerSession.rollback();
-                        log.info("rolled back transaction");
+                        LOG.info("rolled back transaction");
                     } catch (JMSException e1) {
-                        log.info(e1);
+                        LOG.info(e1);
                         e1.printStackTrace();
                     }
-                    log.info(e);
+                    LOG.info(e);
                     e.printStackTrace();
                 }
             }
@@ -98,15 +98,15 @@
             tm = producerSession.createTextMessage();
             tm.setText("Hello, " + new Date());
             producer.send(tm);
-            log.info("producer sent message :" + tm.getText());
+            LOG.info("producer sent message :" + tm.getText());
         } catch (JMSException e) {
             e.printStackTrace();
         }
 
-        log.info("Waiting for latch");
+        LOG.info("Waiting for latch");
         latch.await();
 
-        log.info("test completed, destination=" + receivedText);
+        LOG.info("test completed, destination=" + receivedText);
     }
 
     protected void tearDown() throws Exception {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java Thu Aug  9 09:37:49 2007
@@ -138,7 +138,7 @@
             throw new Exception("Remote broker or local broker has no registered connectors.");
         }
 
-        MAX_SETUP_TIME = 2000;
+        maxSetupTime = 2000;
     }
 
     public void setUp() throws Exception {

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=564271&r1=564270&r2=564271
==============================================================================
--- 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 Thu Aug  9 09:37:49 2007
@@ -27,6 +27,8 @@
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.ActiveMQPrefetchPolicy;
 import org.apache.activemq.JmsMultipleBrokersTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1.1.1 $
@@ -34,6 +36,8 @@
 public class TwoBrokerQueueClientsReconnectTest extends JmsMultipleBrokersTestSupport {
     protected static final int MESSAGE_COUNT = 100; // Best if a factor of 100
     protected static final int PREFETCH_COUNT = 1;
+    private static final Log LOG = LogFactory.getLog(TwoBrokerQueueClientsReconnectTest.class);
+
 
     protected int msgsClient1, msgsClient2;
     protected String broker1, broker2;
@@ -313,7 +317,7 @@
         for (i = 0; i < msgCount; i++) {
             msg = consumer.receive(1000);
             if (msg == null) {
-                log.error("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;
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveTest.java Thu Aug  9 09:37:49 2007
@@ -27,12 +27,15 @@
 import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.activemq.xbean.BrokerFactoryBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.core.io.ClassPathResource;
 
 /**
  * @version $Revision: 1.1.1.1 $
  */
 public class TwoBrokerTopicSendReceiveTest extends JmsTopicSendReceiveWithTwoConnectionsTest {
+    private static final Log LOG = LogFactory.getLog(TwoBrokerTopicSendReceiveTest.class);
 
     protected ActiveMQConnectionFactory sendFactory;
     protected ActiveMQConnectionFactory receiveFactory;
@@ -44,9 +47,9 @@
 
         // Give server enough time to setup,
         // so we don't lose messages when connection fails
-        log.info("Waiting for brokers Initialize.");
+        LOG.info("Waiting for brokers Initialize.");
         Thread.sleep(5000);
-        log.info("Brokers should be initialized by now.. starting test.");
+        LOG.info("Brokers should be initialized by now.. starting test.");
 
         super.setUp();
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java?view=diff&rev=564271&r1=564270&r2=564271
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/util/MarshallingSupportTest.java Thu Aug  9 09:37:49 2007
@@ -1,7 +1,19 @@
 /**
- * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.activemq.util;
 
 import java.util.Properties;



Mime
View raw message