You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2009/10/05 13:11:14 UTC

svn commit: r821755 [3/3] - in /qpid/branches/java-broker-0-10/qpid/java: ./ broker/ broker/bin/ broker/etc/ broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/exchange/ broker/src/main/java/org/apache/qpid/server/...

Modified: qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/test/java/org/apache/qpid/management/ui/ManagementConsoleTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/test/java/org/apache/qpid/management/ui/ManagementConsoleTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/test/java/org/apache/qpid/management/ui/ManagementConsoleTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/management/eclipse-plugin/src/test/java/org/apache/qpid/management/ui/ManagementConsoleTest.java Mon Oct  5 11:11:05 2009
@@ -58,7 +58,8 @@
     @Override
     protected void tearDown() throws Exception
     {
-        ApplicationRegistry.removeAll();
+        // Correctly Close the AR that we created above
+        ApplicationRegistry.remove();
     }
 
     /**

Modified: qpid/branches/java-broker-0-10/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/module.xml?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/module.xml (original)
+++ qpid/branches/java-broker-0-10/qpid/java/module.xml Mon Oct  5 11:11:05 2009
@@ -271,6 +271,7 @@
       <sysproperty key="broker.clean" value="${broker.clean}"/>
       <sysproperty key="broker.version" value="${broker.version}"/>
       <sysproperty key="broker.ready" value="${broker.ready}" />
+      <sysproperty key="broker.stopped" value="${broker.stopped}" />
       <sysproperty key="broker.config" value="${broker.config}" />
       <sysproperty key="test.output" value="${module.results}"/>
       <syspropertyset>

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/AMQQueueDeferredOrderingTest.java Mon Oct  5 11:11:05 2009
@@ -87,7 +87,6 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        TransportConnection.createVMBroker(1);
 
         _logger.info("Create Connection");
         con = getConnection();
@@ -135,7 +134,6 @@
         _logger.info("Closing connection");
         con.close();
 
-        TransportConnection.killAllVMBrokers();
         super.tearDown();
     }
 

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java Mon Oct  5 11:11:05 2009
@@ -23,6 +23,7 @@
 import junit.framework.TestCase;
 import org.apache.qpid.AMQDisconnectedException;
 import org.apache.qpid.AMQException;
+import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionURL;
 import org.apache.qpid.client.transport.TransportConnection;
@@ -39,12 +40,14 @@
 
     public void setUp() throws AMQVMBrokerCreationException
     {
-        TransportConnection.createVMBroker(1);
+        ApplicationRegistry.getInstance();
+        TransportConnection.createVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
     }
 
-    public void tearDown() throws AMQVMBrokerCreationException
+    public void tearDown()
     {
-        TransportConnection.killAllVMBrokers();
+        TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+        ApplicationRegistry.remove();
     }
 
     /**
@@ -61,7 +64,8 @@
         //note: The VM broker has no connect delay and the default 1 retry
         //        while the tcp:localhost broker has 3 retries with a 2s connect delay
         String connectionString = "amqp://guest:guest@/test?brokerlist=" +
-                                  "'vm://:1;tcp://localhost:5670?connectdelay='2000',retries='3''";
+                                  "'vm://:" + ApplicationRegistry.DEFAULT_INSTANCE +
+                                  ";tcp://localhost:5670?connectdelay='2000',retries='3''";
 
         AMQConnectionURL url = new AMQConnectionURL(connectionString);
 
@@ -72,7 +76,8 @@
 
             connection.setExceptionListener(this);
 
-            TransportConnection.killAllVMBrokers();
+            TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+            ApplicationRegistry.remove();
 
             _failoverComplete.await();
 
@@ -115,7 +120,8 @@
 
             connection.setExceptionListener(this);
 
-            TransportConnection.killAllVMBrokers();
+            TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+            ApplicationRegistry.remove();
 
             _failoverComplete.await();
 
@@ -160,7 +166,8 @@
         try
         {
             //Kill initial broker
-            TransportConnection.killAllVMBrokers();
+            TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+            ApplicationRegistry.remove();
 
             //Create a thread to start the broker asynchronously
             Thread brokerStart = new Thread(new Runnable()
@@ -172,7 +179,8 @@
                         //Wait before starting broker
                         // The wait should allow atleast 1 retries to fail before broker is ready
                         Thread.sleep(750);
-                        TransportConnection.createVMBroker(1);
+                        ApplicationRegistry.getInstance();
+                        TransportConnection.createVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
                     }
                     catch (Exception e)
                     {
@@ -206,7 +214,8 @@
             start = System.currentTimeMillis();
 
             //Kill connection
-            TransportConnection.killAllVMBrokers();                                    
+            TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+            ApplicationRegistry.remove();
 
             _failoverComplete.await();
 

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java Mon Oct  5 11:11:05 2009
@@ -20,13 +20,15 @@
  */
 package org.apache.qpid.server.logging;
 
