You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2012/07/05 16:56:46 UTC

svn commit: r1357650 - in /qpid/trunk/qpid/java/perftests: etc/chartdefs/ etc/testdefs/ src/main/java/org/apache/qpid/disttest/client/ src/main/java/org/apache/qpid/disttest/controller/config/ src/main/java/org/apache/qpid/disttest/jms/ src/main/java/o...

Author: kwall
Date: Thu Jul  5 14:56:45 2012
New Revision: 1357650

URL: http://svn.apache.org/viewvc?rev=1357650&view=rev
Log:
QPID-4110 added topic support to performance tests.

Specifically:
- Added support for creating and tearing down durable subscriptions
- Improved IterationValueTest so that we test the format for boolean properties (such as durableSubscription)
- Added test and chart definitions

Applied patch from Philip Harvey <ph...@philharveyonline.com>

Added:
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1500-Topic-NumberOfConsumers.chartdef
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1501-Topic-NumberOfTopics.chartdef
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1502-Topic-Persistence.chartdef
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1503-Topic-AckModes.chartdef
    qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-AckModes.js
    qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js
    qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js
    qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-Persistence.js
Modified:
    qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/Client.java
    qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/config/QueueConfig.java
    qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java
    qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java
    qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ClientTest.java
    qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/IterationValueTest.java

Added: qpid/trunk/qpid/java/perftests/etc/chartdefs/1500-Topic-NumberOfConsumers.chartdef
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1500-Topic-NumberOfConsumers.chartdef?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1500-Topic-NumberOfConsumers.chartdef (added)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1500-Topic-NumberOfConsumers.chartdef Thu Jul  5 14:56:45 2012
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+chartType=LINE
+chartTitle=Number of topic consumers
+chartSubtitle=Transient 1KB messages
+xAxisTitle=Numer of consumers
+yAxisTitle=Throughput (KB/s)
+
+series.1.statement=SELECT testName, throughputKbPerS FROM Topic-NumberOfConsumers WHERE participantName = 'All'
+series.1.legend=Current
+series.1.dir=${csvCurrentDir}
+

Added: qpid/trunk/qpid/java/perftests/etc/chartdefs/1501-Topic-NumberOfTopics.chartdef
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1501-Topic-NumberOfTopics.chartdef?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1501-Topic-NumberOfTopics.chartdef (added)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1501-Topic-NumberOfTopics.chartdef Thu Jul  5 14:56:45 2012
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+chartType=LINE
+chartTitle=Number of topics
+chartSubtitle=Transient 1KB messages
+xAxisTitle=Numer of topics
+yAxisTitle=Throughput (KB/s)
+
+series.1.statement=SELECT testName, throughputKbPerS FROM Topic-NumberOfTopics WHERE participantName = 'All'
+series.1.legend=Current
+series.1.dir=${csvCurrentDir}

Added: qpid/trunk/qpid/java/perftests/etc/chartdefs/1502-Topic-Persistence.chartdef
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1502-Topic-Persistence.chartdef?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1502-Topic-Persistence.chartdef (added)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1502-Topic-Persistence.chartdef Thu Jul  5 14:56:45 2012
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+chartType=BAR
+chartTitle=Topic transient/durable subscriptions
+chartSubtitle=1KB messages
+xAxisTitle=Durable subscription
+yAxisTitle=Throughput (KB/s)
+
+series.1.statement=SELECT isDurableSubscription, throughputKbPerS FROM Topic-Persistence WHERE participantName = 'All Consumers'
+series.1.legend=Current
+series.1.dir=${csvCurrentDir}

