You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ro...@apache.org on 2022/08/16 13:43:25 UTC
[activemq-artemis] 01/02: move karaf server feature test to its own module, its logging deps mess with the commons-config handling
This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 4e29a7f48f7aff4f5348c86aed5f57a43bba4ca5
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Tue Aug 16 14:36:00 2022 +0100
move karaf server feature test to its own module, its logging deps mess with the commons-config handling
---
pom.xml | 2 +-
tests/integration-tests/pom.xml | 68 --------
.../mqtt/MQTTInterceptorPropertiesTest.java | 4 +-
.../tests/integration/rest/RestTestBase.java | 2 +-
.../stomp/StompPropertiesInterceptorTest.java | 4 +-
tests/karaf-server-integration-tests/pom.xml | 179 +++++++++++++++++++++
.../integration/karaf/ArtemisFeatureTest.java | 0
tests/pom.xml | 1 +
8 files changed, 186 insertions(+), 74 deletions(-)
diff --git a/pom.xml b/pom.xml
index e70f7cce43..14a51104de 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1312,7 +1312,7 @@
<skipJoramTests>false</skipJoramTests>
<skipCompatibilityTests>false</skipCompatibilityTests>
<testFailureIgnore>false</testFailureIgnore>
- <!-- This enables the karaf-client-integration-tests and
+ <!-- This enables the karaf-<foo>-integration-tests and
integration-tests module tests, see fast-tests profile
in the latter for specific tests it then runs -->
<skipIntegrationTests>false</skipIntegrationTests>
diff --git a/tests/integration-tests/pom.xml b/tests/integration-tests/pom.xml
index 870559818e..30870a48c4 100644
--- a/tests/integration-tests/pom.xml
+++ b/tests/integration-tests/pom.xml
@@ -145,12 +145,6 @@
<artifactId>artemis-test-support</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>artemis-features</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- </dependency>
<dependency>
<groupId>org.apache.activemq.rest</groupId>
<artifactId>artemis-rest</artifactId>
@@ -307,40 +301,6 @@
<scope>test</scope>
</dependency>
- <!-- karaf test -->
-
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-karaf</artifactId>
- <version>${pax.exam.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit4</artifactId>
- <version>${pax.exam.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>apache-karaf</artifactId>
- <version>${karaf.version}</version>
- <type>tar.gz</type>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.karaf.shell</groupId>
- <artifactId>org.apache.karaf.shell.console</artifactId>
- <version>${karaf.version}</version>
- <scope>test</scope>
- </dependency>
-
<!-- rest test -->
<dependency>
<groupId>org.apache.tomcat</groupId>
@@ -545,19 +505,6 @@
<argLine>-Djgroups.bind_addr=::1 ${activemq-surefire-argline} ${its-surefire-extra-args} -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="java.lang,javax.security,java.util,org.apache.activemq,org.fusesource.hawtbuf"</argLine>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<profiles>
@@ -591,21 +538,6 @@
<properties>
<its-surefire-extra-args>--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED</its-surefire-extra-args>
</properties>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/integration/karaf/ArtemisFeatureTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
</profile>
</profiles>
</project>
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTInterceptorPropertiesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTInterceptorPropertiesTest.java
index 6d6a1cc261..279c38afb7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTInterceptorPropertiesTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTInterceptorPropertiesTest.java
@@ -17,6 +17,7 @@
package org.apache.activemq.artemis.tests.integration.mqtt;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -24,7 +25,6 @@ import io.netty.handler.codec.mqtt.MqttFixedHeader;
import io.netty.handler.codec.mqtt.MqttMessage;
import io.netty.handler.codec.mqtt.MqttMessageType;
import org.apache.activemq.artemis.core.protocol.mqtt.MQTTInterceptor;
-import org.apache.felix.resolver.util.ArrayMap;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ErrorCollector;
@@ -59,7 +59,7 @@ public class MQTTInterceptorPropertiesTest extends MQTTTestSupport {
final String msgText = "Test intercepted message";
final boolean retained = true;
- Map<String, Object> expectedProperties = new ArrayMap<>();
+ final Map<String, Object> expectedProperties = new ConcurrentHashMap<>();
expectedProperties.put(ADDRESS, addressQueue);
expectedProperties.put(MESSAGE_TEXT, msgText);
expectedProperties.put(RETAINED, retained);
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/rest/RestTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/rest/RestTestBase.java
index 83c159d1dd..f6fd3201c0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/rest/RestTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/rest/RestTestBase.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.io.InputStream;
import org.apache.activemq.artemis.tests.util.JMSTestBase;
+import org.apache.commons.io.FileUtils;
import org.eclipse.jetty.security.DefaultAuthenticatorFactory;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
@@ -31,7 +32,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
-import shaded.org.apache.commons.io.FileUtils;
public class RestTestBase extends JMSTestBase {
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java
index 4251a6b44e..ca9ce37220 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java
@@ -22,7 +22,6 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.tests.integration.stomp.util.ClientStompFrame;
import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnection;
import org.apache.activemq.artemis.tests.integration.stomp.util.StompClientConnectionFactory;
-import org.apache.felix.resolver.util.ArrayMap;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -32,6 +31,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
@RunWith(value = Parameterized.class)
public class StompPropertiesInterceptorTest extends StompTestBase {
@@ -73,7 +73,7 @@ public class StompPropertiesInterceptorTest extends StompTestBase {
private static final String MESSAGE_TEXT = "messageText";
private static final String MY_HEADER = "my-header";
- private static Map<String, Object> expectedProperties = new ArrayMap<>();
+ private static Map<String, Object> expectedProperties = new ConcurrentHashMap<>();
@Test(timeout = 60000)
public void testCheckInterceptedStompMessageProperties() throws Exception {
diff --git a/tests/karaf-server-integration-tests/pom.xml b/tests/karaf-server-integration-tests/pom.xml
new file mode 100644
index 0000000000..a90f364a7c
--- /dev/null
+++ b/tests/karaf-server-integration-tests/pom.xml
@@ -0,0 +1,179 @@
+<!--
+ 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.
+-->
+<project xmlns="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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.activemq.tests</groupId>
+ <artifactId>artemis-tests-pom</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>karaf-server-integration-tests</artifactId>
+ <packaging>jar</packaging>
+ <name>ActiveMQ Artemis Karaf Server Integration Tests</name>
+
+ <description>
+ Integration tests for the artemis server feature using Apache Karaf
+ </description>
+
+ <properties>
+ <activemq.basedir>${project.basedir}/../..</activemq.basedir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>jakarta.jms</groupId>
+ <artifactId>jakarta.jms-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-jms-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-commons</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.inject</groupId>
+ <artifactId>jakarta.inject-api</artifactId>
+ </dependency>
+
+
+ <!-- logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-unit-test-support</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- karaf test -->
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-karaf</artifactId>
+ <version>${pax.exam.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>${pax.exam.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf.version}</version>
+ <type>tar.gz</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.karaf.features</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ <version>${karaf.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>generate-depends-file</id>
+ <goals>
+ <goal>generate-depends-file</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skipIntegrationTests}</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <!-- TODO: Changes so these tests can work -->
+ <id>jdk16on</id>
+ <activation>
+ <jdk>[16,)</jdk>
+ </activation>
+ <properties>
+ <skipIntegrationTests>true</skipIntegrationTests>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java b/tests/karaf-server-integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
similarity index 100%
rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
rename to tests/karaf-server-integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java
diff --git a/tests/pom.xml b/tests/pom.xml
index 24bdb74b71..aa60dae14a 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -140,6 +140,7 @@
<module>jms-tests</module>
<module>integration-tests</module>
<module>karaf-client-integration-tests</module>
+ <module>karaf-server-integration-tests</module>
<module>compatibility-tests</module>
<module>soak-tests</module>
<module>stress-tests</module>