+import org.apache.qpid.server.logging.subjects.AbstractTestLogSubject;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.util.LogMonitor;
 
 import java.io.IOException;
-import java.util.List;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.List;
 
 public class AbstractTestLogging extends QpidTestCase
 {
@@ -39,6 +41,13 @@
         _monitor = new LogMonitor(_outputFile);
     }
 
+    @Override
+    public void tearDown() throws Exception
+    {
+        _monitor.close();
+        super.tearDown();
+    }
+
     /**
      * assert that the requested log message has not occured
      *
@@ -53,10 +62,9 @@
                      _monitor.findMatches(log).size());
     }
 
-
     protected void validateMessageID(String id, String log)
     {
-        assertEquals("Incorrect message",id, getMessageID(log));
+        assertEquals("Incorrect message", id, getMessageID(log));
     }
 
     protected String getMessageID(String log)
@@ -123,6 +131,7 @@
      * The brackets '[ ]' are not included in the returned String.
      *
      * @param log The log message to process
+     *
      * @return the Subject string or the empty string ("") if the subject can't be identified.
      */
     protected String fromSubject(String log)
@@ -158,6 +167,7 @@
      * The brackets '[ ]' are not included in the returned String.
      *
      * @param log the Log Message
+     *
      * @return the Actor segment or "" if unable to locate '[ ]' section
      */
     protected String fromActor(String log)
@@ -175,6 +185,21 @@
     }
 
     /**
+     * Return the message String from the given message section
+     *
+     * @param log the Message Section
+     *
+     * @return the Message String.
+     */
+    protected String getMessageString(String log)
+    {
+        // Remove the Log ID from the returned String
+        int start = log.indexOf(":") + 1;
+
+        return log.substring(start).trim();
+    }
+
+    /**
      * Given our log message extract the connection ID:
      *
      * The log string will contain the connectionID identified by 'con:'
@@ -189,9 +214,10 @@
      * Integer then return -1.
      *
      * @param log the log String to process
+     *
      * @return the connection ID or -1.
      */
-    protected int extractConnectionID(String log)
+    protected int getConnectionID(String log)
     {
         int conIDStart = log.indexOf("con:") + 4;
         int conIDEnd = log.indexOf("(", conIDStart);
@@ -213,7 +239,9 @@
      * as we know it to be formatted.
      *
      * This starts with the string MESSAGE
+     *
      * @param rawLog the raw log
+     *
      * @return the log we are expecting to be printed without the log4j prefixes
      */
     protected String getLog(String rawLog)
@@ -223,40 +251,70 @@
     }
 
     /**
-       * Given a list of messages that have been pulled out of a log file
-       * Process the results splitting the log statements in to lists based on the
-       * actor's connection ID.
-       *
-       * So for each log entry extract the Connecition ID from the Actor of the log
-       *
-       * Then use that as a key to a HashMap storing the list of log messages for
-       * that connection.
-       *
-       * @param logMessages The list of mixed connection log messages
-       * @return Map indexed by connection id to a list of log messages just for that connection.
-       */
-      protected HashMap<Integer,List<String>> splitResultsOnConnectionID(List<String> logMessages)
-      {
-          HashMap<Integer,List<String>> connectionSplitList = new HashMap<Integer, List<String>>();
-
-          for (String log : logMessages)
-          {
-              // Get the connectionID from the Actor in the Message Log.
-              int cID = extractConnectionID(fromActor(getLog(log)));
-
-              List<String> connectionData = connectionSplitList.get(cID);
-
-              // Create the initial List if we don't have one already
-              if (connectionData == null)
-              {
-                  connectionData = new LinkedList<String>();
-                  connectionSplitList.put(cID, connectionData);
-              }
-
-              // Store the log
-              connectionData.add(log);
-          }
+     * Given a list of messages that have been pulled out of a log file
+     * Process the results splitting the log statements in to lists based on the
+     * actor's connection ID.
+     *
+     * So for each log entry extract the Connecition ID from the Actor of the log
+     *
+     * Then use that as a key to a HashMap storing the list of log messages for
+     * that connection.
+     *
+     * @param logMessages The list of mixed connection log messages
+     *
+     * @return Map indexed by connection id to a list of log messages just for that connection.
+     */
+    protected HashMap<Integer, List<String>> splitResultsOnConnectionID(List<String> logMessages)
+    {
+        HashMap<Integer, List<String>> connectionSplitList = new HashMap<Integer, List<String>>();
+
+        for (String log : logMessages)
+        {
+            // Get the connectionID from the Actor in the Message Log.
+            int cID = getConnectionID(fromActor(getLog(log)));
+
+            List<String> connectionData = connectionSplitList.get(cID);
+
+            // Create the initial List if we don't have one already
+            if (connectionData == null)
+            {
+                connectionData = new LinkedList<String>();
+                connectionSplitList.put(cID, connectionData);
+            }
+
+            // Store the log
+            connectionData.add(log);
+        }
+
+        return connectionSplitList;
+    }
+
+    /**
+     * Filter the give result set by the specficifed virtualhost.
+     * This is done using the getSlice to identify the virtualhost (vh) in the
+     * log message
+     *
+     * @param results         full list of logs
+     * @param virtualHostName the virtualhostName to filter on
+     *
+     * @return the list of messages only for that virtualhost
+     */
+    protected List<String> filterResultsByVirtualHost(List<String> results, String virtualHostName)
+    {
+        List<String> filteredResults = new LinkedList<String>();
+        Iterator<String> iterator = results.iterator();
+
+        while (iterator.hasNext())
+        {
+            String log = iterator.next();
+
+            if (AbstractTestLogSubject.getSlice("vh", log).equals(virtualHostName))
+            {
+                filteredResults.add(log);
+            }
+        }
+
+        return filteredResults;
+    }
 
-          return connectionSplitList;
-      }
 }

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java Mon Oct  5 11:11:05 2009
@@ -119,6 +119,8 @@
 
         List<String> results = _monitor.findMatches(CHANNEL_PREFIX);
 
