activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r633580 - in /activemq/trunk/activemq-camel-loadtest: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/activemq/ src/main/java/org/apache/activemq/soaktest/ src/test/ src/test/java/ src/...
Date Tue, 04 Mar 2008 18:42:09 GMT
Author: jstrachan
Date: Tue Mar  4 10:41:49 2008
New Revision: 633580

URL: http://svn.apache.org/viewvc?rev=633580&view=rev
Log:
added a load testing example using the latest camel dataset feature http://cwiki.apache.org/CAMEL/dataset.html

Added:
    activemq/trunk/activemq-camel-loadtest/
    activemq/trunk/activemq-camel-loadtest/pom.xml   (with props)
    activemq/trunk/activemq-camel-loadtest/src/
    activemq/trunk/activemq-camel-loadtest/src/main/
    activemq/trunk/activemq-camel-loadtest/src/main/java/
    activemq/trunk/activemq-camel-loadtest/src/main/java/org/
    activemq/trunk/activemq-camel-loadtest/src/main/java/org/apache/
    activemq/trunk/activemq-camel-loadtest/src/main/java/org/apache/activemq/
    activemq/trunk/activemq-camel-loadtest/src/main/java/org/apache/activemq/soaktest/
    activemq/trunk/activemq-camel-loadtest/src/test/
    activemq/trunk/activemq-camel-loadtest/src/test/java/
    activemq/trunk/activemq-camel-loadtest/src/test/java/org/
    activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/
    activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/
    activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/
    activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java
  (with props)
    activemq/trunk/activemq-camel-loadtest/src/test/resources/
    activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties   (with props)
    activemq/trunk/activemq-camel-loadtest/src/test/resources/org/
    activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/
    activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/
    activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/
    activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml
  (with props)

Added: activemq/trunk/activemq-camel-loadtest/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel-loadtest/pom.xml?rev=633580&view=auto
==============================================================================
--- activemq/trunk/activemq-camel-loadtest/pom.xml (added)
+++ activemq/trunk/activemq-camel-loadtest/pom.xml Tue Mar  4 10:41:49 2008
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.activemq</groupId>
+    <artifactId>activemq-parent</artifactId>
+    <version>5.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>activemq-camel-loadtest</artifactId>
+  <packaging>bundle</packaging>
+  <name>ActiveMQ :: Camel :: Load Test</name>
+  <description>Load testing of the ActiveMQ broker using Camel</description>
+
+  <properties>
+    <camel-test-version>1.3-SNAPSHOT</camel-test-version>
+  </properties>
+
+  <dependencies>
+
+    <!-- ActiveMQ Dependencies -->
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.xbean</groupId>
+      <artifactId>xbean-spring</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jms_1.1_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>activeio-core</artifactId>
+      <optional>false</optional>
+    </dependency>
+    <!-- Camel dependencies -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>${camel-test-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+      <version>${camel-test-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-jms</artifactId>
+      <version>${camel-test-version}</version>
+    </dependency>
+
+
+
+    <!-- for XML parsing -->
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+    </dependency>
+
+    <!-- =============================== -->
+    <!-- Testing Dependencies            -->
+    <!-- =============================== -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- Configure which tests are included/excuded -->
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+          <childDelegation>false</childDelegation>
+          <useFile>true</useFile>
+          <argLine>-Xmx512M</argLine>
+
+          <systemProperties>
+            <property>
+              <name>org.apache.activemq.default.directory.prefix</name>
+              <value>target/</value>
+            </property>
+          </systemProperties>
+
+          <includes>
+            <include>**/*Test.*</include>
+          </includes>
+          <excludes>
+
+
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}/activemq-data</directory>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+
+    </plugins>
+  </build>
+
+</project>

Propchange: activemq/trunk/activemq-camel-loadtest/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/trunk/activemq-camel-loadtest/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java?rev=633580&view=auto
==============================================================================
--- activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java
(added)
+++ activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java
Tue Mar  4 10:41:49 2008
@@ -0,0 +1,37 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.soaktest;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+@ContextConfiguration
+public class LoadTest extends AbstractJUnit38SpringContextTests {
+    @Autowired
+    protected CamelContext camelContext;
+
+    public void testRun() throws Exception {
+        MockEndpoint.assertIsSatisfied(camelContext);
+    }
+}
\ No newline at end of file

Propchange: activemq/trunk/activemq-camel-loadtest/src/test/java/org/apache/activemq/soaktest/LoadTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties?rev=633580&view=auto
==============================================================================
--- activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties (added)
+++ activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties Tue Mar  4
10:41:49 2008
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, stdout
+
+#
+# Uncomment the next line to see the camel dataset endpoint at work
+#
+#log4j.logger.org.apache.camel.component.dataset=DEBUG
+log4j.logger.org.apache.activemq.spring=WARN
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/activemq-test.log
+log4j.appender.out.append=true

Propchange: activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/trunk/activemq-camel-loadtest/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:executable = *

Added: activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml?rev=633580&view=auto
==============================================================================
--- activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml
(added)
+++ activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml
Tue Mar  4 10:41:49 2008
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<!-- START SNIPPET: example -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+       http://activemq.org/config/1.0 http://activemq.apache.org/schema/core/activemq-core-5.0.0.xsd
+    ">
+
+  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
+
+    <route>
+      <from uri="dataset:foo"/>
+      <to uri="activemq:test.queue"/>
+    </route>
+
+    <route>
+      <from uri="activemq:test.queue"/>
+      <to uri="dataset:foo"/>
+    </route>
+
+  </camelContext>
+
+  <bean id="foo" class="org.apache.camel.component.dataset.SimpleDataSet">
+    <property name="size" value="10"/>
+  </bean>
+
+  <!-- lets create an embedded broker for this test -->
+  <broker xmlns="http://activemq.org/config/1.0" dataDirectory="target/activemq">
+
+    <transportConnectors>
+       <transportConnector uri="tcp://localhost:61616"/>
+    </transportConnectors>
+
+  </broker>
+</beans>
+<!-- END SNIPPET: example -->

Propchange: activemq/trunk/activemq-camel-loadtest/src/test/resources/org/apache/activemq/soaktest/LoadTest-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message