Author: dejanb
Date: Tue Jan 15 17:29:20 2013
New Revision: 1433543
URL: http://svn.apache.org/viewvc?rev=1433543&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4034 - first stab at karaf integration tests
Added:
activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
Removed:
activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java
Modified:
activemq/trunk/activemq-karaf-itest/pom.xml
activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java
activemq/trunk/activemq-karaf/pom.xml
activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
activemq/trunk/activemq-karaf/src/main/resources/features.xml
activemq/trunk/pom.xml
Modified: activemq/trunk/activemq-karaf-itest/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/pom.xml?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/pom.xml (original)
+++ activemq/trunk/activemq-karaf-itest/pom.xml Tue Jan 15 17:29:20 2013
@@ -31,6 +31,10 @@
<name>ActiveMQ :: Karaf Integration Tests</name>
<description>Performs Karaf compliance integration tests</description>
+ <properties>
+ <pax-exam-version>2.6.0</pax-exam-version>
+ </properties>
+
<dependencies>
<dependency>
@@ -40,6 +44,23 @@
</dependency>
<dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-karaf</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ops4j.pax.logging</groupId>
+ <artifactId>pax-logging-api</artifactId>
+ <version>1.6.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.logging</groupId>
+ <artifactId>pax-logging-service</artifactId>
+ <version>1.6.2</version>
+ </dependency>
+
+ <dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<version>${pax-exam-version}</version>
@@ -137,6 +158,11 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
@@ -145,6 +171,19 @@
<build>
<plugins>
+ <!-- generate dependencies versions -->
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Modified: activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java
(original)
+++ activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java
Tue Jan 15 17:29:20 2013
@@ -140,7 +140,7 @@ public abstract class AbstractFeatureTes
public static UrlReference getActiveMQKarafFeatureUrl() {
String type = "xml/features";
return mavenBundle().groupId("org.apache.activemq").
- artifactId("activemq-karaf").version(activemqVersion()).type(type);
+ artifactId("activemq-karaf").versionAsInProject().type(type);
}
public static UrlReference getKarafFeatureUrl() {
Added: activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java?rev=1433543&view=auto
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
(added)
+++ activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
Tue Jan 15 17:29:20 2013
@@ -0,0 +1,40 @@
+/**
+ * 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.karaf.itest;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+
+@RunWith(JUnit4TestRunner.class)
+public class ActiveMQBrokerFeatureTest extends AbstractFeatureTest {
+
+ @Configuration
+ public static Option[] configure() {
+ return configure("activemq-broker");
+ }
+
+ @Test
+ public void test() throws Exception {
+ ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
+ factory.getBrokerURL();
+ }
+
+}
Modified: activemq/trunk/activemq-karaf/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/pom.xml?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/pom.xml (original)
+++ activemq/trunk/activemq-karaf/pom.xml Tue Jan 15 17:29:20 2013
@@ -36,7 +36,6 @@
<dom4j-bundle-version>1.6.1_2</dom4j-bundle-version>
<xstream-bundle-version>1.3_3</xstream-bundle-version>
<servicemix.specs.version>1.9.0</servicemix.specs.version>
- <pax-exam-version>1.2.4</pax-exam-version>
<karaf-version>2.2.9</karaf-version>
</properties>
@@ -52,27 +51,6 @@
<version>1.6.2</version>
</dependency>
- <!-- Pax-Exam dependencies -->
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
- <version>${pax-exam-version}</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit</artifactId>
- <version>${pax-exam-version}</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-default</artifactId>
- <version>${pax-exam-version}</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit-extender-impl</artifactId>
- <version>${pax-exam-version}</version>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -201,15 +179,6 @@
</instructions>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/KarafIntegrationTest.*</exclude>
- </excludes>
- </configuration>
- </plugin>
</plugins>
</build>
</project>
Modified: activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
(original)
+++ activemq/trunk/activemq-karaf/src/main/java/org/apache/activemq/karaf/commands/ActiveMQCommand.java
Tue Jan 15 17:29:20 2013
@@ -157,4 +157,9 @@ public class ActiveMQCommand extends Abs
return action;
}
+ @Override
+ public Map<String, Completer> getOptionalCompleters() {
+ //TODO implement completers
+ return null;
+ }
}
Modified: activemq/trunk/activemq-karaf/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/src/main/resources/features.xml?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/resources/features.xml (original)
+++ activemq/trunk/activemq-karaf/src/main/resources/features.xml Tue Jan 15 17:29:20 2013
@@ -48,7 +48,7 @@
</feature>
<feature name="activemq-broker" version="${project.version}" resolver="(obr)" start-level="50">
- <feature version="${project.version}">-client</feature>
+ <feature version="${project.version}">activemq-client</feature>
<bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
<bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle>
<bundle dependency="true">mvn:commons-codec/commons-codec/1.4</bundle>
Modified: activemq/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/pom.xml?rev=1433543&r1=1433542&r2=1433543&view=diff
==============================================================================
--- activemq/trunk/pom.xml (original)
+++ activemq/trunk/pom.xml Tue Jan 15 17:29:20 2013
@@ -229,6 +229,7 @@
<module>activemq-osgi</module>
<module>activemq-blueprint</module>
<module>activemq-karaf</module>
+ <module>activemq-karaf-itest</module>
<module>activemq-openwire-generator</module>
<module>activemq-pool</module>
<module>activemq-ra</module>
|