+        assertTrue("No CHN messages logged", results.size() > 0);
+
         // The last channel message should be:
         //
         // INFO - MESSAGE [con:0(guest@anonymous(4205299)/test)/ch:1] [con:0(guest@anonymous(4205299)/test)/ch:1] CHN-1002 : Flow Off
@@ -128,7 +130,7 @@
         String log = getLog(results.get(resultSize - 1));
 
         validateMessageID("CHN-1002", log);
-        assertTrue("Message should be Flow Stopped", fromMessage(log).endsWith("Flow Stopped"));
+        assertEquals("Message should be Flow Stopped", "Flow Stopped", getMessageString(fromMessage(log)));
 
     }
 
@@ -171,6 +173,8 @@
 
         List<String> results = _monitor.findMatches(CHANNEL_PREFIX);
 
+        assertTrue("No CHN messages logged", results.size() > 0);
+
         // The last two channel messages should be:
         //
         // INFO - MESSAGE [con:0(guest@anonymous(4205299)/test)/ch:1] [con:0(guest@anonymous(4205299)/test)/ch:1] CHN-1002 : Flow On
@@ -181,7 +185,7 @@
         String log = getLog(results.get(resultSize - 1));
 
         validateMessageID("CHN-1002", log);
-        assertTrue("Message should be Flow Started", fromMessage(log).endsWith("Flow Started"));
+        assertEquals("Message should be Flow Started", "Flow Started", getMessageString(fromMessage(log)));
 
     }
 
@@ -218,6 +222,8 @@
 
         List<String> results = _monitor.findMatches(CHANNEL_PREFIX);
 
+        assertTrue("No CHN messages logged", results.size() > 0);
+
         // The last two channel messages should be:
         //
         // INFO - MESSAGE [con:0(guest@anonymous(4205299)/test)/ch:1] [con:0(guest@anonymous(4205299)/test)/ch:1] CHN-1002 : Flow On
@@ -228,7 +234,7 @@
         String log = getLog(results.get(resultSize - 1));
 
         validateMessageID("CHN-1003", log);
-        assertTrue("Message should be Close:" + fromMessage(log), fromMessage(log).endsWith("Close"));
+        assertEquals("Message should be Close", "Close",getMessageString(fromMessage(log)));
         assertEquals("Incorrect Channel ID closed.", 1, getChannelID(fromActor(log)));
         assertEquals("Incorrect Channel ID closed.", 1, getChannelID(fromSubject(log)));
     }
@@ -263,6 +269,8 @@
 
         List<String> results = _monitor.findMatches(CHANNEL_PREFIX);
 
+        assertTrue("No CHN messages logged", results.size() > 0);
+
         // The last two channel messages should be:
         //
         // INFO - MESSAGE [con:0(guest@anonymous(4205299)/test)/ch:1] [con:0(guest@anonymous(4205299)/test)/ch:1] CHN-1002 : Flow On
@@ -273,7 +281,7 @@
         String log = getLog(results.get(resultSize - 1));
 
         validateMessageID("CHN-1003", log);
-        assertTrue("Message should be Close:" + fromMessage(getLog(log)), fromMessage(log).endsWith("Close"));
+        assertEquals("Message should be Close", "Close",getMessageString(fromMessage(log)));
         assertEquals("Incorrect Channel ID closed.", 1, getChannelID(fromActor(log)));
         assertEquals("Incorrect Channel ID closed.", 1, getChannelID(fromSubject(log)));
     }

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java Mon Oct  5 11:11:05 2009
@@ -20,15 +20,10 @@
 */
 package org.apache.qpid.server.logging;
 
-import org.apache.qpid.test.unit.client.forwardall.Client;
-
 import javax.jms.Connection;
 import java.io.File;
 import java.util.List;
 import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.SortedSet;
