Author: kwall
Date: Tue Dec 15 11:39:24 2015
New Revision: 1720121

URL: http://svn.apache.org/viewvc?rev=1720121&view=rev
Log:
QPID-6852: Allow perftests to be conveniently run against AMQP 1.0 client

Added:
    qpid/java/trunk/perftests/etc/perftests-jndi-qpid-jms-client.properties
Modified:
    qpid/java/trunk/perftests/etc/testdefs/defaultTests.js
    qpid/java/trunk/perftests/pom.xml
    
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/AbstractRunner.java

Added: qpid/java/trunk/perftests/etc/perftests-jndi-qpid-jms-client.properties
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/perftests/etc/perftests-jndi-qpid-jms-client.properties?rev=1720121&view=auto
==============================================================================
--- qpid/java/trunk/perftests/etc/perftests-jndi-qpid-jms-client.properties 
(added)
+++ qpid/java/trunk/perftests/etc/perftests-jndi-qpid-jms-client.properties Tue 
Dec 15 11:39:24 2015
@@ -0,0 +1,35 @@
+#
+#
+# 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.
+#
+#
+
+brokerHostPortPlain=localhost:5672
+brokerHostPortSsl=localhost:5671
+perftestResultsDirectory=perftestResultsDb
+
+
+# jms.receiveLocalOnly=true works around QPIDJMS-139
+connectionfactory.connectionfactory = 
amqp://localhost:5672/?jms.username=guest&jms.password=guest&jms.receiveLocalOnly=true
+#connectionfactory.sslconnectionfactory = 
amqp://${brokerHostPortSsl}/?jms.username=guest&jms.password=guest
+
+queue.controllerqueue = controllerqueue
+
+jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
+# writes to a results database in ./perftestResultsDb by default.
+jdbcUrl=jdbc:derby:${perftestResultsDirectory};create=true

Modified: qpid/java/trunk/perftests/etc/testdefs/defaultTests.js
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/perftests/etc/testdefs/defaultTests.js?rev=1720121&r1=1720120&r2=1720121&view=diff
==============================================================================
--- qpid/java/trunk/perftests/etc/testdefs/defaultTests.js (original)
+++ qpid/java/trunk/perftests/etc/testdefs/defaultTests.js Tue Dec 15 11:39:24 
2015
@@ -96,7 +96,7 @@ function createTest(name, numberOfPartic
   for(var i=0; i < numberOfParticipantPairs; i++)
   {
     var queueName = "testQueue_" + i;
-    var destination = "BURL:direct:////" + queueName + "?durable='true'";
+    var destination = queueName;
     test._queues.push({"_name": destination, "_durable": true});
 
     test._clients.push({"_name": "producingClient_" + i,

Modified: qpid/java/trunk/perftests/pom.xml
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/perftests/pom.xml?rev=1720121&r1=1720120&r2=1720121&view=diff
==============================================================================
--- qpid/java/trunk/perftests/pom.xml (original)
+++ qpid/java/trunk/perftests/pom.xml Tue Dec 15 11:39:24 2015
@@ -49,6 +49,8 @@
     
<qpid.disttest.hillclimb.production_to_target_ratio_success_threshold>0.95</qpid.disttest.hillclimb.production_to_target_ratio_success_threshold>
     
<qpid.disttest.hillclimb.consumption_to_production_ratio_success_threshold>0.95</qpid.disttest.hillclimb.consumption_to_production_ratio_success_threshold>
     
<qpid.disttest.hillclimb.minimum_delta>1.0</qpid.disttest.hillclimb.minimum_delta>
+
+    <qpid-jms-client-version>0.6.0</qpid-jms-client-version>
   </properties>
 
   <dependencies>
@@ -208,6 +210,10 @@
               <key>qpid.close_timeout</key>
               <value>${qpid.close_timeout}</value>
             </systemProperty>
+            <systemProperty>
+               <key>java.naming.factory.initial</key>
+               
<value>org.apache.qpid.jndi.PropertiesFileInitialContextFactory</value>
+            </systemProperty>
           </systemProperties>
         </configuration>
       </plugin>
@@ -225,4 +231,75 @@
       </plugin>
     </plugins>
   </build>
+  <profiles>
+
+    <profile>
+      <id>qpid-jms-client</id>
+      <activation>
+        <property>
+          <name>client</name>
+          <value>qpid-jms-client</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>exec-maven-plugin</artifactId>
+            <version>${exec-maven-plugin-version}</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>java</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <mainClass>org.apache.qpid.disttest.ControllerRunner</mainClass>
+              <arguments>
+                
<argument>jndi-config=${basedir}/etc/perftests-jndi-qpid-jms-client.properties</argument>
+                <argument>test-config=${qpid.disttest.test_config}</argument>
+                <argument>distributed=false</argument>
+                <argument>writeToDb=false</argument>
+                <argument>hill-climb=${qpid.disttest.hillclimb}</argument>
+                
<argument>hill-climber.max-runs=${qpid.disttest.hillclimb.max_runs}</argument>
+                
<argument>hill-climber.start-target-rate=${qpid.disttest.hillclimb.start_target_rate}</argument>
+                
<argument>hill-climber.production-to-target-ratio-success-threshold=${qpid.disttest.hillclimb.production_to_target_ratio_success_threshold}</argument>
+                
<argument>hill-climber.consumption-to-production-ratio-success-threshold=${qpid.disttest.hillclimb.consumption_to_production_ratio_success_threshold}</argument>
+                
<argument>hill-climber.minimum-delta=${qpid.disttest.hillclimb.minimum_delta}</argument>
+              </arguments>
+              <classpathScope>compile</classpathScope>
+              <systemProperties>
+                <systemProperty>
+                  <key>qpid.disttest.loglevel</key>
+                  <value>${qpid.disttest.loglevel}</value>
+                </systemProperty>
+                <systemProperty>
+                  <key>qpid.disttest.duration</key>
+                  <value>${qpid.disttest.duration}</value>
+                </systemProperty>
+                <systemProperty>
+                  <key>java.naming.factory.initial</key>
+                  
<value>org.apache.qpid.jms.jndi.JmsInitialContextFactory</value>
+                </systemProperty>
+                <systemProperty>
+                  <key>qpid.disttest.queue.creator.class</key>
+                  
<value>org.apache.qpid.disttest.jms.ExistingQueueDrainer</value>
+                </systemProperty>
+              </systemProperties>
+            </configuration>
+          </plugin>
+
+        </plugins>
+      </build>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.qpid</groupId>
+          <artifactId>qpid-jms-client</artifactId>
+          <version>${qpid-jms-client-version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+
 </project>

Modified: 
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/AbstractRunner.java
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/AbstractRunner.java?rev=1720121&r1=1720120&r2=1720121&view=diff
==============================================================================
--- 
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/AbstractRunner.java
 (original)
+++ 
qpid/java/trunk/perftests/src/main/java/org/apache/qpid/disttest/AbstractRunner.java
 Tue Dec 15 11:39:24 2015
@@ -46,7 +46,10 @@ public class AbstractRunner
         Hashtable env = new Hashtable();
         env.put(Context.PROVIDER_URL, jndiConfig);
         // Java allows this to be overridden with a system property of the 
same name
-        env.put(InitialContext.INITIAL_CONTEXT_FACTORY, 
"org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
+        if 
(!System.getProperties().containsKey(InitialContext.INITIAL_CONTEXT_FACTORY))
+        {
+            env.put(InitialContext.INITIAL_CONTEXT_FACTORY, 
"org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
+        }
 
         try
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to