qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r816261 [7/8] - in /qpid/branches/java-network-refactor: ./ qpid/cpp/bindings/qmf/python/ qpid/cpp/bindings/qmf/ruby/ qpid/cpp/bindings/qmf/tests/ qpid/cpp/include/qpid/messaging/ qpid/cpp/src/ qpid/cpp/src/qmf/ qpid/cpp/src/qpid/acl/ qpid/...
Date Thu, 17 Sep 2009 16:21:21 GMT
Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java Thu Sep 17 16:21:13 2009
@@ -20,26 +20,19 @@
  */
 package org.apache.qpid.management.jmx;
 
-import org.apache.qpid.commands.objects.AllObjects;
-import org.apache.qpid.management.common.JMXConnnectionFactory;
 import org.apache.qpid.management.common.mbeans.ManagedBroker;
 import org.apache.qpid.management.common.mbeans.ManagedConnection;
 import org.apache.qpid.management.common.mbeans.ManagedExchange;
 import org.apache.qpid.server.logging.AbstractTestLogging;
 import org.apache.qpid.server.logging.subjects.AbstractTestLogSubject;
+import org.apache.qpid.test.utils.JMXTestUtils;
 
 import javax.jms.Connection;
 import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
 import javax.management.JMException;
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
 import java.io.IOException;
 import java.util.List;
-import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -50,33 +43,21 @@
  */
 public class ManagementActorLoggingTest extends AbstractTestLogging
 {
-    MBeanServerConnection _mbsc;
-    JMXConnector _jmxc;
+    private JMXTestUtils _jmxUtils;
     private static final String USER = "admin";
 
     @Override
     public void setUp() throws Exception
     {
-        setConfigurationProperty("management.enabled", "true");
+        _jmxUtils = new JMXTestUtils(this, USER, USER);
+        _jmxUtils.setUp();
         super.setUp();
-
-        if (isExternalBroker())
-        {
-            _jmxc = JMXConnnectionFactory.getJMXConnection(
-                    5000, "127.0.0.1",
-                    getManagementPort(getPort()), USER, USER);
-
-            _mbsc = _jmxc.getMBeanServerConnection();
-        }
     }
 
     @Override
     public void tearDown() throws Exception
     {
-        if (isExternalBroker())
-        {
-            _jmxc.close();
-        }
+        _jmxUtils.close();
         super.tearDown();
     }
 
@@ -107,34 +88,31 @@
      */
     public void testJMXManagementConsoleConnection() throws IOException
     {
-        if (isExternalBroker())
-        {
-            List<String> results = _monitor.findMatches("MNG-1007");
+        List<String> results = _monitor.findMatches("MNG-1007");
 
-            assertEquals("Unexpected Management Connection count", 1, results.size());
+        assertEquals("Unexpected Management Connection count", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            validateMessageID("MNG-1007", log);
+        validateMessageID("MNG-1007", log);
 
-            assertTrue("User not in log message:" + log, log.endsWith(USER));
-            // Extract the id from the log string
-            //  MESSAGE [mng:1(rmi://169.24.29.116)] MNG-1007 : Open : User admin
-            int connectionID = Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + "");
+        assertTrue("User not in log message:" + log, log.endsWith(USER));
+        // Extract the id from the log string
+        //  MESSAGE [mng:1(rmi://169.24.29.116)] MNG-1007 : Open : User admin
+        int connectionID = Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + "");
 
-            results = _monitor.findMatches("MNG-1008");
+        results = _monitor.findMatches("MNG-1008");
 
-            assertEquals("Unexpected Management Connection close count", 0, results.size());
+        assertEquals("Unexpected Management Connection close count", 0, results.size());
 
-            _jmxc.close();
+        _jmxUtils.close();
 
-            results = _monitor.findMatches("MNG-1008");
+        results = _monitor.findMatches("MNG-1008");
 
-            assertEquals("Unexpected Management Connection count", 1, results.size());
+        assertEquals("Unexpected Management Connection count", 1, results.size());
 
-            assertEquals("Close does not have same id as open,", connectionID,
-                         Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + ""));
-        }
+        assertEquals("Close does not have same id as open,", connectionID,
+                     Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + ""));
     }
 
     /**
@@ -159,56 +137,40 @@
      */
     public void testConnectionCloseViaManagement() throws IOException, Exception
     {
-        if (isExternalBroker())
-        {
+        //Create a connection to the broker
+        Connection connection = getConnection();
 
-            //Create a connection to the broker
-            Connection connection = getConnection();
-
-            // Monitor the connection for an exception being thrown
-            // this should be a DisconnectionException but it is not this tests
-            // job to valiate that. Only use the exception as a synchronisation
-            // to check the log file for the Close message
-            final CountDownLatch exceptionReceived = new CountDownLatch(1);
-            connection.setExceptionListener(new ExceptionListener()
+        // Monitor the connection for an exception being thrown
+        // this should be a DisconnectionException but it is not this tests
+        // job to valiate that. Only use the exception as a synchronisation
+        // to check the log file for the Close message
+        final CountDownLatch exceptionReceived = new CountDownLatch(1);
+        connection.setExceptionListener(new ExceptionListener()
+        {
+            public void onException(JMSException e)
             {
-                public void onException(JMSException e)
-                {
-                    //Failover being attempted.
-                    exceptionReceived.countDown();
-                }
-            });
+                //Failover being attempted.
+                exceptionReceived.countDown();
+            }
+        });
 
-            //Remove the connection close from any 0-10 connections
-            _monitor.reset();
+        //Remove the connection close from any 0-10 connections
+        _monitor.reset();
 
-            // Get all active AMQP connections
-            AllObjects allObject = new AllObjects(_mbsc);
-            allObject.querystring = "org.apache.qpid:type=VirtualHost.Connection,*";
+        // Get a managedConnection
+        ManagedConnection mangedConnection = _jmxUtils.getManagedObject(ManagedConnection.class, "org.apache.qpid:type=VirtualHost.Connection,*");
 
-            Set<ObjectName> objectNames = allObject.returnObjects();
+        //Close the connection
+        mangedConnection.closeConnection();
 
-            assertEquals("More than one test connection returned", 1, objectNames.size());
+        //Wait for the connection to close
+        assertTrue("Timed out waiting for conneciton to report close",
+                   exceptionReceived.await(2, TimeUnit.SECONDS));
 
-            ObjectName connectionName = objectNames.iterator().next();
+        //Validate results
+        List<String> results = _monitor.findMatches("CON-1002");
 
-            ManagedConnection mangedConnection = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, connectionName,
-                                     ManagedConnection.class, false);
-
-
-            //Close the connection
-            mangedConnection.closeConnection();
-
-            //Wait for the connection to close
-            assertTrue("Timed out waiting for conneciton to report close",
-                       exceptionReceived.await(2, TimeUnit.SECONDS));
-
-            //Validate results
-            List<String> results = _monitor.findMatches("CON-1002");
-
-            assertEquals("Unexpected Connection Close count", 1, results.size());
-        }
+        assertEquals("Unexpected Connection Close count", 1, results.size());
     }
 
     /**
@@ -234,114 +196,100 @@
      */
     public void testCreateExchangeDirectTransientViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous exchange declares