-import java.util.Collections;
 import java.util.TreeSet;
 
 public class ConnectionLoggingTest extends AbstractTestLogging
@@ -71,6 +66,8 @@
 
         List<String> results = _monitor.findMatches(CONNECTION_PREFIX);
 
+        assertTrue("No CON messages logged", results.size() > 0);        
+
         // Validation
         // We should have at least three messages when running InVM but when running External
         // we will get 0-10 negotiation on con:0 whcih may close at some random point
@@ -174,12 +171,12 @@
         assertTrue("Message does not end with close:" + log, log.endsWith("Close"));
 
         // Extract connection ID to validate there is a CON-1001 messasge for it
-        int connectionID = extractConnectionID(log);
+        int connectionID = getConnectionID(log);
 
         //Previous log message should be the open
         log = getLog(results.get(resultsSize - 2));
         //  MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open : Client ID : clientid : Protocol Version : 0-9
         validateMessageID("CON-1001",log);
-        assertEquals("Connection IDs do not match", connectionID, extractConnectionID(fromActor(log)));
+        assertEquals("Connection IDs do not match", connectionID, getConnectionID(fromActor(log)));
     }
 }

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/QueueDepthWithSelectorTest.java Mon Oct  5 11:11:05 2009
@@ -25,6 +25,7 @@
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
+import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.client.AMQDestination;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.transport.TransportConnection;
@@ -88,6 +89,7 @@
 
         if (BROKER.startsWith("vm://"))
         {
+            ApplicationRegistry.getInstance(1);
             TransportConnection.createVMBroker(1);
         }
         InitialContextFactory factory = new PropertiesFileInitialContextFactory();
@@ -120,7 +122,8 @@
 
         if (BROKER.startsWith("vm://"))
         {
-            TransportConnection.killAllVMBrokers();
+            TransportConnection.killVMBroker(1);
+            ApplicationRegistry.remove(1);
         }
     }
 

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SubscriptionTestHelper.java Mon Oct  5 11:11:05 2009
@@ -21,6 +21,7 @@
 package org.apache.qpid.server.queue;
 
 import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.server.logging.LogActor;
 import org.apache.qpid.server.subscription.Subscription;
 import org.apache.qpid.framing.AMQShortString;
 
@@ -57,7 +58,7 @@
         return messages;
     }
 
-    public void setQueue(AMQQueue queue)
+    public void setQueue(AMQQueue queue, boolean exclusive)
     {
         
     }
@@ -167,6 +168,11 @@
         //To change body of implemented methods use File | Settings | File Templates.
     }
 