Added: qpid/trunk/qpid/java/perftests/etc/chartdefs/1503-Topic-AckModes.chartdef
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1503-Topic-AckModes.chartdef?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1503-Topic-AckModes.chartdef (added)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1503-Topic-AckModes.chartdef Thu Jul  5 14:56:45 2012
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+chartType=BAR
+chartTitle=Topic acknowledge modes
+chartSubtitle=Transient 1KB messages
+xAxisTitle=Ack Mode
+yAxisTitle=Throughput (KB/s)
+
+series.1.statement=SELECT acknowledgeMode, throughputKbPerS FROM Topic-AckModes WHERE participantName = 'All'
+series.1.legend=Current
+series.1.dir=${csvCurrentDir}

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-AckModes.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-AckModes.js?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-AckModes.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-AckModes.js Thu Jul  5 14:56:45 2012
@@ -0,0 +1,67 @@
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic'";
+
+var jsonObject = {
+    _tests: [
+    {
+      "_name": "Topic ack modes",
+      "_iterations": [
+        {
+          "_acknowledgeMode": 1
+        },
+        {
+          "_acknowledgeMode": 2
+        },
+        {
+          "_acknowledgeMode": 3
+        }
+      ],
+      "_clients": [
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_producers": [
+                    {
+                      "_name": "Producer",
+                      "_destinationName": topicName,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+      .concat(QPID.times(10,
+        {
+          "_name": "consumingClient-__INDEX",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_consumers": [
+                    {
+                      "_name": "Consumer-__INDEX",
+                      "_destinationName": topicName,
+                      "_maximumDuration": duration,
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        "__INDEX"))
+    }]
+};
+

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js Thu Jul  5 14:56:45 2012
@@ -0,0 +1,64 @@
+var jsonObject = {
+    _tests:[]
+};
+
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic.1'";
+
+var numbersOfConsumers = [1, 10, 50, 100];
+
+for(i=0; i < numbersOfConsumers.length ; i++)
+{
+    var numberOfConsumers = numbersOfConsumers[i];
+    var test = {
+      "_name": numberOfConsumers,
+      "_clients":[
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_producers": [
+                    {
+                      "_name": "Producer1",
+                      "_destinationName": topicName,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ].concat(QPID.times(numberOfConsumers,
+        {
+          "_name": "consumingClient-__INDEX",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_consumers": [
+                    {
+                      "_name": "Consumer-__INDEX",
+                      "_destinationName": topicName,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        "__INDEX"))
+    };
+
+    jsonObject._tests= jsonObject._tests.concat(test);
+}
+

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js Thu Jul  5 14:56:45 2012
@@ -0,0 +1,69 @@
+var jsonObject = {
+    _tests:[]
+};
+
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic.__INDEX'";
+
+var numbersOfTopics = [1, 10, 50, 100];
+
+// Each test has n pairs of producers and consumers, each with a different topic
+
+for(i=0; i < numbersOfTopics.length ; i++)
+{
+    var numberOfTopics = numbersOfTopics[i];
+    var test = {
+      "_name": numberOfTopics,
+      "_clients":
+        QPID.times(numberOfTopics,
+            {
+              "_name": "producingClient-__INDEX",
+              "_connections":[
+                {
+                  "_name": "connection1",
+                  "_factory": "connectionfactory",
+                  "_sessions": [
+                    {
+                      "_sessionName": "session1",
+                      "_producers": [
+                        {
+                          "_name": "Producer-__INDEX",
+                          "_destinationName": topicName,
+                          "_maximumDuration": duration
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            },
+            "__INDEX")
+        .concat(
+        QPID.times(numberOfTopics,
+            {
+              "_name": "consumingClient-__INDEX",
+              "_connections":[
+                {
+                  "_name": "connection1",
+                  "_factory": "connectionfactory",
+                  "_sessions": [
+                    {
+                      "_sessionName": "session1",
+                      "_consumers": [
+                        {
+                          "_name": "Consumer-__INDEX",
+                          "_destinationName": topicName,
+                          "_maximumDuration": duration
+                        }
+                      ]
+                    }
+                  ]
+                }
+              ]
+            },
+            "__INDEX"))
+    };
+
+    jsonObject._tests= jsonObject._tests.concat(test);
+}
+

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-Persistence.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-Persistence.js?rev=1357650&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-Persistence.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/Topic-Persistence.js Thu Jul  5 14:56:45 2012
@@ -0,0 +1,69 @@
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic'";
+
+var jsonObject = {
+    _tests: [
+    {
+      "_name": "Topic persistence",
+      "_iterations": [
+        // note that we use _durableSubscription (the JaveBeans property name)
+        // rather than _isDurableSubscription (the field name)
+        {
+          "_deliveryMode": 1,
+          "_durableSubscription": false
+        },
+        {
+          "_deliveryMode": 2,
+          "_durableSubscription": true
+        }
+      ],
+      "_clients": [
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_producers": [
+                    {
+                      "_name": "Producer",
+                      "_destinationName": topicName,
+                      "_maximumDuration": duration,
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+      .concat(QPID.times(10,
+        {
+          "_name": "consumingClient-__INDEX",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_consumers": [
+                    {
+                      "_name": "Consumer-__INDEX",
+                      "_destinationName": topicName,
+                      "_isTopic": true,
+                      "_maximumDuration": duration,
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        "__INDEX"))
+    }]
+};
+

Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/Client.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/Client.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/Client.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/Client.java Thu Jul  5 14:56:45 2012
@@ -176,7 +176,7 @@ public class Client
         {
             LOGGER.debug("Tearing down test on client: " + _clientJmsDelegate.getClientName());
 
-            _clientJmsDelegate.closeTestConnections();
+            _clientJmsDelegate.tearDownTest();
         }
         else
         {

Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/config/QueueConfig.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/config/QueueConfig.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/config/QueueConfig.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/config/QueueConfig.java Thu Jul  5 14:56:45 2012
@@ -38,7 +38,6 @@ public class QueueConfig
 
     public QueueConfig(String name, boolean durable, Map<String, Object> attributes)
     {
-        super();
         this._name = name;
         this._durable = durable;
         this._attributes = attributes;
@@ -49,8 +48,6 @@ public class QueueConfig
         return _name;
     }
 
-    // TODO x-qpid-capacity and x-qpid-flow-resume-capacity need to be typed as numeric but we currrently
-    // pass these as a string.
     public Map<String, Object> getAttributes()
     {
         return _attributes;

Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/jms/ClientJmsDelegate.java Thu Jul  5 14:56:45 2012
@@ -35,6 +35,7 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import javax.jms.Topic;
 import javax.naming.Context;
 import javax.naming.NamingException;
 
@@ -72,6 +73,7 @@ public class ClientJmsDelegate
     private Map<String, Session> _testSessions;
     private Map<String, MessageProducer> _testProducers;
     private Map<String, MessageConsumer> _testConsumers;
+    private Map<String, Session> _testSubscriptions;
     private Map<String, MessageProvider> _testMessageProviders;
 
     private final MessageProvider _defaultMessageProvider;
@@ -92,6 +94,7 @@ public class ClientJmsDelegate
             _testSessions = new HashMap<String, Session>();
             _testProducers = new HashMap<String, MessageProducer>();
             _testConsumers = new HashMap<String, MessageConsumer>();
+            _testSubscriptions = new HashMap<String, Session>();
             _testMessageProviders = new HashMap<String, MessageProvider>();
             _defaultMessageProvider = new MessageProvider(null);
         }
@@ -255,9 +258,31 @@ public class ClientJmsDelegate
 
             synchronized(session)
             {
-                final Destination destination = command.isTopic() ? session.createTopic(command.getDestinationName())
-                                                    : session.createQueue(command.getDestinationName());
-                final MessageConsumer jmsConsumer = session.createConsumer(destination, command.getSelector());
+                Destination destination;
+                MessageConsumer jmsConsumer;
+                if(command.isTopic())
+                {
+                    Topic topic = session.createTopic(command.getDestinationName());
+                    if(command.isDurableSubscription())
+                    {
+                        String subscription = "subscription-" + command.getParticipantName() + System.currentTimeMillis();
+                        jmsConsumer = session.createDurableSubscriber(topic, subscription);
+
+                        _testSubscriptions.put(subscription, session);
+                        LOGGER.debug("created durable suscription " + subscription + " to topic " + topic);
+                    }
+                    else
+                    {
+                        jmsConsumer = session.createConsumer(topic, command.getSelector());
+                    }
+
+                    destination = topic;
+                }
+                else
+                {
+                    destination = session.createQueue(command.getDestinationName());
+                    jmsConsumer = session.createConsumer(destination, command.getSelector());
+                }
 
                 _testConsumers.put(command.getParticipantName(), jmsConsumer);
             }
@@ -521,36 +546,59 @@ public class ClientJmsDelegate
         return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("clientName", _clientName).toString();
     }
 
-    public void closeTestConnections()
+    public void tearDownTest()
     {
         StringBuilder jmsErrorMessages = new StringBuilder();
-        int failedCloseCounter = 0;
-        for (final Map.Entry<String, Connection> entry : _testConnections.entrySet())
+        int failureCounter = 0;
+
+        for(String subscription : _testSubscriptions.keySet())
         {
-            final Connection connection = entry.getValue();
+            Session session = _testSubscriptions.get(subscription);
+            try
+            {
+                session.unsubscribe(subscription);
+            }
+            catch (JMSException e)
+            {
+                LOGGER.error("Failed to unsubscribe '" + subscription + "' :" + e.getLocalizedMessage(), e);
+                failureCounter++;
+                appendErrorMessage(jmsErrorMessages, e);
+            }
+        }
+
+        for (Map.Entry<String, Connection> entry : _testConnections.entrySet())
+        {
+            Connection connection = entry.getValue();
             try
             {
                 connection.close();
             }
-            catch (final JMSException e)
+            catch (JMSException e)
             {
                 LOGGER.error("Failed to close connection '" + entry.getKey() + "' :" + e.getLocalizedMessage(), e);
-                failedCloseCounter++;
-                if (jmsErrorMessages.length() > 0)
-                {
-                    jmsErrorMessages.append('\n');
-                }
-                jmsErrorMessages.append(e.getMessage());
+                failureCounter++;
+                appendErrorMessage(jmsErrorMessages, e);
             }
         }
+
         _testConnections.clear();
         _testSessions.clear();
         _testProducers.clear();
         _testConsumers.clear();
-        if (failedCloseCounter > 0)
+
+        if (failureCounter > 0)
+        {
+            throw new DistributedTestException("Tear down test encountered " + failureCounter + " failures with the following errors: " + jmsErrorMessages.toString());
+        }
+    }
+
+    private void appendErrorMessage(StringBuilder errorMessages, JMSException e)
+    {
+        if (errorMessages.length() > 0)
         {
-            throw new DistributedTestException("Close failed for " + failedCloseCounter + " connection(s) with the following errors: " + jmsErrorMessages.toString());
+            errorMessages.append('\n');
         }
+        errorMessages.append(e.getMessage());
     }
 
     public void closeTestConsumer(String consumerName)

Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java Thu Jul  5 14:56:45 2012
@@ -25,6 +25,7 @@ import java.util.TreeSet;
 
 import org.apache.qpid.disttest.message.ConsumerParticipantResult;
 import org.apache.qpid.disttest.message.ParticipantResult;
+import org.apache.qpid.disttest.message.ProducerParticipantResult;
 
 public class ParticipantResultAggregator
 {
@@ -43,6 +44,9 @@ public class ParticipantResultAggregator
     private NavigableSet<Integer> _encounteredIterationNumbers = new TreeSet<Integer>();
     private NavigableSet<Integer> _encounteredBatchSizes = new TreeSet<Integer>();
     private NavigableSet<Integer> _encounteredAcknowledgeMode = new TreeSet<Integer>();
+    private NavigableSet<Integer> _encounteredDeliveryModes = new TreeSet<Integer>();
+    private NavigableSet<Boolean> _encounteredDurableSubscriptions = new TreeSet<Boolean>();
+    private NavigableSet<Boolean> _encounteredTopics = new TreeSet<Boolean>();
     private NavigableSet<String> _encountedTestNames = new TreeSet<String>();
 
     private SeriesStatistics _latencyStatistics = new SeriesStatistics();
@@ -116,6 +120,17 @@ public class ParticipantResultAggregator
         _encounteredIterationNumbers.add(result.getIterationNumber());
         _encounteredBatchSizes.add(result.getBatchSize());
         _encounteredAcknowledgeMode.add(result.getAcknowledgeMode());
+        if (result instanceof ProducerParticipantResult)
+        {
+            ProducerParticipantResult producerParticipantResult = (ProducerParticipantResult) result;
+            _encounteredDeliveryModes.add(producerParticipantResult.getDeliveryMode());
+        }
+        else if(result instanceof ConsumerParticipantResult)
+        {
+            ConsumerParticipantResult consumerParticipantResult = (ConsumerParticipantResult)result;
+            _encounteredDurableSubscriptions.add(consumerParticipantResult.isDurableSubscription());
+            _encounteredTopics.add(consumerParticipantResult.isTopic());
+        }
     }
 
     private void setComputedVariableAttributes(ParticipantResult aggregatedResult)
@@ -151,6 +166,26 @@ public class ParticipantResultAggregator
         {
             aggregatedResult.setAcknowledgeMode(_encounteredAcknowledgeMode.first());
         }
+        if (aggregatedResult instanceof ProducerParticipantResult)
+        {
+            ProducerParticipantResult producerParticipantResult = (ProducerParticipantResult) aggregatedResult;
+            if(_encounteredDeliveryModes.size() == 1)
+            {
+                producerParticipantResult.setDeliveryMode(_encounteredDeliveryModes.first());
+            }
+        }
+        if (aggregatedResult instanceof ConsumerParticipantResult)
+        {
+            ConsumerParticipantResult consumerParticipantResult = (ConsumerParticipantResult) aggregatedResult;
+            if(_encounteredDurableSubscriptions.size() == 1)
+            {
+                consumerParticipantResult.setDurableSubscription(_encounteredDurableSubscriptions.first());
+            }
+            if(_encounteredTopics.size() == 1)
+            {
+                consumerParticipantResult.setTopic(_encounteredTopics.first());
+            }
+        }
     }
 
     private double calculateThroughputInKiloBytesPerSecond()

Modified: qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ClientTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ClientTest.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ClientTest.java (original)
+++ qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ClientTest.java Thu Jul  5 14:56:45 2012
@@ -125,7 +125,7 @@ public class ClientTest extends TestCase
 
         _client.tearDownTest();
 
-        verify(_delegate).closeTestConnections();
+        verify(_delegate).tearDownTest();
 
         verify(_participantRegistry).clear();
     }

Modified: qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/IterationValueTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/IterationValueTest.java?rev=1357650&r1=1357649&r2=1357650&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/IterationValueTest.java (original)
+++ qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/controller/config/IterationValueTest.java Thu Jul  5 14:56:45 2012
@@ -22,19 +22,19 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyZeroInteractions;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
+import org.apache.qpid.disttest.message.CreateConnectionCommand;
 import org.apache.qpid.disttest.message.CreateConsumerCommand;
-import org.apache.qpid.disttest.message.CreateProducerCommand;
+import org.apache.qpid.test.utils.QpidTestCase;
 
-public class IterationValueTest extends TestCase
+public class IterationValueTest extends QpidTestCase
 {
-    private static final int MESSAGE_SIZE = 10;
+    private static final int MAXIMUM_DURATION = 10;
+
+    private static final boolean IS_DURABLE_SUBSCRIPTION = true;
 
-    private CreateProducerCommand _createProducerCommand;
     private CreateConsumerCommand _createConsumerCommand;
     private Map<String, String> _iterationValueMap;
 
@@ -42,37 +42,40 @@ public class IterationValueTest extends 
     protected void setUp() throws Exception
     {
         super.setUp();
-        _createProducerCommand = mock(CreateProducerCommand.class);
         _createConsumerCommand = mock(CreateConsumerCommand.class);
 
-        _iterationValueMap = Collections.singletonMap("_messageSize", String.valueOf(MESSAGE_SIZE));
+        _iterationValueMap = new HashMap<String, String>();
+        _iterationValueMap.put("_maximumDuration", String.valueOf(MAXIMUM_DURATION));
+        _iterationValueMap.put("_durableSubscription", String.valueOf(IS_DURABLE_SUBSCRIPTION));
     }
 
     public void testApplyPopulatedIterationValueToCommandWithMatchingProperties() throws Exception
     {
         IterationValue iterationValue = new IterationValue(_iterationValueMap);
 
-        iterationValue.applyToCommand(_createProducerCommand);
+        iterationValue.applyToCommand(_createConsumerCommand);
 
-        verify(_createProducerCommand).setMessageSize(MESSAGE_SIZE);
+        verify(_createConsumerCommand).setMaximumDuration(MAXIMUM_DURATION);
+        verify(_createConsumerCommand).setDurableSubscription(IS_DURABLE_SUBSCRIPTION);
     }
 
     public void testApplyPopulatedIterationValueToCommandWithoutMatchingProperties() throws Exception
     {
         IterationValue iterationValue = new IterationValue(_iterationValueMap);
 
-        iterationValue.applyToCommand(_createConsumerCommand);
+        CreateConnectionCommand createConnectionCommand = mock(CreateConnectionCommand.class);
+        iterationValue.applyToCommand(createConnectionCommand);
 
-        verifyZeroInteractions(_createConsumerCommand);
+        verifyZeroInteractions(createConnectionCommand);
     }
 
     public void testApplyUnpopulatedIterationValueToCommand() throws Exception
     {
         IterationValue iterationValue = new IterationValue();
 
-        iterationValue.applyToCommand(_createProducerCommand);
+        iterationValue.applyToCommand(_createConsumerCommand);
 
-        verifyZeroInteractions(_createProducerCommand);
+        verifyZeroInteractions(_createConsumerCommand);
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org