added a soak test for a separate local broker

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@639282 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2008-03-20 13:20:59 +00:00
parent 5d485843b6
commit b3931192fc
3 changed files with 88 additions and 2 deletions

View File

@ -145,8 +145,8 @@
<include>**/*Test.*</include>
</includes>
<excludes>
<!-- lets by default exclude tests requiring local broker -->
<exclude>**/localBroker/**.*</exclude>
</excludes>
</configuration>
</plugin>

View File

@ -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.
*/
package org.apache.activemq.soaktest.localBroker;
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;
/**
* Runs a load test on a separate broker on localhost
*
* @version $Revision: 1.1 $
*/
@ContextConfiguration
public class LocalBrokerLoadTest extends AbstractJUnit38SpringContextTests {
@Autowired
protected CamelContext camelContext;
public void testRun() throws Exception {
MockEndpoint.assertIsSatisfied(camelContext);
}
}

View File

@ -0,0 +1,47 @@
<?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:myDataSet"/>
<to uri="activemq:example.A"/>
</route>
<route>
<from uri="activemq:example.B"/>
<to uri="dataset:myDataSet"/>
</route>
</camelContext>
<bean id="myDataSet" class="org.apache.camel.component.dataset.SimpleDataSet">
<property name="size" value="10000"/>
<property name="reportCount" value="100"/>
</bean>
</beans>
<!-- END SNIPPET: example -->