+    public LogActor getLogActor()
+    {
+        return null;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
     public AMQQueue getQueue()
     {
         return null;

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java Mon Oct  5 11:11:05 2009
@@ -38,7 +38,7 @@
 
 public class SimpleACLTest extends QpidTestCase implements ConnectionListener
 {
-    private String BROKER = "vm://:1";//"tcp://localhost:5672";
+    private String BROKER = "vm://:"+ApplicationRegistry.DEFAULT_INSTANCE;//"tcp://localhost:5672";
 
     public void setUp() throws Exception
     {
@@ -61,14 +61,14 @@
         }
 
         ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(defaultaclConfigFile);
-        ApplicationRegistry.initialise(config, 1);
-        TransportConnection.createVMBroker(1);
+        ApplicationRegistry.initialise(config, ApplicationRegistry.DEFAULT_INSTANCE);
+        TransportConnection.createVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
     }
 
     public void tearDown()
     {
-        TransportConnection.killAllVMBrokers();
-        ApplicationRegistry.remove(1);
+        TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
+        ApplicationRegistry.remove(ApplicationRegistry.DEFAULT_INSTANCE);
     }
 
     public String createConnectionString(String username, String password, String broker)

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/InVMBrokerDecorator.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/InVMBrokerDecorator.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/InVMBrokerDecorator.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/qpid/InVMBrokerDecorator.java Mon Oct  5 11:11:05 2009
@@ -88,6 +88,7 @@
                             // Ensure that the in-vm broker is created.
                             try
                             {
+                                ApplicationRegistry.getInstance(1);
                                 TransportConnection.createVMBroker(1);
                             }
                             catch (AMQVMBrokerCreationException e)

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/MultipleConnectionTest.java Mon Oct  5 11:11:05 2009
@@ -148,18 +148,6 @@
         }
     }
 
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-        TransportConnection.createVMBroker(1);
-    }
-
-    protected void tearDown() throws Exception
-    {
-        super.tearDown();
-        TransportConnection.killAllVMBrokers();
-    }
-
     private static void waitForCompletion(int expected, long wait, Receiver[] receivers) throws InterruptedException
     {
         for (int i = 0; i < receivers.length; i++)

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseOkTest.java Mon Oct  5 11:11:05 2009
@@ -67,13 +67,11 @@
     private final List<Message> _received2 = new ArrayList<Message>();
 
     private static final Logger _log = LoggerFactory.getLogger(ChannelCloseOkTest.class);
-    public String _connectionString = "vm://:1";
 
     protected void setUp() throws Exception
     {
         super.setUp();
 
-        TransportConnection.createVMBroker(1);
         _connection =  (AMQConnection) getConnection("guest", "guest");
 
         _destination1 = new AMQQueue(_connection, "q1", true);

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/channelclose/ChannelCloseTest.java Mon Oct  5 11:11:05 2009
@@ -54,25 +54,13 @@
     private static final long SYNC_TIMEOUT = 500;
     private int TEST = 0;
 
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-        TransportConnection.createVMBroker(1);
-    }
-
-    protected void tearDown() throws Exception
-    {
-        super.tearDown();
-        TransportConnection.killAllVMBrokers();
-    }
-
     /*
           close channel, use chanel with same id ensure error.
      */
     public void testReusingChannelAfterFullClosure() throws Exception
     {
-        // this is testing an 0.8 conneciton 
-        if(isBroker08())
+        // this is testing an inVM Connetion conneciton 
+        if (isJavaBroker() && !isExternalBroker())
         {
             _connection=newConnection();
 

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java Mon Oct  5 11:11:05 2009
@@ -24,8 +24,6 @@
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionURL;
 import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.transport.TransportConnection;
-import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.url.URLSyntaxException;
 
@@ -44,37 +42,42 @@
     private CountDownLatch _latch = new CountDownLatch(1);
     private JMSException _fail;
 
-    public void testNoFailover() throws URLSyntaxException, AMQVMBrokerCreationException,
+    public void testNoFailover() throws URLSyntaxException, Exception,
                                         InterruptedException, JMSException
     {
-        String connectionString = "amqp://guest:guest@/test?brokerlist='vm://:1?connectdelay='500',retries='3'',failover='nofailover'";
+        //This test uses hard coded connection string so only runs on InVM case
+        if (!isExternalBroker())
+        {
+            String connectionString = "amqp://guest:guest@/test?brokerlist='vm://:1?connectdelay='500',retries='3'',failover='nofailover'";
 
-        AMQConnectionURL url = new AMQConnectionURL(connectionString);
+            AMQConnectionURL url = new AMQConnectionURL(connectionString);
 
-        try
-        {
-            //Start the connection so it will use the retries
-            connection = new AMQConnection(url, null);
+            try
+            {
+                //Start the connection so it will use the retries
+                connection = new AMQConnection(url, null);
 
-            connection.setExceptionListener(this);
+                connection.setExceptionListener(this);
 
-            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-            consumer = session.createConsumer(session.createQueue(this.getName()));
+                session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+                consumer = session.createConsumer(session.createQueue(this.getName()));
 
-            //Kill connection
-            TransportConnection.killAllVMBrokers();
-            _latch.await();
+                //Kill connection
+                stopBroker();
 
-            if (_fail != null)
+                _latch.await();
+
+                if (_fail != null)
+                {
+                    _fail.printStackTrace(System.out);
+                    fail("Exception thrown:" + _fail.getMessage());
+                }
+            }
+            catch (AMQException e)
             {
-                _fail.printStackTrace(System.out);
-                fail("Exception thrown:" + _fail.getMessage());
+                fail(e.getMessage());
             }
         }
-        catch (AMQException e)
-        {
-            fail(e.getMessage());
-        }
     }
 
     public void onException(JMSException e)

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Mon Oct  5 11:11:05 2009
@@ -19,13 +19,28 @@
 
 import junit.framework.TestCase;
 import junit.framework.TestResult;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQConnectionFactory;
+import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.jms.BrokerDetails;
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.server.configuration.ServerConfiguration;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
+import org.apache.qpid.server.store.DerbyMessageStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jms.Connection;
 import javax.jms.Destination;
-import javax.jms.Session;
-import javax.jms.MessageProducer;
-import javax.jms.Message;
 import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import java.io.BufferedReader;
@@ -38,29 +53,12 @@
 import java.io.PrintStream;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.HashMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.commons.configuration.XMLConfiguration;
-
-import org.apache.qpid.client.transport.TransportConnection;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.store.DerbyMessageStore;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
-import org.apache.qpid.jms.BrokerDetails;
-import org.apache.qpid.jms.ConnectionURL;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  *
  *
@@ -148,6 +146,7 @@
     private static final String BROKER_CLEAN = "broker.clean";
     private static final String BROKER_VERSION = "broker.version";
     private static final String BROKER_READY = "broker.ready";
+    private static final String BROKER_STOPPED = "broker.stopped";
     private static final String TEST_OUTPUT = "test.output";
 
     // values
@@ -162,6 +161,7 @@
 
     protected static int DEFAULT_VM_PORT = 1;
     protected static int DEFAULT_PORT = Integer.getInteger("test.port", 5672);
+    protected static int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", 8999);
 
     protected String _brokerLanguage = System.getProperty(BROKER_LANGUAGE, JAVA);
     protected String _broker = System.getProperty(BROKER, VM);
@@ -171,7 +171,7 @@
 
     protected File _outputFile;
 
-    private Map<Integer,Process> _brokers = new HashMap<Integer,Process>();
+    private Map<Integer, Process> _brokers = new HashMap<Integer, Process>();
 
     private InitialContext _initialContext;
     private AMQConnectionFactory _connectionFactory;
@@ -181,6 +181,8 @@
     // the connections created for a given test
     protected List<Connection> _connections = new ArrayList<Connection>();
     public static final String QUEUE = "queue";
+    public static final String TOPIC = "topic";
+
 
     public QpidTestCase(String name)
     {
@@ -204,7 +206,7 @@
         boolean redirected = _output != null && _output.length() > 0;
         if (redirected)
         {
-            _outputFile = new File (String.format("%s/TEST-%s.out", _output, qname));
+            _outputFile = new File(String.format("%s/TEST-%s.out", _output, qname));
             out = new PrintStream(_outputFile);
             err = new PrintStream(String.format("%s/TEST-%s.err", _output, qname));
             System.setOut(out);
@@ -245,7 +247,7 @@
         {
             fail("Unable to test without config file:" + _configFile);
         }
-        
+
         startBroker();
     }
 
@@ -271,12 +273,21 @@
         private String ready;
         private CountDownLatch latch;
         private boolean seenReady;
+        private String stopped;
+        private String stopLine;
 
         public Piper(InputStream in, String ready)
         {
+            this(in, ready, null);
+        }
+
+        public Piper(InputStream in, String ready, String stopped)
+        {
             this.in = new LineNumberReader(new InputStreamReader(in));
             this.ready = ready;
+            this.stopped = stopped;
             this.seenReady = false;
+
             if (this.ready != null && !this.ready.equals(""))
             {
                 this.latch = new CountDownLatch(1);
@@ -318,6 +329,11 @@
                         seenReady = true;
                         latch.countDown();
                     }
+
+                    if (latch != null && line.contains(stopped))
+                    {
+                        stopLine = line;
+                    }
                 }
             }
             catch (IOException e)
@@ -333,6 +349,11 @@
                 }
             }
         }
+
+        public String getStopLine()
+        {
+            return stopLine;
+        }
     }
 
     public void startBroker() throws Exception
