activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1450824 - in /activemq/trunk: activemq-karaf-itest/ activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/ activemq-karaf/src/main/resources/ activemq-osgi/
Date Wed, 27 Feb 2013 16:02:29 GMT
Author: gtully
Date: Wed Feb 27 16:02:28 2013
New Revision: 1450824

URL: http://svn.apache.org/r1450824
Log:
https://issues.apache.org/jira/browse/AMQ-4341 - some more tweaks and tests from the feedback

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-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
    activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdWebConsoleFeatureTest.java
    activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java
    activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
    activemq/trunk/activemq-karaf/src/main/resources/features.xml
    activemq/trunk/activemq-osgi/pom.xml

Modified: activemq/trunk/activemq-karaf-itest/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/pom.xml?rev=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/pom.xml (original)
+++ activemq/trunk/activemq-karaf-itest/pom.xml Wed Feb 27 16:02:28 2013
@@ -144,6 +144,15 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.camel.karaf</groupId>
+      <artifactId>apache-camel</artifactId>
+      <version>${camel-version}</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+      <scope>test</scope>
+    </dependency>
+
     <!-- test and logging -->
     <dependency>
       <groupId>junit</groupId>

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=1450824&r1=1450823&r2=1450824&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
Wed Feb 27 16:02:28 2013
@@ -54,7 +54,7 @@ public abstract class AbstractFeatureTes
 
     private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureTest.class);
     private static final long ASSERTION_TIMEOUT = 20000L;
-    private static final long COMMAND_TIMEOUT = 10000L;
+    private static final long COMMAND_TIMEOUT = 30000L;
     public static final String USER = "karaf";
     public static final String PASSWORD = "karaf";
 
@@ -164,7 +164,14 @@ public abstract class AbstractFeatureTes
         return mavenBundle().groupId("org.apache.activemq").
             artifactId("activemq-karaf").versionAsInProject().type(type);
     }
-    
+
+    // for use from a probe
+    public String getCamelFeatureUrl() {
+        return "mvn:org.apache.camel.karaf/apache-camel/"
+        + System.getProperty("camel.version", "unknown")
+        + "/xml/features";
+    }
+
     public static UrlReference getKarafFeatureUrl() {
         LOG.info("*** The karaf version is " + karafVersion() + " ***");
 
@@ -192,8 +199,6 @@ public abstract class AbstractFeatureTes
     public static Option[] configure(String ...features) {
 
         ArrayList<String> f = new ArrayList<String>();
-        // install the cxf jaxb spec as the karaf doesn't provide it by default
-        // f.add("cxf-jaxb");
         f.addAll(Arrays.asList(features));
 
         Option[] options =
@@ -205,10 +210,9 @@ public abstract class AbstractFeatureTes
                     .unpackDirectory(new File("target/paxexam/unpack/")),
                 
                 KarafDistributionOption.keepRuntimeFolder(),
-                // override the config.properties (to fix pax-exam bug)
+                //logLevel(LogLevelOption.LogLevel.DEBUG),
                 replaceConfigurationFile("etc/config.properties", new File(basedir+"/src/test/resources/org/apache/activemq/karaf/itest/config.properties")),
                 replaceConfigurationFile("etc/custom.properties", new File(basedir+"/src/test/resources/org/apache/activemq/karaf/itest/custom.properties")),
-                //replaceConfigurationFile("etc/org.ops4j.pax.logging.cfg", new File(basedir+"/src/test/resources/org/apache/activemq/karaf/itest/org.ops4j.pax.logging.cfg")),
                 scanFeatures(getActiveMQKarafFeatureUrl(), f.toArray(new String[f.size()]))};
 
         return options;

Modified: 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=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
(original)
+++ activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java
Wed Feb 27 16:02:28 2013
@@ -36,7 +36,7 @@ public class ActiveMQBrokerFeatureTest e
 
     @Configuration
     public static Option[] configure() {
-        return configureBrokerStart(configure("activemq-broker"));
+        return configureBrokerStart(configure("activemq"));
     }
 
     @Test

Modified: activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdWebConsoleFeatureTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdWebConsoleFeatureTest.java?rev=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdWebConsoleFeatureTest.java
(original)
+++ activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdWebConsoleFeatureTest.java
Wed Feb 27 16:02:28 2013
@@ -40,7 +40,7 @@ public class ActiveMQBrokerNdWebConsoleF
     public static Option[] configure() {
         return append(CoreOptions.mavenBundle("commons-codec", "commons-codec").versionAsInProject(),
                 append(CoreOptions.mavenBundle("commons-httpclient", "commons-httpclient").versionAsInProject(),
-                configureBrokerStart(configure("activemq-broker"))));
+                configure("activemq-broker")));
     }
 
     @Override

