QPID-7609: [Java System Tests] Add a JMS 2.0 systest module
diff --git a/pom.xml b/pom.xml
index f159c90..7933eb4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,6 +131,7 @@
<commons-lang-version>2.6</commons-lang-version>
<geronimo-jms-1-1-version>1.1.1</geronimo-jms-1-1-version>
+ <geronimo-jms-2-0-version>1.0-alpha-2</geronimo-jms-2-0-version>
<geronimo-jta-version>1.1.1</geronimo-jta-version>
<geronimo-servlet-version>1.0</geronimo-servlet-version>
<geronimo-j2ee-connector-version>2.0.0</geronimo-j2ee-connector-version>
@@ -198,6 +199,7 @@
<module>qpid-systests-parent</module>
<module>qpid-test-utils</module>
<module>systests</module>
+ <module>systests/qpid-systests-jms_2.0</module>
<module>perftests</module>
<module>qpid-perftests-systests</module>
diff --git a/systests/qpid-systests-jms_2.0/pom.xml b/systests/qpid-systests-jms_2.0/pom.xml
new file mode 100644
index 0000000..dd772af
--- /dev/null
+++ b/systests/qpid-systests-jms_2.0/pom.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<!--
+ 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-systests-parent</artifactId>
+ <version>7.0.0-SNAPSHOT</version>
+ <relativePath>../../qpid-systests-parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>qpid-systests-jms_2.0</artifactId>
+ <name>qpid-systests-jms_2.0</name>
+ <description>JMS 2.0 system tests</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <test.working.directory>${basedir}/../..</test.working.directory>
+ <test.resource.directory>${basedir}/../..</test.resource.directory>
+ <test.systest.resource.directory>${basedir}/../../systests</test.systest.resource.directory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-systests</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </exclusion>
+ <!--
+ TODO: QBTC method signature references the old client:
+ QpidBrokerTestCase.getConnection(org.apache.qpid.jms.ConnectionURL)
+ <exclusion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-client</artifactId>
+ </exclusion>
+ -->
+ </exclusions>
+ </dependency>
+
+ <!-- TODO remove the following JMS 1.1 exclusion and the explict JMS 2.0 inclusion once the released qpid-jms-client depends on JMS 2.0 -->
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-jms-client</artifactId>
+ <version>${qpid-jms-client-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_2.0_spec</artifactId>
+ <version>${geronimo-jms-2-0-version}</version>
+ </dependency>
+ </dependencies>
+
+ <!-- TODO Turn off the JMS 2.0 tests by default. Remove once the released qpid-jms-client depends on JMS 2.0 -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>jms20systests</id>
+ <activation>
+ <property>
+ <name>qpid-jms-client-version</name>
+ <value>0.20.0-SNAPSHOT</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/connection/ConnectionTest.java b/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/connection/ConnectionTest.java
new file mode 100644
index 0000000..cc0bc27
--- /dev/null
+++ b/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/connection/ConnectionTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.qpid.systests.jms_2_0.connection;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.Session;
+
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
+
+public class ConnectionTest extends QpidBrokerTestCase
+{
+ public void testConnection() throws Exception
+ {
+ Connection con = getConnection();
+ assertNotNull(con);
+ }
+}
diff --git a/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/package-info.java b/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/package-info.java
new file mode 100644
index 0000000..75a77be
--- /dev/null
+++ b/systests/qpid-systests-jms_2.0/src/test/java/org/apache/qpid/systests/jms_2_0/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ *
+ */
+
+/**
+ * JMS API 2.0 based system tests. Tests should be placed into sub-packages
+ * named after the JMS feature under test e.g. connection or queue.
+ */
+package org.apache.qpid.systests.jms_2_0;
\ No newline at end of file
diff --git a/test-profiles/CPPExcludes b/test-profiles/CPPExcludes
index 3f89307..dbb9b29 100755
--- a/test-profiles/CPPExcludes
+++ b/test-profiles/CPPExcludes
@@ -255,3 +255,6 @@
#The C++ broker does not implement AMQP management
org.apache.qpid.systest.management.amqp.*
+
+# Exclude the JMS 2.0 test suite
+org.apache.qpid.systests.jms_2_0.*
diff --git a/test-profiles/Java010Excludes b/test-profiles/Java010Excludes
index 28056aa..bafbf41 100755
--- a/test-profiles/Java010Excludes
+++ b/test-profiles/Java010Excludes
@@ -87,3 +87,5 @@
// There is no way in the 0-10 client to cause a send to fail when the message does not reach any queue
org.apache.qpid.server.queue.NodeAutoCreationPolicyTest#testSendingToNonMatchingQueuePatternBURL
+# Exclude the JMS 2.0 test suite
+org.apache.qpid.systests.jms_2_0.*
diff --git a/test-profiles/JavaPre010Excludes b/test-profiles/JavaPre010Excludes
index 755fad0..7b8c8e6 100644
--- a/test-profiles/JavaPre010Excludes
+++ b/test-profiles/JavaPre010Excludes
@@ -78,3 +78,6 @@
// Testing of large 0-10 headers (QPID-6786)
org.apache.qpid.test.unit.basic.PropertyValueTest#testLargeHeader_010_HeadersFillContentHeaderFrame
+
+# Exclude the JMS 2.0 test suite
+org.apache.qpid.systests.jms_2_0.*