-            _monitor.reset();
-
-            createExchange("direct");
+        _monitor.reset();
 
-            // Validate
+        _jmxUtils.createExchange("test", "direct", null, false);
 
-            //1 - ID is correct
-            List<String> results = _monitor.findMatches("EXH-1001");
+        // Validate
 
-            assertEquals("More than one exchange creation found", 1, results.size());
+        //1 - ID is correct
+        List<String> results = _monitor.findMatches("EXH-1001");
 
-            String log = getLog(results.get(0));
+        assertEquals("More than one exchange creation found", 1, results.size());
 
-            // Validate correct exchange name
-            assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
+        String log = getLog(results.get(0));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
+        // Validate correct exchange name
+        assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
 
-        }
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
     public void testCreateExchangeTopicTransientViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous exchange declares
-            _monitor.reset();
+        //Remove any previous exchange declares
+        _monitor.reset();
 
-            createExchange("topic");
+        _jmxUtils.createExchange("test", "topic", null, false);
 
-            // Validate
+        // Validate
 
-            //1 - ID is correct
-            List<String> results = _monitor.findMatches("EXH-1001");
+        //1 - ID is correct
+        List<String> results = _monitor.findMatches("EXH-1001");
 
-            assertEquals("More than one exchange creation found", 1, results.size());
+        assertEquals("More than one exchange creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct exchange name
-            assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
+        // Validate correct exchange name
+        assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
 
-        }
     }
 
     public void testCreateExchangeFanoutTransientViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous exchange declares
-            _monitor.reset();
+        //Remove any previous exchange declares
+        _monitor.reset();
 
-            createExchange("fanout");
+        _jmxUtils.createExchange("test", "fanout", null, false);
 
-            // Validate
+        // Validate
 
-            //1 - ID is correct
-            List<String> results = _monitor.findMatches("EXH-1001");
+        //1 - ID is correct
+        List<String> results = _monitor.findMatches("EXH-1001");
 
-            assertEquals("More than one exchange creation found", 1, results.size());
+        assertEquals("More than one exchange creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct exchange name
-            assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
+        // Validate correct exchange name
+        assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
 
-        }
     }
 
     public void testCreateExchangeHeadersTransientViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous exchange declares
-            _monitor.reset();
+        //Remove any previous exchange declares
+        _monitor.reset();
 
-            createExchange("headers");
+        _jmxUtils.createExchange("test", "headers", null, false);
 
-            // Validate
+        // Validate
 
-            //1 - ID is correct
-            List<String> results = _monitor.findMatches("EXH-1001");
+        //1 - ID is correct
+        List<String> results = _monitor.findMatches("EXH-1001");
 
-            assertEquals("More than one exchange creation found", 1, results.size());
+        assertEquals("More than one exchange creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct exchange name
-            assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
+        // Validate correct exchange name
+        assertTrue("Incorrect exchange name created:" + log, log.endsWith(getName()));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
 
-        }
     }
 
     /**
@@ -365,29 +313,26 @@
      */
     public void testCreateQueueTransientViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous queue declares
-            _monitor.reset();
+        //Remove any previous queue declares
+        _monitor.reset();
 
-            createQueue();
+        _jmxUtils.createQueue("test", getName(), null, false);
 
-            // Validate
+        // Validate
 
-            List<String> results = _monitor.findMatches("QUE-1001");
+        List<String> results = _monitor.findMatches("QUE-1001");
 
-            assertEquals("More than one queue creation found", 1, results.size());
+        assertEquals("More than one queue creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct queue name
-            String subject = fromSubject(log);
-            assertEquals("Incorrect queue name created", getName(), AbstractTestLogSubject.getSlice("qu", subject));
+        // Validate correct queue name
+        String subject = fromSubject(log);
+        assertEquals("Incorrect queue name created", getName(), AbstractTestLogSubject.getSlice("qu", subject));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
-        }
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
     /**
@@ -411,34 +356,29 @@
      */
     public void testQueueDeleteViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous queue declares
-            _monitor.reset();
+        //Remove any previous queue declares
+        _monitor.reset();
 
-            createQueue();
+        _jmxUtils.createQueue("test", getName(), null, false);
 
-            ManagedBroker managedBroker = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, getVirtualHostManagerObjectName(),
-                                     ManagedBroker.class, false);
+        ManagedBroker managedBroker = _jmxUtils.getManagedBroker("test");
 
-            managedBroker.deleteQueue(getName());
+        managedBroker.deleteQueue(getName());
 
-            List<String> results = _monitor.findMatches("QUE-1002");
+        List<String> results = _monitor.findMatches("QUE-1002");
 
-            assertEquals("More than one queue deletion found", 1, results.size());
+        assertEquals("More than one queue deletion found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct binding
-            String subject = fromSubject(log);
-            assertEquals("Incorrect queue named in delete", getName(), AbstractTestLogSubject.getSlice("qu", subject));
+        // Validate correct binding
+        String subject = fromSubject(log);
+        assertEquals("Incorrect queue named in delete", getName(), AbstractTestLogSubject.getSlice("qu", subject));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
 
-        }
     }
 
     /**
@@ -462,98 +402,83 @@
      */
     public void testBindingCreateOnDirectViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous queue declares
-            _monitor.reset();
+        //Remove any previous queue declares
+        _monitor.reset();
 
-            createQueue();
+        _jmxUtils.createQueue("test", getName(), null, false);
 
-            ManagedExchange managedExchange = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, getExchange("amq.direct"),
-                                     ManagedExchange.class, false);
+        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.direct");
 
-            managedExchange.createNewBinding(getName(), getName());
+        managedExchange.createNewBinding(getName(), getName());
 
-            List<String> results = _monitor.findMatches("BND-1001");
+        List<String> results = _monitor.findMatches("BND-1001");
 
-            assertEquals("More than one bind creation found", 1, results.size());
+        assertEquals("More than one bind creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct binding
-            String subject = fromSubject(log);
-            assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
-            assertEquals("Incorrect routing key in create", getName(), AbstractTestLogSubject.getSlice("rk", subject));
+        // Validate correct binding
+        String subject = fromSubject(log);
+        assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
+        assertEquals("Incorrect routing key in create", getName(), AbstractTestLogSubject.getSlice("rk", subject));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
-        }
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
     public void testBindingCreateOnTopicViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous queue declares
-            _monitor.reset();
+        //Remove any previous queue declares
+        _monitor.reset();
 
-            createQueue();
+        _jmxUtils.createQueue("test", getName(), null, false);
 
-            ManagedExchange managedExchange = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, getExchange("amq.topic"),
-                                     ManagedExchange.class, false);
+        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.topic");
 
-            managedExchange.createNewBinding(getName(), getName());
+        managedExchange.createNewBinding(getName(), getName());
 
-            List<String> results = _monitor.findMatches("BND-1001");
+        List<String> results = _monitor.findMatches("BND-1001");
 
-            assertEquals("More than one bind creation found", 1, results.size());
+        assertEquals("More than one bind creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct binding
-            String subject = fromSubject(log);
-            assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
-            assertEquals("Incorrect routing key in create", getName(), AbstractTestLogSubject.getSlice("rk", subject));
+        // Validate correct binding
+        String subject = fromSubject(log);
+        assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
+        assertEquals("Incorrect routing key in create", getName(), AbstractTestLogSubject.getSlice("rk", subject));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
-        }
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
     public void testBindingCreateOnFanoutViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-            //Remove any previous queue declares
-            _monitor.reset();
+        //Remove any previous queue declares
+        _monitor.reset();
 
-            createQueue();
+        _jmxUtils.createQueue("test", getName(), null, false);
 
-            ManagedExchange managedExchange = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, getExchange("amq.fanout"),
-                                     ManagedExchange.class, false);
+        ManagedExchange managedExchange = _jmxUtils.getManagedExchange("amq.fanout");
 
-            managedExchange.createNewBinding(getName(), getName());
+        managedExchange.createNewBinding(getName(), getName());
 
-            List<String> results = _monitor.findMatches("BND-1001");
+        List<String> results = _monitor.findMatches("BND-1001");
 
-            assertEquals("More than one bind creation found", 1, results.size());
+        assertEquals("More than one bind creation found", 1, results.size());
 
-            String log = getLog(results.get(0));
+        String log = getLog(results.get(0));
 
-            // Validate correct binding
-            String subject = fromSubject(log);
-            assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
-            assertEquals("Incorrect routing key in create", "*", AbstractTestLogSubject.getSlice("rk", subject));
+        // Validate correct binding
+        String subject = fromSubject(log);
+        assertEquals("Incorrect queue named in create", getName(), AbstractTestLogSubject.getSlice("qu", subject));
+        assertEquals("Incorrect routing key in create", "*", AbstractTestLogSubject.getSlice("rk", subject));
 
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
-        }
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
     /**
@@ -578,114 +503,28 @@
      */
     public void testUnRegisterExchangeViaManagementConsole() throws IOException, JMException
     {
-        if (isExternalBroker())
-        {
-
-            //Remove any previous queue declares
-            _monitor.reset();
-
-            createExchange("direct");
-
-            ManagedBroker managedBroker = MBeanServerInvocationHandler.
-                    newProxyInstance(_mbsc, getVirtualHostManagerObjectName(),
-                                     ManagedBroker.class, false);
-
-            managedBroker.unregisterExchange(getName());
-
-            List<String> results = _monitor.findMatches("EXH-1002");
-
-            assertEquals("More than one exchange deletion found", 1, results.size());
-
-            String log = getLog(results.get(0));
-
-            // Validate correct binding
-            String subject = fromSubject(log);
-            assertEquals("Incorrect exchange named in delete", "direct/" + getName(), AbstractTestLogSubject.getSlice("ex", subject));
-
-            // Validate it was a management actor.
-            String actor = fromActor(log);
-            assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
-        }
-    }
-
-    /**
-     * Create a non-durable test exchange with the current test name
-     *
-     * @throws JMException - is thrown if a exchange with this testName already exists
-     * @throws IOException - if there is a problem with the JMX Connection
-     * @throws javax.management.MBeanException
-     *                     - if there is another problem creating the exchange
-     */
-    private void createExchange(String type)
-            throws JMException, IOException, MBeanException
-    {
-        ManagedBroker managedBroker = MBeanServerInvocationHandler.
-                newProxyInstance(_mbsc, getVirtualHostManagerObjectName(),
-                                 ManagedBroker.class, false);
-
-        managedBroker.createNewExchange(getName(), type, false);
-    }
-
-    /**
-     * Create a non-durable queue (with no owner) that is named after the
-     * creating test.
-     *
-     * @throws JMException - is thrown if a queue with this testName already exists
-     * @throws IOException - if there is a problem with the JMX Connection
-     */
-    private void createQueue()
-            throws JMException, IOException
-    {
-        ManagedBroker managedBroker = MBeanServerInvocationHandler.
-                newProxyInstance(_mbsc, getVirtualHostManagerObjectName(),
-                                 ManagedBroker.class, false);
+        //Remove any previous queue declares
+        _monitor.reset();
 
-        managedBroker.createNewQueue(getName(), null, false);
-    }
+        _jmxUtils.createExchange("test", "direct", null, false);
 
-    /**
-     * Retrive the ObjectName for the test Virtualhost.
-     *
-     * This is then use to create aproxy to the ManagedBroker MBean.
-     *
-     * @return the ObjectName for the 'test' VirtualHost.
-     */
-    private ObjectName getVirtualHostManagerObjectName()
-    {
-        // Get the name of the test manager
-        AllObjects allObject = new AllObjects(_mbsc);
-        allObject.querystring = "org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=test,*";
+        ManagedBroker managedBroker = _jmxUtils.getManagedBroker("test");
 
-        Set<ObjectName> objectNames = allObject.returnObjects();
+        managedBroker.unregisterExchange(getName());
 
-        assertEquals("Incorrect number test vhosts returned", 1, objectNames.size());
+        List<String> results = _monitor.findMatches("EXH-1002");
 
-        // We have verified we have only one value in objectNames so return it
-        return objectNames.iterator().next();
-    }
-
-    /**
-     * Retrive the ObjectName for the given Exchange on the test Virtualhost.
-     *
-     * This is then use to create aproxy to the ManagedExchange MBean.
-     *
-     * @param exchange The exchange to retireve e.g. 'direct'
-     *
-     * @return the ObjectName for the given exchange on the test VirtualHost.
-     */
-    private ObjectName getExchange(String exchange)
-    {
-        // Get the name of the test manager
-        AllObjects allObject = new AllObjects(_mbsc);
-        allObject.querystring = "org.apache.qpid:type=VirtualHost.Exchange,VirtualHost=test,name=" + exchange + ",*";
+        assertEquals("More than one exchange deletion found", 1, results.size());
 
-        Set<ObjectName> objectNames = allObject.returnObjects();
+        String log = getLog(results.get(0));
 
-        assertEquals("Incorrect number of exchange with name '" + exchange +
-                     "' returned", 1, objectNames.size());
+        // Validate correct binding
+        String subject = fromSubject(log);
+        assertEquals("Incorrect exchange named in delete", "direct/" + getName(), AbstractTestLogSubject.getSlice("ex", subject));
 
-        // We have verified we have only one value in objectNames so return it
-        return objectNames.iterator().next();
+        // Validate it was a management actor.
+        String actor = fromActor(log);
+        assertTrue("Actor is not a manangement actor:" + actor, actor.startsWith("mng"));
     }
 
 }

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/configuration/ServerConfigurationFileTest.java Thu Sep 17 16:21:13 2009
@@ -40,6 +40,8 @@
         {
             fail("Unable to test without config file:" + _configFile);
         }
+
+        saveTestConfiguration();
         _serverConfig = new ServerConfiguration(_configFile);
     }
 

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java Thu Sep 17 16:21:13 2009
@@ -94,7 +94,7 @@
     {
         _connection = getConnection();
         _session = _connection.createSession(true, Session.SESSION_TRANSACTED);
-        _destination = _session.createQueue("testQueue");
+        _destination = _session.createQueue(getTestQueueName());
 
         // Consumer is only used to actually create the destination
         _session.createConsumer(_destination).close();
@@ -116,14 +116,12 @@
             // Add the current contents of the log file to test output
             message.append(_monitor.readFile());
 
-            // Write the server config file to test output
-            message.append("Server configuration file in use:\n");
-            message.append(FileUtils.readFileAsString(_configFile));
-
-            // Write the virtualhost config file to test output
-            message.append("\nVirtualhost configuration file in use:\n");
-            message.append(FileUtils.readFileAsString(ServerConfiguration.
-                    flatConfig(_configFile).getString("virtualhosts")));
+            // Write the test config file to test output
+            message.append("Server configuration overrides in use:\n");
+            message.append(FileUtils.readFileAsString(getTestConfigFile()));
+
+            message.append("\nVirtualhost maxMessageCount:\n");                        
+            message.append((new ServerConfiguration(_configFile)).getConfig().getString("virtualhosts.virtualhost." + VIRTUALHOST + ".queues.maximumMessageCount"));
 
             fail(message.toString());
         }

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DerbyMessageStoreLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DerbyMessageStoreLoggingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DerbyMessageStoreLoggingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DerbyMessageStoreLoggingTest.java Thu Sep 17 16:21:13 2009
@@ -28,6 +28,7 @@
 import javax.jms.Queue;
 import javax.jms.Session;
 import java.util.List;
+import java.io.File;
 
 /**
  * The MessageStore test suite validates that the follow log messages as
@@ -56,9 +57,9 @@
         //We call super.setUp but this will not start the broker as that is
         //part of the test case.
 
-        // Load current configuration file to get the list of defined vhosts
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        // Load the default configuration file to get the list of defined vhosts
+        ServerConfiguration configuration = new ServerConfiguration(new File(_configFile.getParent() + "/config.xml"));
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         // Make them all persistent i.e. Use DerbyMessageStore and
         // test that it logs correctly.
@@ -97,8 +98,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1002");
@@ -117,7 +118,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -160,8 +161,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1004");
@@ -186,7 +187,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -227,8 +228,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1006");
@@ -253,7 +254,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -293,8 +294,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1004 : Recovery Start :");
@@ -316,7 +317,7 @@
         // the virtualhost name, found above. AND
         // the index that the virtualhost is within the configuration.
         // we can retrive that from the vhosts list previously extracted.
-        String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+        String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
         // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
         String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -358,8 +359,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1006 : Recovery Complete :");
@@ -381,7 +382,7 @@
         // the virtualhost name, found above. AND
         // the index that the virtualhost is within the configuration.
         // we can retrive that from the vhosts list previously extracted.
-        String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+        String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
         // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
         String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -500,8 +501,8 @@
             assertTrue("MST messages not logged", results.size() > 0);
 
             // Load VirtualHost list from file.
-            Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-            List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+            ServerConfiguration configuration = new ServerConfiguration(_configFile);
+            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
             //Validate each vhost logs a creation
             results = _monitor.findMatches("MST-1004 : Recovery Start : " + queueName);
@@ -542,7 +543,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java Thu Sep 17 16:21:13 2009
@@ -24,6 +24,7 @@
 import org.apache.qpid.util.LogMonitor;
 
 import java.util.List;
+import java.io.File;
 
 /**
  * Management Console Test Suite
@@ -308,9 +309,8 @@
 
                 // We expect the RMIConnector Server port to be 100 higher than
                 // the RMI Server Port
-                int mPort = getPort() + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT) + 100;
-                assertTrue("SSL Keystore entry expected(" + mPort + ").:" + getMessageString(log),
-                           getMessageString(log).endsWith(getConfigurationStringProperty("management.ssl.keyStorePath")));
+                assertTrue("SSL Keystore entry expected.:" + getMessageString(log),
+                           getMessageString(log).endsWith(new File(getConfigurationStringProperty("management.ssl.keyStorePath")).getName()));
             }
             catch (AssertionFailedError afe)
             {

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java Thu Sep 17 16:21:13 2009
@@ -89,8 +89,8 @@
         assertEquals("MST-1001 is not the first MST message", "MST-1001", getMessageID(fromMessage(log)));
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1001");
@@ -109,7 +109,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
@@ -156,8 +156,8 @@
         assertTrue("MST messages not logged", results.size() > 0);
 
         // Load VirtualHost list from file.
-        Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-        List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+        ServerConfiguration configuration = new ServerConfiguration(_configFile);
+        List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
         //Validate each vhost logs a creation
         results = _monitor.findMatches("MST-1003");
@@ -176,7 +176,7 @@
             // the virtualhost name, found above. AND
             // the index that the virtualhost is within the configuration.
             // we can retrive that from the vhosts list previously extracted.
-            String fullStoreName = configuration.getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
+            String fullStoreName = configuration.getConfig().getString("virtualhosts.virtualhost(" + vhosts.indexOf(vhostName) + ")." + vhostName + ".store.class");
 
             // Get the Simple class name from the expected class name of o.a.q.s.s.MMS
             String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java Thu Sep 17 16:21:13 2009
@@ -64,8 +64,8 @@
         try
         {
             // Validation
-            Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-            List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+            ServerConfiguration configuration = new ServerConfiguration(_configFile);
+            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
             //Validate each vhost logs a creation
             results = _monitor.findMatches("VHT-1001");
@@ -117,8 +117,8 @@
         {
             // Validation
 
-            Configuration configuration = ServerConfiguration.flatConfig(_configFile);
-            List<String> vhosts = configuration.getList("virtualhosts.virtualhost.name");
+            ServerConfiguration configuration = new ServerConfiguration(_configFile);
+            List<String> vhosts = configuration.getConfig().getList("virtualhosts.virtualhost.name");
 
             //Validate each vhost logs a creation
             results = _monitor.findMatches("VHT-1002");

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java Thu Sep 17 16:21:13 2009
@@ -21,6 +21,7 @@
 
 package org.apache.qpid.server.security.acl;
 
+
 import junit.framework.TestCase;
 
 import org.apache.log4j.BasicConfigurator;
@@ -30,6 +31,7 @@
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
+import org.apache.qpid.AMQConnectionFailureException;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.jms.ConnectionListener;
@@ -37,6 +39,7 @@
 
 import javax.jms.*;
 import javax.jms.IllegalStateException;
+import javax.naming.NamingException;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -51,46 +54,30 @@
 
     public void setUp() throws Exception
     {
-        //Shutdown the QTC broker
-        stopBroker();
-
-        // Initialise ACLs.
-        final String QpidExampleHome = System.getProperty("QPID_EXAMPLE_HOME");
-        final File defaultaclConfigFile = new File(QpidExampleHome, "etc/acl.config.xml");
-
-        if (!defaultaclConfigFile.exists())
-        {
-            System.err.println("Configuration file not found:" + defaultaclConfigFile);
-            fail("Configuration file not found:" + defaultaclConfigFile);
-        }
+        final String QPID_HOME = System.getProperty("QPID_HOME");
 
-        if (System.getProperty("QPID_HOME") == null)                                                                                            
+        if (QPID_HOME == null)
         {
             fail("QPID_HOME not set");
         }
 
-        ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(defaultaclConfigFile);
-        ApplicationRegistry.initialise(config, ApplicationRegistry.DEFAULT_INSTANCE);
-        TransportConnection.createVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
-    }
+        // Initialise ACLs.
+        _configFile = new File(QPID_HOME, "etc/config-systests-acl.xml");
 
-    public void tearDown()
-    {
-        TransportConnection.killVMBroker(ApplicationRegistry.DEFAULT_INSTANCE);
-        ApplicationRegistry.remove(ApplicationRegistry.DEFAULT_INSTANCE);
+        super.setUp();
     }
 
-    public String createConnectionString(String username, String password, String broker)
+    public String createConnectionString(String username, String password)
     {
 
-        return "amqp://" + username + ":" + password + "@clientid/test?brokerlist='" + broker + "?retries='0''";
+        return "amqp://" + username + ":" + password + "@clientid/test?brokerlist='" + getBroker() + "?retries='0''";
     }
 
     public void testAccessAuthorized() throws AMQException, URLSyntaxException
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             Session sesh = conn.createSession(true, Session.SESSION_TRANSACTED);
 
@@ -103,28 +90,32 @@
         }
         catch (Exception e)
         {
-            fail("Connection was not created due to:" + e.getMessage());
+            fail("Connection was not created due to:" + e);
         }
     }
 
-    public void testAccessNoRights() throws URLSyntaxException, JMSException
+    public void testAccessNoRights() throws Exception
     {
         try
         {
-            Connection conn = createConnection("guest", "guest");
+            Connection conn = getConnection("guest", "guest");
 
             //Attempt to do do things to test connection.
             Session sesh = conn.createSession(true, Session.SESSION_TRANSACTED);
             conn.start();
             sesh.rollback();
 
-            conn.close();
             fail("Connection was created.");
         }
-        catch (AMQException amqe)
+        catch (JMSException jmse)
         {
-            Throwable cause = amqe.getCause();
-            assertEquals("Exception was wrong type", AMQAuthenticationException.class, cause.getClass());
+            Throwable linkedException = jmse.getLinkedException();
+            assertNotNull("Cause was null", linkedException);
+
+            assertEquals("Linked Exception was wrong type", AMQConnectionFailureException.class, linkedException.getClass());
+
+            Throwable cause = linkedException.getCause();
+            assertEquals("Cause was wrong type", AMQAuthenticationException.class, cause.getClass());
             assertEquals("Incorrect error code thrown", 403, ((AMQAuthenticationException) cause).getErrorCode().getCode());
         }
     }
@@ -133,7 +124,7 @@
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -149,11 +140,11 @@
         }
     }
 
-    public void testClientConsumeFromNamedQueueInvalid() throws AMQException, URLSyntaxException
+    public void testClientConsumeFromNamedQueueInvalid() throws NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             //Prevent Failover
             ((AMQConnection) conn).setConnectionListener(this);
@@ -180,7 +171,7 @@
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -198,11 +189,11 @@
         }
     }
 
-    public void testClientCreateNamedQueue() throws JMSException, URLSyntaxException, AMQException
+    public void testClientCreateNamedQueue() throws NamingException, JMSException, AMQException, Exception
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -216,6 +207,7 @@
         }
         catch (AMQAuthenticationException amqe)
         {
+            amqe.printStackTrace();
             assertEquals("Incorrect error code thrown", 403, ((AMQAuthenticationException) amqe).getErrorCode().getCode());
         }
     }
@@ -224,7 +216,7 @@
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             ((AMQConnection) conn).setConnectionListener(this);
 
@@ -251,7 +243,7 @@
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             ((AMQConnection) conn).setConnectionListener(this);
 
@@ -277,11 +269,11 @@
         }
     }
 
-    public void testClientPublishInvalidQueueSuccess() throws AMQException, URLSyntaxException, JMSException, InterruptedException
+    public void testClientPublishInvalidQueueSuccess() throws AMQException, URLSyntaxException, JMSException, NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("client", "guest");
+            Connection conn = getConnection("client", "guest");
 
             ((AMQConnection) conn).setConnectionListener(this);
 
@@ -323,7 +315,7 @@
     {
         try
         {
-            Connection conn = createConnection("server", "guest");
+            Connection conn = getConnection("server", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -339,11 +331,11 @@
         }
     }
 
-    public void testServerConsumeFromNamedQueueInvalid() throws AMQException, URLSyntaxException
+    public void testServerConsumeFromNamedQueueInvalid() throws AMQException, URLSyntaxException, NamingException, Exception
     {
         try
-        {                                                      
-            Connection conn = createConnection("client", "guest");
+        {
+            Connection conn = getConnection("client", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -364,11 +356,11 @@
         }
     }
 
-    public void testServerConsumeFromTemporaryQueue() throws AMQException, URLSyntaxException
+    public void testServerConsumeFromTemporaryQueue() throws AMQException, URLSyntaxException, NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("server","guest");
+            Connection conn = getConnection("server", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -388,30 +380,22 @@
         }
     }
 
-    private Connection createConnection(String username, String password) throws AMQException
+    @Override
+    public Connection getConnection(String username, String password) throws NamingException, JMSException
     {
-        AMQConnection connection = null;
-        try
-        {
-            connection = new AMQConnection(createConnectionString(username, password, BROKER));
-        }
-        catch (URLSyntaxException e)
-        {
-            // This should never happen as we generate the URLs.
-            fail(e.getMessage());
-        }
+        AMQConnection connection = (AMQConnection) super.getConnection(username, password);
 
         //Prevent Failover
         connection.setConnectionListener(this);
 
-        return (Connection)connection;
+        return (Connection) connection;
     }
 
     public void testServerCreateNamedQueueValid() throws JMSException, URLSyntaxException
     {
         try
         {
-            Connection conn = createConnection("server", "guest");
+            Connection conn = getConnection("server", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -428,11 +412,11 @@
         }
     }
 
-    public void testServerCreateNamedQueueInvalid() throws JMSException, URLSyntaxException, AMQException
+    public void testServerCreateNamedQueueInvalid() throws JMSException, URLSyntaxException, AMQException, NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("server", "guest");
+            Connection conn = getConnection("server", "guest");
 
             Session sesh = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
@@ -450,18 +434,18 @@
         }
     }
 
-    public void testServerCreateTemporaryQueueInvalid() throws JMSException, URLSyntaxException, AMQException
+    public void testServerCreateTemporaryQueueInvalid() throws NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("server", "guest");
+            Connection conn = getConnection("server", "guest");
 
             Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
             conn.start();
 
             session.createTemporaryQueue();
-                    
+
             fail("Test failed as creation succeded.");
             //conn will be automatically closed
         }
@@ -475,19 +459,19 @@
         }
     }
 
-    public void testServerCreateAutoDeleteQueueInvalid() throws JMSException, URLSyntaxException, AMQException
+    public void testServerCreateAutoDeleteQueueInvalid() throws NamingException, JMSException, AMQException, Exception
     {
         Connection connection = null;
         try
         {
-            connection = createConnection("server", "guest");
+            connection = getConnection("server", "guest");
 
             Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
 
             connection.start();
 
             ((AMQSession) session).createQueue(new AMQShortString("again_ensure_auto_delete_queue_for_temporary"),
-                                            true, false, false);
+                                               true, false, false);
 
             fail("Test failed as creation succeded.");
             //connection will be automatically closed
@@ -495,7 +479,7 @@
         catch (AMQAuthenticationException amqe)
         {
             assertEquals("Incorrect error code thrown", 403, amqe.getErrorCode().getCode());
-        }       
+        }
     }
 
     /**
@@ -506,10 +490,10 @@
      * @throws URLSyntaxException
      * @throws JMSException
      */
