activemq git commit: Initial Version of activemq-junit
Repository: activemq Updated Branches: refs/heads/activemq-5.13.x 6abb5b9be -> 57b65dc8e Initial Version of activemq-junit Added configure method to EmbeddedActiveMQBroker Added support for XBean configuration (cherry picked from commit da3b1380234c5d1745094f883778f19e58fe9cee) Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/57b65dc8 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/57b65dc8 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/57b65dc8 Branch: refs/heads/activemq-5.13.x Commit: 57b65dc8efc4e2bf713a432d3da3cb72cdeb Parents: 6abb5b9 Author: Quinn Stevenson Authored: Wed Dec 23 13:29:06 2015 -0700 Committer: Christopher L. Shannon (cshannon) Committed: Mon Jan 18 15:31:01 2016 + -- activemq-tooling/activemq-junit/pom.xml | 70 .../activemq/junit/EmbeddedActiveMQBroker.java | 404 +++ .../junit/EmbeddedActiveMQBrokerConfigTest.java | 110 + .../junit/EmbeddedActiveMQBrokerRuleTest.java | 43 ++ ...mbeddedActiveMQBrokerXbeanUriConfigTest.java | 108 + .../MultipleEmbeddedActiveMQBrokerRuleTest.java | 60 +++ .../src/test/resources/activemq-simple.xml | 28 ++ activemq-tooling/pom.xml| 1 + 8 files changed, 824 insertions(+) -- http://git-wip-us.apache.org/repos/asf/activemq/blob/57b65dc8/activemq-tooling/activemq-junit/pom.xml -- diff --git a/activemq-tooling/activemq-junit/pom.xml b/activemq-tooling/activemq-junit/pom.xml new file mode 100644 index 000..33f8366 --- /dev/null +++ b/activemq-tooling/activemq-junit/pom.xml @@ -0,0 +1,70 @@ + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + + 4.0.0 + + +org.apache.activemq.tooling +activemq-tooling +5.14-SNAPSHOT + + + activemq-junit + ActiveMQ :: JUnit Rule + + JUnit Rule for Embedded ActiveMQ Brokers + + + + org.apache.activemq + activemq-broker + ${project.version} + provided + + + org.springframework + spring-context + provided + + + org.apache.activemq + activemq-spring + ${project.version} + provided + + + org.apache.activemq + activemq-pool + ${project.version} + provided + + + junit + junit + provided + + + + org.slf4j + slf4j-simple + ${slf4j-version} + test + + + + http://git-wip-us.apache.org/repos/asf/activemq/blob/57b65dc8/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java -- diff --git a/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java new file mode 100644 index 000..3e328e8 --- /dev/null +++ b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java @@ -0,0 +1,404 @@ +/* + * 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.junit; + +import java.net.URI; + +import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.activemq.broker.BrokerFactory; +import org.apache.activemq.broker.BrokerPlugin; +import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.broker.region.Destination; +import org.apache.activemq.broker.region.Queue; +import org.apache.activemq.broker.region.Topic; +import org.apache.activemq.broker.region.policy.PolicyEntry; +import org.apache.activemq.broker.region.policy.PolicyMap; +import org.apache.activemq.plugin.StatisticsBrokerPlugin; +import org.apache.activemq.pool.PooledConnectionFactory; +import org.junit.rules.ExternalResource; +import org.slf4j.Logger; +import org.slf4j.Log
[1/2] activemq git commit: Initial Version of activemq-junit
Repository: activemq Updated Branches: refs/heads/master 16bc0f0d7 -> 8317208a1 Initial Version of activemq-junit Added configure method to EmbeddedActiveMQBroker Added support for XBean configuration Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/da3b1380 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/da3b1380 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/da3b1380 Branch: refs/heads/master Commit: da3b1380234c5d1745094f883778f19e58fe9cee Parents: 16bc0f0 Author: Quinn Stevenson Authored: Wed Dec 23 13:29:06 2015 -0700 Committer: Christopher L. Shannon (cshannon) Committed: Wed Jan 6 15:10:02 2016 + -- activemq-tooling/activemq-junit/pom.xml | 70 .../activemq/junit/EmbeddedActiveMQBroker.java | 404 +++ .../junit/EmbeddedActiveMQBrokerConfigTest.java | 110 + .../junit/EmbeddedActiveMQBrokerRuleTest.java | 43 ++ ...mbeddedActiveMQBrokerXbeanUriConfigTest.java | 108 + .../MultipleEmbeddedActiveMQBrokerRuleTest.java | 60 +++ .../src/test/resources/activemq-simple.xml | 28 ++ activemq-tooling/pom.xml| 1 + 8 files changed, 824 insertions(+) -- http://git-wip-us.apache.org/repos/asf/activemq/blob/da3b1380/activemq-tooling/activemq-junit/pom.xml -- diff --git a/activemq-tooling/activemq-junit/pom.xml b/activemq-tooling/activemq-junit/pom.xml new file mode 100644 index 000..33f8366 --- /dev/null +++ b/activemq-tooling/activemq-junit/pom.xml @@ -0,0 +1,70 @@ + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> + + 4.0.0 + + +org.apache.activemq.tooling +activemq-tooling +5.14-SNAPSHOT + + + activemq-junit + ActiveMQ :: JUnit Rule + + JUnit Rule for Embedded ActiveMQ Brokers + + + + org.apache.activemq + activemq-broker + ${project.version} + provided + + + org.springframework + spring-context + provided + + + org.apache.activemq + activemq-spring + ${project.version} + provided + + + org.apache.activemq + activemq-pool + ${project.version} + provided + + + junit + junit + provided + + + + org.slf4j + slf4j-simple + ${slf4j-version} + test + + + + http://git-wip-us.apache.org/repos/asf/activemq/blob/da3b1380/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java -- diff --git a/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java new file mode 100644 index 000..3e328e8 --- /dev/null +++ b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java @@ -0,0 +1,404 @@ +/* + * 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.junit; + +import java.net.URI; + +import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.activemq.broker.BrokerFactory; +import org.apache.activemq.broker.BrokerPlugin; +import org.apache.activemq.broker.BrokerService; +import org.apache.activemq.broker.region.Destination; +import org.apache.activemq.broker.region.Queue; +import org.apache.activemq.broker.region.Topic; +import org.apache.activemq.broker.region.policy.PolicyEntry; +import org.apache.activemq.broker.region.policy.PolicyMap; +import org.apache.activemq.plugin.StatisticsBrokerPlugin; +import org.apache.activemq.pool.PooledConnectionFactory; +import org.junit.rules.ExternalResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A JUnit Rule that embeds an ActiveMQ broker into a test. + */ +pub