mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4341 - some more tweaks and tests from the feedback
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1450824 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
30b20b3f38
commit
af5f38797d
|
@ -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>
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class AbstractFeatureTest {
|
|||
|
||||
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 AbstractFeatureTest {
|
|||
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 AbstractFeatureTest {
|
|||
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 AbstractFeatureTest {
|
|||
.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;
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ActiveMQBrokerFeatureTest extends AbstractFeatureTest {
|
|||
|
||||
@Configuration
|
||||
public static Option[] configure() {
|
||||
return configureBrokerStart(configure("activemq-broker"));
|
||||
return configureBrokerStart(configure("activemq"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ActiveMQBrokerNdWebConsoleFeatureTest extends ActiveMQBrokerFeature
|
|||
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
|
||||
|
|
|
@ -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 AbstractFeatureTest {
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue