You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2011/11/25 16:57:43 UTC
svn commit: r1206238 - in /activemq/trunk/activemq-karaf: pom.xml
src/test/java/org/ src/test/java/org/apache/
src/test/java/org/apache/activemq/ src/test/java/org/apache/activemq/karaf/
src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java
Author: dejanb
Date: Fri Nov 25 15:57:41 2011
New Revision: 1206238
URL: http://svn.apache.org/viewvc?rev=1206238&view=rev
Log:
first attempt at creating karaf integration test
Added:
activemq/trunk/activemq-karaf/src/test/java/org/
activemq/trunk/activemq-karaf/src/test/java/org/apache/
activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/
activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/
activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java
Modified:
activemq/trunk/activemq-karaf/pom.xml
Modified: activemq/trunk/activemq-karaf/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/pom.xml?rev=1206238&r1=1206237&r2=1206238&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/pom.xml (original)
+++ activemq/trunk/activemq-karaf/pom.xml Fri Nov 25 15:57:41 2011
@@ -37,14 +37,87 @@
<dom4j-bundle-version>1.6.1_2</dom4j-bundle-version>
<xstream-bundle-version>1.3_3</xstream-bundle-version>
<servicemix.specs.version>1.8.0</servicemix.specs.version>
+ <pax-exam-version>1.2.4</pax-exam-version>
</properties>
<dependencies>
+ <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>
+
+ <!-- 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>
+ <version>${slf4j-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.bundlerepository</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.tooling</groupId>
+ <artifactId>org.apache.karaf.tooling.testing</artifactId>
+ <version>${karaf-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>org.apache.karaf.features.command</artifactId>
+ <version>${karaf-version}</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.console</artifactId>
<version>${karaf-version}</version>
</dependency>
+
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
@@ -71,6 +144,17 @@
<artifactId>activemq-pool</artifactId>
</dependency>
+ <!-- used for testing -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+
+
+
+
</dependencies>
<build>
@@ -136,7 +220,16 @@
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
</instructions>
</configuration>
- </plugin>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/KarafIntegrationTest.*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
Added: activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java?rev=1206238&view=auto
==============================================================================
--- activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java (added)
+++ activemq/trunk/activemq-karaf/src/test/java/org/apache/activemq/karaf/KarafIntegrationTest.java Fri Nov 25 15:57:41 2011
@@ -0,0 +1,65 @@
+/**
+ * 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;
+
+import org.apache.karaf.testing.AbstractIntegrationTest;
+import org.apache.karaf.testing.Helper;
+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;
+
+import static org.ops4j.pax.exam.CoreOptions.*;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+
+@RunWith(JUnit4TestRunner.class)
+public class KarafIntegrationTest extends AbstractIntegrationTest {
+
+ @Configuration
+ public static Option[] configuration() throws Exception {
+ return combine(
+ // Default karaf environment
+ Helper.getDefaultOptions(
+ systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG")),
+
+ scanFeatures(
+ maven().groupId("org.apache.activemq").artifactId("activemq-karaf").type("xml").classifier("features").versionAsInProject(),
+ "activemq"
+ ),
+
+ workingDirectory("target/paxrunner/features/"),
+
+ waitForFrameworkStartup(),
+
+ // Test on both equinox and felix
+ equinox(), felix()
+ );
+ }
+
+ @Test
+ public void testFeatures() throws Exception {
+ // Run some commands to make sure they are installed properly
+// CommandProcessor cp = getOsgiService(CommandProcessor.class);
+// CommandSession cs = cp.createSession(System.in, System.out, System.err);
+// Object res = cs.execute("osgi:list");
+// System.out.println(res);
+// cs.close();
+ }
+}