-    public void testServerPublishUsingTransactionSuccess() throws AMQException, URLSyntaxException, JMSException
+    public void testServerPublishUsingTransactionSuccess() throws AMQException, URLSyntaxException, JMSException, NamingException, Exception
     {
         //Set up the Server
-        Connection serverConnection = createConnection("server", "guest");
+        Connection serverConnection = getConnection("server", "guest");
 
         ((AMQConnection) serverConnection).setConnectionListener(this);
 
@@ -522,7 +506,7 @@
         serverConnection.start();
 
         //Set up the consumer
-        Connection clientConnection = createConnection("client", "guest");
+        Connection clientConnection = getConnection("client", "guest");
 
         //Send a test mesage
         Session clientSession = clientConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -563,8 +547,6 @@
             //Send the message using a transaction as this will allow us to retrieve any errors that occur on the broker.
             serverSession.commit();
 
-
-
             //Ensure Response is received.
             Message clientResponseMsg = clientResponse.receive(2000);
             assertNotNull("Client did not receive response message,", clientResponseMsg);
@@ -588,11 +570,11 @@
         }
     }
 
-    public void testServerPublishInvalidQueueSuccess() throws AMQException, URLSyntaxException, JMSException
+    public void testServerPublishInvalidQueueSuccess() throws AMQException, URLSyntaxException, JMSException, NamingException, Exception
     {
         try
         {
-            Connection conn = createConnection("server", "guest");
+            Connection conn = getConnection("server", "guest");
 
             ((AMQConnection) conn).setConnectionListener(this);
 

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/client/timeouts/SyncWaitDelayTest.java Thu Sep 17 16:21:13 2009
@@ -57,26 +57,13 @@
 
     public void setUp() throws Exception
     {
-        super.setUp();
-        stopBroker();
-        if (!_configFile.exists())
-        {
-            fail("Unable to test without config file:" + _configFile);
-        }
 
-        XMLConfiguration configuration = new XMLConfiguration(_configFile); 
-        configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.class", "org.apache.qpid.server.store.SlowMessageStore");
-        configuration.setProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.delays.commitTran.post", POST_COMMIT_DELAY);
-        configuration.setProperty("management.enabled", "false");
+        setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.class", "org.apache.qpid.server.store.SlowMessageStore");
+        setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST+".store.delays.commitTran.post", String.valueOf(POST_COMMIT_DELAY));
+        setConfigurationProperty("management.enabled", "false");
 
         
-        File tmpFile = File.createTempFile("configFile", "test");
-        tmpFile.deleteOnExit();
-        configuration.save(tmpFile);
-        
-        _configFile = tmpFile;
-
-        startBroker(1);
+        super.setUp();
 
         //Set the syncWrite timeout to be just larger than the delay on the commitTran.
         setSystemProperty("amqj.default_syncwrite_timeout", String.valueOf(SYNC_WRITE_TIMEOUT));

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/FailoverBaseCase.java Thu Sep 17 16:21:13 2009
@@ -21,6 +21,8 @@
 package org.apache.qpid.test.utils;
 
 import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.naming.NamingException;
 
 import org.apache.qpid.util.FileUtils;
 
@@ -64,7 +66,7 @@
      * @return a connection 
      * @throws Exception
      */
-    public Connection getConnection() throws Exception
+    public Connection getConnection() throws JMSException, NamingException
     {
         Connection conn =
         	(Boolean.getBoolean("profile.use_ssl"))?

Modified: qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Thu Sep 17 16:21:13 2009
@@ -21,6 +21,7 @@
 import junit.framework.TestResult;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.qpid.AMQException;
 import org.apache.qpid.client.AMQConnection;
 import org.apache.qpid.client.AMQConnectionFactory;
 import org.apache.qpid.client.transport.TransportConnection;
@@ -30,6 +31,7 @@
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
 import org.apache.qpid.server.store.DerbyMessageStore;
+import org.apache.qpid.url.URLSyntaxException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,6 +75,7 @@
     protected long RECEIVE_TIMEOUT = 1000l;
 
     private Map<String, String> _setProperties = new HashMap<String, String>();
+    private XMLConfiguration _testConfiguration = new XMLConfiguration();
 
     /**
      * Some tests are excluded when the property test.excludes is set to true.
@@ -183,8 +186,7 @@
     public static final String QUEUE = "queue";
     public static final String TOPIC = "topic";
     /** Map to hold test defined environment properties */
-    private Map<String,String> _env;
-
+    private Map<String, String> _env;
 
     public QpidTestCase(String name)
     {
@@ -335,7 +337,7 @@
                         latch.countDown();
                     }
 
-                    if (latch != null && line.contains(stopped))
+                    if (!seenReady && line.contains(stopped))
                     {
                         stopLine = line;
                     }
@@ -368,7 +370,9 @@
 
     /**
      * Return the management portin use by the broker on this main port
+     *
      * @param mainPort the broker's main port.
+     *
      * @return the management port that corresponds to the broker on the given port
      */
     protected int getManagementPort(int mainPort)
@@ -415,9 +419,14 @@
     {
         port = getPort(port);
 
+        // Save any configuratio changes that have been made
+        saveTestConfiguration();
+
         Process process = null;
         if (_broker.equals(VM))
         {
+            setConfigurationProperty("management.jmxport", String.valueOf(getManagementPort(port)));
+            saveTestConfiguration();
             // create an in_VM broker
             ApplicationRegistry.initialise(new ConfigurationFileApplicationRegistry(_configFile), port);
             TransportConnection.createVMBroker(port);
@@ -438,15 +447,35 @@
             env.put("PATH", env.get("PATH").concat(File.pathSeparator + qpidHome + "/bin"));
 
             //Add the test name to the broker run.
-            env.put("QPID_PNAME", "-DPNAME=\"" + _testName + "\"");
+            // DON'T change PNAME, qpid.stop needs this value.
+            env.put("QPID_PNAME", "-DPNAME=QPBRKR -DTNAME=\"" + _testName + "\"");
             env.put("QPID_WORK", System.getProperty("QPID_WORK"));
 
             // Add all the environment settings the test requested
             if (!_env.isEmpty())
             {
-                for(Map.Entry<String,String> entry : _env.entrySet())
+                for (Map.Entry<String, String> entry : _env.entrySet())
+                {
+                    env.put(entry.getKey(), entry.getValue());
+                }
+            }
+
+            String QPID_OPTS = " ";
+            // Add all the specified system properties to QPID_OPTS
+            if (!_setProperties.isEmpty())
+            {
+                for (String key : _setProperties.keySet())
+                {
+                    QPID_OPTS += "-D" + key + "=" + System.getProperty(key) + " ";
+                }
+
+                if (env.containsKey("QPID_OPTS"))
                 {
-                    env.put(entry.getKey() ,entry.getValue());
+                    env.put("QPID_OPTS", env.get("QPID_OPTS") + QPID_OPTS);
+                }
+                else
+                {
+                    env.put("QPID_OPTS", QPID_OPTS);
                 }
             }
 
@@ -484,6 +513,27 @@
         _brokers.put(port, process);
     }
 
+    public String getTestConfigFile()
+    {
+        String path = _output == null ? System.getProperty("java.io.tmpdir") : _output;
+        return path + "/" + getTestQueueName() + ".xml";
+    }
+
+    protected void saveTestConfiguration() throws ConfigurationException
+    {
+        String testConfig = getTestConfigFile();
+        //Specifiy the test configuration
+        setSystemProperty("test.config", testConfig);
+
+        // This is a work
+        if (_testConfiguration.isEmpty())
+        {
+            _testConfiguration.addProperty("test", getTestQueueName());
+        }
+
+        _testConfiguration.save(getTestConfigFile());
+    }
+
     public void cleanBroker()
     {
         if (_brokerClean != null)
@@ -565,18 +615,12 @@
             storeClass = bdb;
         }
 
-        // First we munge the config file and, if we're in a VM, set up an additional logfile
-        XMLConfiguration configuration = new XMLConfiguration(_configFile);
-        configuration.setProperty("virtualhosts.virtualhost." + virtualhost +
+
+        _testConfiguration.setProperty("virtualhosts.virtualhost." + virtualhost +
                                   ".store.class", storeClass.getName());
-        configuration.setProperty("virtualhosts.virtualhost." + virtualhost +
+        _testConfiguration.setProperty("virtualhosts.virtualhost." + virtualhost +
                                   ".store." + DerbyMessageStore.ENVIRONMENT_PATH_PROPERTY,
-                                  "${work}/" + virtualhost);
-
-        File tmpFile = File.createTempFile("configFile", "test");
-        tmpFile.deleteOnExit();
-        configuration.save(tmpFile);
-        _configFile = tmpFile;
+                                  "${QPID_WORK}/" + virtualhost);
     }
 
     /**
@@ -591,6 +635,10 @@
      */
     protected String getConfigurationStringProperty(String property) throws ConfigurationException
     {
+        // Call save Configuration to be sure we have saved the test specific
+        // file. As the optional status
+        saveTestConfiguration();
+
         ServerConfiguration configuration = new ServerConfiguration(_configFile);
         return configuration.getConfig().getString(property);
     }
@@ -613,48 +661,9 @@
     protected void setConfigurationProperty(String property, String value)
             throws ConfigurationException, IOException
     {
-        XMLConfiguration configuration = new XMLConfiguration(_configFile);
-
-        // If we are modifying a virtualhost value then we need to do so in
-        // the virtualhost.xml file as these values overwrite the values in
-        // the main config.xml file
-        if (property.startsWith("virtualhosts"))
-        {
-            // So locate the virtualhost.xml file and use the ServerConfiguration
-            // flatConfig method to get the interpolated value.
-            String vhostConfigFile = ServerConfiguration.
-                    flatConfig(_configFile).getString("virtualhosts");
-
-            // Load the vhostConfigFile
-            XMLConfiguration vhostConfiguration = new XMLConfiguration(vhostConfigFile);
-
-            // Set the value specified in to the vhostConfig.
-            // Remembering that property will be 'virtualhosts.virtulhost....'
-            // so we need to take off the 'virtualhosts.' from the start.
-            vhostConfiguration.setProperty(property.substring(property.indexOf(".") + 1), value);
-
-            // Write out the new virtualhost config file
-            File tmpFile = File.createTempFile("virtualhost-configFile", ".xml");
-            tmpFile.deleteOnExit();
-            vhostConfiguration.save(tmpFile);
-
-            // Change the property and value to be the new virtualhosts file
-            // so that then update the value in the main config file.
-            property = "virtualhosts";
-            value = tmpFile.getAbsolutePath();
-        }
-
-        configuration.setProperty(property, value);
-
-        // Write the new server config file
-        File tmpFile = File.createTempFile("configFile", ".xml");
-        tmpFile.deleteOnExit();
-        configuration.save(tmpFile);
-
-        _logger.info("Qpid Test Case now using configuration File:"
-                     + tmpFile.getAbsolutePath());
-
-        _configFile = tmpFile;
+        //Write the value in to this configuration file which will override the
+        // defaults.
+        _testConfiguration.setProperty(property, value);
     }
 
     /**
@@ -695,14 +704,13 @@
      * Add an environtmen variable for the external broker environment
      *
      * @param property the property to set
-     * @param value the value to set it to
+     * @param value    the value to set it to
      */
     protected void setBrokerEnvironment(String property, String value)
     {
-        _env.put(property,value);
+        _env.put(property, value);
     }
 
-
     /**
      * Check whether the broker is an 0.8
      *
@@ -720,7 +728,7 @@
 
     protected boolean isJavaBroker()
     {
-        return _brokerLanguage.equals("java");
+        return _brokerLanguage.equals("java") || _broker.equals("vm");
     }
 
     protected boolean isCppBroker()
@@ -807,7 +815,7 @@
         return (AMQConnectionFactory) getInitialContext().lookup(factoryName);
     }
 
-    public Connection getConnection() throws Exception
+    public Connection getConnection() throws JMSException, NamingException
     {
         return getConnection("guest", "guest");
     }
@@ -831,7 +839,7 @@
      *
      * @throws Exception if there is an error getting the connection
      */
-    public Connection getConnection(String username, String password) throws Exception
+    public Connection getConnection(String username, String password) throws JMSException, NamingException
     {
         _logger.info("get Connection");
         Connection con = getConnectionFactory().createConnection(username, password);
@@ -840,7 +848,7 @@
         return con;
     }
 
-    public Connection getConnection(String username, String password, String id) throws Exception
+    public Connection getConnection(String username, String password, String id) throws JMSException, URLSyntaxException, AMQException, NamingException
     {
         _logger.info("get Connection");
         Connection con;
@@ -860,6 +868,7 @@
     /**
      * 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()

Modified: qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes (original)
+++ qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes Thu Sep 17 16:21:13 2009
@@ -83,6 +83,9 @@
 
 // CPP Broker does not have a JMX interface to test
 org.apache.qpid.management.jmx.*
+// JMX is used in this test for validation
+org.apache.qpid.server.queue.ModelTest#*
+
 
 // 0-10 is not supported by the MethodRegistry
 org.apache.qpid.test.unit.close.JavaServerCloseRaceConditionTest#*

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/010Excludes:520691-726139
-/qpid/trunk/qpid/java/test-profiles/010Excludes:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/010Excludes:443187-726139
+/qpid/trunk/qpid/java/test-profiles/010Excludes:805429-816233

Modified: qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes (original)
+++ qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes Thu Sep 17 16:21:13 2009
@@ -15,3 +15,8 @@
 org.apache.qpid.client.SessionCreateTest#*
 
 org.apache.qpid.test.client.RollbackOrderTest#*
+
+// QPID-2097 exclude it from the InVM test runs until InVM JMX Interface is reliable
+org.apache.qpid.management.jmx.ManagementActorLoggingTest#*
+org.apache.qpid.server.queue.ModelTest#*
+

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/08Excludes:520691-726139
-/qpid/trunk/qpid/java/test-profiles/08Excludes:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/08Excludes:443187-726139
+/qpid/trunk/qpid/java/test-profiles/08Excludes:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:520691-726139
-/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:443187-726139
+/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/08TransientExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:520691-726139
+/incubator/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:443187-726139

Modified: qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes (original)
+++ qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes Thu Sep 17 16:21:13 2009
@@ -13,5 +13,9 @@
 org.apache.qpid.server.logging.BrokerLoggingTest#testBrokerShutdownStopped
 org.apache.qpid.server.logging.VirtualHostLoggingTest#testVirtualhostClosure
 org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest#testMessageStoreClose
-org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#testMessageStoreClose
 
+// QPID-XXX : Test fails to start external broker due to Derby Exception.
+org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#*
+
+// QPID-2081 :The configuration changes are now highlighting the close race condition
+org.apache.qpid.server.security.acl.SimpleACLTest#*

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/Excludes:520691-726139
-/qpid/trunk/qpid/java/test-profiles/Excludes:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/Excludes:443187-726139
+/qpid/trunk/qpid/java/test-profiles/Excludes:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/XAExcludes:520691-726139
+/incubator/qpid/trunk/qpid/java/test-profiles/XAExcludes:443187-726139

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/clean-dir
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/clean-dir:520691-726139
-/qpid/trunk/qpid/java/test-profiles/clean-dir:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/clean-dir:443187-726139
+/qpid/trunk/qpid/java/test-profiles/clean-dir:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:520691-726139
-/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:443187-726139
+/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:520691-726139
+/incubator/qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:443187-726139

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1,2 +1,2 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:520691-726139
-/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:805429-812920
+/incubator/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:443187-726139
+/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:805429-816233

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:520691-726139
+/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:443187-726139

Propchange: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 17 16:21:13 2009
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:520691-726139
+/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:443187-726139

Modified: qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile?rev=816261&r1=816260&r2=816261&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile (original)
+++ qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile Thu Sep 17 16:21:13 2009
@@ -8,6 +8,7 @@
 broker.module.ssl=${module.dir}/ssl.so
 broker.module.cluster=${module.dir}/cluster.so
 broker.module.store=${store.module.dir}/msgstore.so
+broker.stopped=Exception constructed
 
 broker.modules=
 broker.args=



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


Mime
View raw message