@@ -340,6 +361,16 @@
         startBroker(0);
     }
 
+    /**
+     * Get the Port that is use by the current broker
+     *
+     * @return the current port
+     */
+    protected int getPort()
+    {
+        return getPort(0);
+    }
+
     private int getPort(int port)
     {
         if (_broker.equals(VM))
@@ -359,10 +390,10 @@
     private String getBrokerCommand(int port) throws MalformedURLException
     {
         return _broker
-            .replace("@PORT", "" + port)
-            .replace("@SSL_PORT", "" + (port - 1))
-            .replace("@MPORT", "" + (port + (8999 - DEFAULT_PORT)))
-            .replace("@CONFIG_FILE", _configFile.toString());
+                .replace("@PORT", "" + port)
+                .replace("@SSL_PORT", "" + (port - 1))
+                .replace("@MPORT", "" + (port + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT)))
+                .replace("@CONFIG_FILE", _configFile.toString());
     }
 
     public void startBroker(int port) throws Exception
@@ -397,15 +428,19 @@
             process = pb.start();
 
             Piper p = new Piper(process.getInputStream(),
-                                System.getProperty(BROKER_READY));
+                                System.getProperty(BROKER_READY),
+                                System.getProperty(BROKER_STOPPED));
 
             p.start();
 
             if (!p.await(30, TimeUnit.SECONDS))
             {
-                _logger.info("broker failed to become ready");
+                _logger.info("broker failed to become ready:" + p.getStopLine());
+                //Ensure broker has stopped
+                process.destroy();
                 cleanBroker();
-                throw new RuntimeException("broker failed to become ready");
+                throw new RuntimeException("broker failed to become ready:"
+                                           + p.getStopLine());
             }
 
             try
@@ -475,12 +510,12 @@
             ApplicationRegistry.remove(port);
         }
     }
-    
+
     public void nukeBroker() throws Exception
     {
         nukeBroker(0);
     }
-    
+
     public void nukeBroker(int port) throws Exception
     {
         Process proc = _brokers.get(getPort(port));
@@ -490,21 +525,20 @@
         }
         else
         {
-            String command = "pkill -KILL -f "+getBrokerCommand(getPort(port));
-            try 
+            String command = "pkill -KILL -f " + getBrokerCommand(getPort(port));
+            try
             {
                 Runtime.getRuntime().exec(command);
             }
             catch (Exception e)
             {
                 // Can't do that, try the old fashioned way
-                _logger.warn("Could not run "+command+", killing with stopBroker()");
+                _logger.warn("Could not run " + command + ", killing with stopBroker()");
                 stopBroker(port);
             }
         }
     }
 