Modified: activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java?rev=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java
(original)
+++ activemq/trunk/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java
Wed Feb 27 16:02:28 2013
@@ -18,17 +18,23 @@ package org.apache.activemq.karaf.itest;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.MavenUtils;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
 
+import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
+
 @RunWith(JUnit4TestRunner.class)
 public class ObrFeatureTest extends AbstractFeatureTest {
 
 	@Configuration
 	public static Option[] configure() {
-		return configure("obr");
+		return append(
+                editConfigurationFilePut("etc/system.properties", "camel.version", MavenUtils.getArtifactVersion("org.apache.camel.karaf",
"apache-camel")),
+                configure("obr"));
 	}
 
 	@Test
@@ -36,8 +42,19 @@ public class ObrFeatureTest extends Abst
 		installAndAssertFeature("activemq-client");
 	}
 
-	//@Test
-	public void testBroker() throws Throwable {
-		installAndAssertFeature("activemq-broker");
+	@Test
+	public void testActiveMQ() throws Throwable {
+		installAndAssertFeature("activemq");
 	}
+
+    @Test
+   	public void testBroker() throws Throwable {
+   		installAndAssertFeature("activemq-broker");
+   	}
+
+    @Test
+   	public void testCamel() throws Throwable {
+        System.err.println(executeCommand("features:addurl " + getCamelFeatureUrl()));
+   		installAndAssertFeature("activemq-camel");
+   	}
 }

Modified: activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml?rev=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
(original)
+++ activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml
Wed Feb 27 16:02:28 2013
@@ -49,7 +49,7 @@
         </managementContext>
 
         <persistenceAdapter>
-            <kahaDB directory="${data}/kahadb"/>
+            <levelDB directory="${data}/leveldb"/>
         </persistenceAdapter>
 
         <plugins>
@@ -72,6 +72,8 @@
 
         <transportConnectors>
             <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000"/>
+            <transportConnector name="http" uri="http://0.0.0.0:61666"/>
+            <transportConnector name="amqp" uri="amqp://0.0.0.0:61676"/>
         </transportConnectors>
     </broker>
 

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=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-karaf/src/main/resources/features.xml (original)
+++ activemq/trunk/activemq-karaf/src/main/resources/features.xml Wed Feb 27 16:02:28 2013
@@ -37,8 +37,9 @@
     <!-- All bundles needed by the broker -->
     <feature name="activemq" description="ActiveMQ broker libraries" version="${project.version}"
resolver="(obr)" start-level="50">
       <feature>jetty</feature>
-      <feature>spring-dm</feature>
       <feature version="${project.version}">activemq-client</feature>
+      <bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle>
+      <bundle dependency="true">mvn:org.apache.xbean/xbean-spring/${xbean-version}</bundle>
       <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>
@@ -56,7 +57,6 @@
       <bundle dependency="true">mvn:org.codehaus.jettison/jettison/${jettison-version}</bundle>
       <bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson-version}</bundle>
       <bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson-version}</bundle>
-      <bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle>
       <bundle dependency="true">mvn:org.scala-lang/scala-library/${scala-version}</bundle>
     </feature>
 

Modified: activemq/trunk/activemq-osgi/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-osgi/pom.xml?rev=1450824&r1=1450823&r2=1450824&view=diff
==============================================================================
--- activemq/trunk/activemq-osgi/pom.xml (original)
+++ activemq/trunk/activemq-osgi/pom.xml Wed Feb 27 16:02:28 2013
@@ -53,18 +53,18 @@
   	  org.jasypt*;resolution:=optional,
   	  org.eclipse.jetty*;resolution:=optional,
   	  org.springframework.jms*;version="[3,4]";resolution:=optional,
-  	  org.springframework.osgi*;version="[3,4]";resolution:=optional,
+  	  org.springframework.osgi*;version="[1.2,1.3]";resolution:=optional,
   	  org.springframework.transaction*;version="[3,4]";resolution:=optional,
   	  org.xmlpull*;resolution:=optional,
   	  scala*;resolution:=optional,
+      org.springframework*;version="[3,4]";resolution:=optional,
+      org.apache.xbean.spring*,
   	  javax.annotation*,
   	  javax.jms*,
-  	  javax.management
+  	  javax.management*,
   	  javax.transaction*,
   	  org.apache.commons.pool*,
   	  org.apache.commons.net*,
-  	  org.apache.xbean.spring*,
-  	  org.springframework*;version="[3,4]";resolution:=optional,
 	  *
     </activemq.osgi.import.pkg>
     <activemq.osgi.export>



Mime
View raw message