-
     /**
      * Attempt to set the Java Broker to use the BDBMessageStore for persistence
      * Falling back to the DerbyMessageStore if
@@ -522,7 +556,7 @@
         Class bdb = null;
         try
         {
-            bdb = Class.forName("org.apache.qpid.store.berkleydb.BDBMessageStore");
+            bdb = Class.forName("org.apache.qpid.server.store.berkeleydb.BDBMessageStore");
         }
         catch (ClassNotFoundException e)
         {
@@ -540,7 +574,7 @@
                                   ".store.class", storeClass.getName());
         configuration.setProperty("virtualhosts.virtualhost." + virtualhost +
                                   ".store." + DerbyMessageStore.ENVIRONMENT_PATH_PROPERTY,
-                                  "${work}");
+                                  "${work}/" + virtualhost);
 
         File tmpFile = File.createTempFile("configFile", "test");
         tmpFile.deleteOnExit();
@@ -549,6 +583,22 @@
     }
 
     /**
+     * Get a property value from the current configuration file.
+     *
+     * @param property the property to lookup
+     *
+     * @return the requested String Value
+     *
+     * @throws org.apache.commons.configuration.ConfigurationException
+     *
+     */
+    protected String getConfigurationStringProperty(String property) throws ConfigurationException
+    {
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        return configuration.getConfig().getString(property);
+    }
+
+    /**
      * Set a configuration Property for this test run.
      *
      * This creates a new configuration based on the current configuration
@@ -558,9 +608,10 @@
      * configuration files being created.
      *
      * @param property the configuration property to set
-     * @param value the new value
+     * @param value    the new value
+     *
      * @throws ConfigurationException when loading the current config file
-     * @throws IOException when writing the new config file
+     * @throws IOException            when writing the new config file
      */
     protected void setConfigurationProperty(String property, String value)
             throws ConfigurationException, IOException
@@ -613,9 +664,9 @@
      * Set a System property for the duration of this test.
      *
      * When the test run is complete the value will be reverted.
-
+     *
      * @param property the property to set
-     * @param value the new value to use
+     * @param value    the new value to use
      */
     protected void setSystemProperty(String property, String value)
     {
@@ -671,7 +722,7 @@
     protected boolean isExternalBroker()
     {
         return !_broker.equals("vm");
-    }    
+    }
 
     public void restartBroker() throws Exception
     {
@@ -797,6 +848,16 @@
         return con;
     }
 
+    /**
+     * Return a uniqueName for this test.
+     * In this case it returns a queue Named by the TestCase and TestName
+     * @return String name for a queue
+     */
+    protected String getTestQueueName()
+    {
+        return getClass().getSimpleName() + "-" + getName();
+    }
+
     protected void tearDown() throws java.lang.Exception
     {
         // close all the connections used by this test.
@@ -807,18 +868,49 @@
 
         revertSystemProperties();
     }
-    
+
+    /**
+     * Consume all the messages in the specified queue. Helper to ensure
+     * persistent tests don't leave data behind.
+     *
+     * @param queue the queue to purge
+     *
+     * @return the count of messages drained
+     *
+     * @throws Exception if a problem occurs
+     */
+    protected int drainQueue(Queue queue) throws Exception
+    {
+        Connection connection = getConnection();
+
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+        MessageConsumer consumer = session.createConsumer(queue);
+
+        connection.start();
+
+        int count = 0;
+        while (consumer.receive(1000) != null)
+        {
+            count++;
+        }
+
+        connection.close();
+
+        return count;
+    }
+
     public List<Message> sendMessage(Session session, Destination destination,
                                      int count) throws Exception
     {
-       return sendMessage(session, destination, count, 0);
+        return sendMessage(session, destination, count, 0);
     }
 
     public List<Message> sendMessage(Session session, Destination destination,
-                                     int count,int batchSize) throws Exception
+                                     int count, int batchSize) throws Exception
     {
         List<Message> messages = new ArrayList<Message>(count);
-        
+
         MessageProducer producer = session.createProducer(destination);
 
         for (int i = 0; i < count; i++)
@@ -859,7 +951,6 @@
         return getConnectionFactory().getConnectionURL();
     }
 
-
     public BrokerDetails getBroker()
     {
         try

Modified: qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java (original)
+++ qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java Mon Oct  5 11:11:05 2009
@@ -45,6 +45,9 @@
     // The file that the log statements will be written to.
     private File _logfile;
 
+    // The appender we added to the get messages
+    private FileAppender _appender;
+
     /**
      * Create a new LogMonitor that creates a new Log4j Appender and monitors
      * all log4j output via the current configuration.
@@ -78,11 +81,11 @@
         {
             // This is mostly for running the test outside of the ant setup
             _logfile = File.createTempFile("LogMonitor", ".log");
-            FileAppender appender = new FileAppender(new SimpleLayout(),
+            _appender = new FileAppender(new SimpleLayout(),
                                                      _logfile.getAbsolutePath());
-            appender.setFile(_logfile.getAbsolutePath());
-            appender.setImmediateFlush(true);
-            Logger.getRootLogger().addAppender(appender);
+            _appender.setFile(_logfile.getAbsolutePath());
+            _appender.setImmediateFlush(true);
+            Logger.getRootLogger().addAppender(_appender);
         }
     }
 
@@ -169,8 +172,24 @@
      */
     public void reset() throws FileNotFoundException, IOException
     {
-        OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(_logfile));
-        writer.write("Log Monitor Reset\n");
-        writer.close();
+        new FileOutputStream(_logfile).getChannel().truncate(0);
     }
+
+    /**
+     * Stop monitoring this file.
+     *
+     * This is required to be called incase we added a new logger.
+     *
+     * If we don't call close then the new logger will continue to get log entries
+     * after our desired test has finished.
+     */
+    public void close()
+    {
+        //Remove the custom appender we added for this logger
+        if (_appender != null)
+        {
+            Logger.getRootLogger().removeAppender(_appender);
+        }
+    }
+
 }

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/010Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/010Excludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/010Excludes:799241-802129

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/08Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/08Excludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/08Excludes:799241-802129

Modified: qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes (original)
+++ qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes Mon Oct  5 11:11:05 2009
@@ -40,3 +40,8 @@
 org.apache.qpid.client.SessionCreateTest#*
 
 org.apache.qpid.test.client.RollbackOrderTest#*
+
+// This test requires the standard configuration file for validation.
+// Excluding here does not reduce test coverage.
+org.apache.qpid.server.configuration.ServerConfigurationFileTest#*
+

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:799241-802129

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/08TransientExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:799241-802129

Modified: qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes (original)
+++ qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes Mon Oct  5 11:11:05 2009
@@ -5,3 +5,12 @@
 org.apache.qpid.server.queue.QueueCreateTest#testCreateFlowToDiskInvalid
 org.apache.qpid.server.queue.QueueCreateTest#testCreateFlowToDiskInvalidSize
 
+//
+// QPID-2031 : Broker is not cleanly shutdown by QpidTestCase
+//
+org.apache.qpid.server.logging.BrokerLoggingTest#testBrokerShutdownListeningTCPDefault
+org.apache.qpid.server.logging.BrokerLoggingTest#testBrokerShutdownListeningTCPSSL
+org.apache.qpid.server.logging.BrokerLoggingTest#testBrokerShutdownStopped
+org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest#testMessageStoreClose
+org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#testMessageStoreClose
+

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/Excludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/Excludes:799241-802129

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/XAExcludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/XAExcludes:799241-802129

Propchange: qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct  5 11:11:05 2009
@@ -1 +1 @@
-/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:799241-800440
+/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:799241-802129

Modified: qpid/branches/java-broker-0-10/qpid/java/test-profiles/default.testprofile
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/test-profiles/default.testprofile?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/test-profiles/default.testprofile (original)
+++ qpid/branches/java-broker-0-10/qpid/java/test-profiles/default.testprofile Mon Oct  5 11:11:05 2009
@@ -17,6 +17,7 @@
 log4j.debug=false
 
 test.port=15672
+test.mport=18999
 test.port.ssl=15671
 test.port.alt=15673
 

Modified: qpid/branches/java-broker-0-10/qpid/java/test-profiles/java-derby.testprofile
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/test-profiles/java-derby.testprofile?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/test-profiles/java-derby.testprofile (original)
+++ qpid/branches/java-broker-0-10/qpid/java/test-profiles/java-derby.testprofile Mon Oct  5 11:11:05 2009
@@ -1,7 +1,8 @@
 broker.language=java
 broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
 broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work/derbyDB
-broker.ready=Qpid Broker Ready
+broker.ready=Ready
+broker.stopped=Exception
 broker.config=${project.root}/build/etc/config-systests-derby.xml
 
 profile.excludes=08StandaloneExcludes

Modified: qpid/branches/java-broker-0-10/qpid/java/test-profiles/java.testprofile
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-0-10/qpid/java/test-profiles/java.testprofile?rev=821755&r1=821754&r2=821755&view=diff
==============================================================================
--- qpid/branches/java-broker-0-10/qpid/java/test-profiles/java.testprofile (original)
+++ qpid/branches/java-broker-0-10/qpid/java/test-profiles/java.testprofile Mon Oct  5 11:11:05 2009
@@ -1,6 +1,7 @@
 broker.language=java
 broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT -c @CONFIG_FILE -l ${test.profiles}/log4j-test.xml
 broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work/derbyDB
-broker.ready=Qpid Broker Ready
+broker.ready=Ready
+broker.stopped=Exception
 
 profile.excludes=08TransientExcludes 08StandaloneExcludes



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org