You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2017/01/25 09:28:21 UTC

svn commit: r1780155 - in /qpid/java/trunk/tck: pom.xml src/test/resources/qpid-jms20-client/ src/test/resources/qpid-jms20-client/jndi.properties src/test/resources/qpid-jms20-client/ts.jtx src/test/resources/resources.json src/test/resources/ts.jte

Author: orudyy
Date: Wed Jan 25 09:28:20 2017
New Revision: 1780155

URL: http://svn.apache.org/viewvc?rev=1780155&view=rev
Log:
QPID-7638: Add ability to run JMS 2.0 TCK

Added:
    qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/
    qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/jndi.properties
    qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/ts.jtx
Modified:
    qpid/java/trunk/tck/pom.xml
    qpid/java/trunk/tck/src/test/resources/resources.json
    qpid/java/trunk/tck/src/test/resources/ts.jte

Modified: qpid/java/trunk/tck/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/pom.xml?rev=1780155&r1=1780154&r2=1780155&view=diff
==============================================================================
--- qpid/java/trunk/tck/pom.xml (original)
+++ qpid/java/trunk/tck/pom.xml Wed Jan 25 09:28:20 2017
@@ -44,8 +44,8 @@
         <tck.management-api-topic>/api/latest/exchange/%s/%s/%s</tck.management-api-topic>
 
         <tck.jmsobjects.class>com.sun.ts.lib.implementation.sun.jms.SunRIJMSObjects</tck.jmsobjects.class>
-        <tck.work.directory>${project.build.directory}/${tck}/work</tck.work.directory>
-        <tck.ts.jte>${project.build.testOutputDirectory}/ts.jte</tck.ts.jte>
+        <tck.work.directory>${project.build.directory}${file.separator}${tck}${file.separator}work</tck.work.directory>
+        <tck.ts.jte>${project.build.testOutputDirectory}${file.separator}ts.jte</tck.ts.jte>
         <tck.test>com/</tck.test>
     </properties>
 
@@ -106,6 +106,12 @@
                                     e.g. -Dtck.test=com/sun/ts/tests/jms/ee/all/sessiontests/SessionTests.java
                                     To run only a single test, append the test name:
                                     e.g. -Dtck.test=com/sun/ts/tests/jms/ee/all/sessiontests/SessionTests.java#InvalidDestinationTests_from_standalone
+
+                                    JMS2.0 TCK: As above plus property 'jms-version' needs to be set to '20'
+                                    Example,
+                                    mvn post-integration-test -Dtck=qpid-jms-client -Djms-version=20 \
+                                                              -Dtck.directory=/home/alex/tck/jmstck20 \
+                                                              -Dqpid-jms-client-version=0.20.0
                                 </echo>
                             </target>
                         </configuration>
@@ -133,6 +139,137 @@
         </testResources>
     </build>
     <profiles>
+        <!--
+        A complementary profile for running  jms 2.0 tck tests.
+        It relies on property 'jms-version' set to '20' and property 'tck' set to 'qpid-jms-client'
+        An example how to run jms 2.0 tck suite,
+            mvn post-integration-test -Dtck=qpid-jms-client -Djms-version=20 -Dtck.directory=/home/alex/tck/jmstck20 \
+                                      -Dqpid-jms-client-version=0.20.0 -f tck/pom.xml
+        -->
+        <profile>
+            <id>jms20-tck</id>
+            <activation>
+                <property>
+                    <name>jms-version</name>
+                    <value>20</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>jaxen-core</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/jaxen-core.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>jaxen-jdom</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/jaxen-jdom.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>saxpath</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/saxpath.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>jdom</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/jdom.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>api-check</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/apiCheck.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>ant-contrib</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/ant-contrib.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>ant_sun</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/ant_sun.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>sigtest</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/sigtest.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>ant</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/tools/ant/lib/ant.jar</systemPath>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-enforcer-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>enforce-property-jms2</id>
+                                <goals>
+                                    <goal>enforce</goal>
+                                </goals>
+                                <configuration>
+                                    <rules>
+                                        <requireProperty>
+                                            <property>tck</property>
+                                            <regex>^qpid-jms-client$</regex>
+                                        </requireProperty>
+                                        <requireProperty>
+                                            <property>jms-version</property>
+                                            <regex>^20$</regex>
+                                        </requireProperty>
+                                    </rules>
+                                    <fail>true</fail>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>jms11-tck</id>
+            <activation>
+                <property>
+                    <name>!jms-version</name>
+                </property>
+            </activation>
+            <properties>
+                <jms-version></jms-version>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>parser</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/parser.jar</systemPath>
+                    <optional>true</optional>
+                </dependency>
+            </dependencies>
+        </profile>
         <profile>
             <id>tck</id>
             <activation>
@@ -165,13 +302,6 @@
                 </dependency>
                 <dependency>
                     <groupId>oracle-jms-tck</groupId>
-                    <artifactId>parser</artifactId>
-                    <version>0</version>
-                    <scope>system</scope>
-                    <systemPath>${tck.directory}/lib/parser.jar</systemPath>
-                </dependency>
-                <dependency>
-                    <groupId>oracle-jms-tck</groupId>
                     <artifactId>api-check</artifactId>
                     <version>0</version>
                     <scope>system</scope>
@@ -258,13 +388,13 @@
                                         <argument>-Dtechnology.name=JMS</argument>
                                         <argument>-Ddeliverable.class=com.sun.ts.lib.deliverable.jms.JMSDeliverable</argument>
                                         <!-- This is the classpath used by the JVM spawned by com.sun.javatest.tool.Main to run each individual test -->
-                                        <argument>-DLOCAL_CLASSES=${tck.full.classpath}:${project.build.directory}/${project.build.finalName}.jar</argument>
+                                        <argument>-DLOCAL_CLASSES=${tck.full.classpath}${path.separator}${project.build.directory}${file.separator}${project.build.finalName}.jar</argument>
                                         <argument>-DJAVA_OPTIONS=${tck.test.options}</argument>
                                         <argument>-DJAVA_HOME=${java.home}</argument>
                                         <argument>com.sun.javatest.tool.Main</argument>
                                         <argument>-EsysProps</argument>
                                         <argument>-batch</argument>
-                                        <argument>-testsuite</argument><argument>${tck.directory}/src</argument>
+                                        <argument>-testsuite</argument><argument>${tck.directory}${file.separator}src</argument>
                                         <argument>-workDirectory</argument><argument>${tck.work.directory}</argument>
                                         <argument>-envFiles</argument><argument>${tck.ts.jte}</argument>
                                         <argument>-env</argument><argument>ts_unix</argument>
@@ -305,9 +435,10 @@
                 </property>
             </activation>
             <properties>
+                <jms.client.resource.folder>qpid-jms${jms-version}-client</jms.client.resource.folder>
                 <java.naming.factory.initial>org.apache.qpid.jms.jndi.JmsInitialContextFactory</java.naming.factory.initial>
-                <java.naming.provider.url>${project.build.testOutputDirectory}/qpid-jms-client/jndi.properties</java.naming.provider.url>
-                <tck.ts.jtx>${project.build.testOutputDirectory}/qpid-jms-client/ts.jtx</tck.ts.jtx>
+                <java.naming.provider.url>${project.build.testOutputDirectory}${file.separator}${jms.client.resource.folder}${file.separator}jndi.properties</java.naming.provider.url>
+                <tck.ts.jtx>${project.build.testOutputDirectory}${file.separator}${jms.client.resource.folder}${file.separator}ts.jtx</tck.ts.jtx>
                 <tck.test.options />
             </properties>
             <build>
@@ -407,8 +538,8 @@
             </activation>
             <properties>
                 <java.naming.factory.initial>org.apache.qpid.jndi.PropertiesFileInitialContextFactory</java.naming.factory.initial>
-                <java.naming.provider.url>${project.build.directory}/test-classes/jms-client/jndi.properties</java.naming.provider.url>
-                <tck.ts.jtx>${project.build.testOutputDirectory}/jms-client/ts.jtx</tck.ts.jtx>
+                <java.naming.provider.url>${project.build.directory}${file.separator}test-classes${file.separator}jms-client${file.separator}jndi.properties</java.naming.provider.url>
+                <tck.ts.jtx>${project.build.testOutputDirectory}${file.separator}jms-client${file.separator}ts.jtx</tck.ts.jtx>
                 <tck.test.options>-Dqpid.amqp.version=0-9 -Dqpid.dest_syntax=BURL</tck.test.options>
             </properties>
             <dependencies>
@@ -432,8 +563,8 @@
             </activation>
             <properties>
                 <java.naming.factory.initial>org.apache.qpid.jndi.PropertiesFileInitialContextFactory</java.naming.factory.initial>
-                <java.naming.provider.url>${project.build.directory}/test-classes/jms-client/jndi.properties</java.naming.provider.url>
-                <tck.ts.jtx>${project.build.testOutputDirectory}/jms-client/ts.jtx</tck.ts.jtx>
+                <java.naming.provider.url>${project.build.directory}${file.separator}test-classes${file.separator}jms-client${file.separator}jndi.properties</java.naming.provider.url>
+                <tck.ts.jtx>${project.build.testOutputDirectory}${file.separator}jms-client${file.separator}ts.jtx</tck.ts.jtx>
                 <tck.test.options>-Dqpid.amqp.version=0-10 -Dqpid.dest_syntax=BURL</tck.test.options>
             </properties>
             <dependencies>

Added: qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/jndi.properties
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/jndi.properties?rev=1780155&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/jndi.properties (added)
+++ qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/jndi.properties Wed Jan 25 09:28:20 2017
@@ -0,0 +1,47 @@
+#
+#
+# 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.
+#
+#
+
+java.naming.factory.initial = org.apache.qpid.jms.jndi.JmsInitialContextFactory
+
+# Define the required ConnectionFactory instances
+connectionfactory.MyConnectionFactory=amqp://${tck.broker-hostport}?jms.prefetchPolicy.all=0&jms.username=admin&jms.password=admin
+connectionfactory.MyQueueConnectionFactory=amqp://${tck.broker-hostport}?jms.prefetchPolicy.all=0&jms.username=admin&jms.password=admin
+connectionfactory.MyTopicConnectionFactory=amqp://${tck.broker-hostport}?jms.prefetchPolicy.all=0&jms.username=admin&jms.password=admin
+connectionfactory.DURABLE_SUB_CONNECTION_FACTORY=amqp://${tck.broker-hostport}?jms.clientID=cts&jms.prefetchPolicy.all=0&jms.username=admin&jms.password=admin
+
+# Configure the necessary Queue and Topic objects
+queue.MY_QUEUE=myQueue
+queue.MY_QUEUE2=myQueue
+queue.testQ0=testQ0
+queue.testQ1=testQ1
+queue.testQ2=testQ2
+queue.testQueue2=testQueue2
+queue.Q2=q2
+
+topic.MY_TOPIC=myTopic
+topic.MY_TOPIC1 = myTopic1
+topic.MY_TOPIC2=myTopic2
+topic.testT0=testT0
+topic.testT1=testT1
+topic.testT2=testT2
+
+
+

Added: qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/ts.jtx
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/ts.jtx?rev=1780155&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/ts.jtx (added)
+++ qpid/java/trunk/tck/src/test/resources/qpid-jms20-client/ts.jtx Wed Jan 25 09:28:20 2017
@@ -0,0 +1,61 @@
+#
+#
+# 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.
+#
+#
+
+# tests currently failing against trunk version of broker
+
+# not investigated
+com/sun/ts/tests/jms/core/appclient/queuetests/QueueTests.java#queueRequestorSimpleSendAndRecvTest_from_standalone
+com/sun/ts/tests/jms/core/appclient/queuetests/QueueTests.java#setGetChangeClientIDQueueTest_from_standalone
+com/sun/ts/tests/jms/core/appclient/topictests/TopicTests.java#setGetChangeClientIDTopicTest_from_standalone
+com/sun/ts/tests/jms/core/appclient/topictests/TopicTests.java#topicRequestorExceptionTests_from_standalone
+com/sun/ts/tests/jms/core/appclient/topictests/TopicTests.java#topicRequestorSimpleSendAndRecvTest_from_standalone
+com/sun/ts/tests/jms/core20/appclient/jmscontextqueuetests/Client.java#setGetChangeClientIDTest_from_standalone
+com/sun/ts/tests/jms/core20/appclient/jmscontexttopictests/Client.java#messageOrderCLTopicTest_from_standalone
+com/sun/ts/tests/jms/core20/appclient/jmscontexttopictests/Client.java#setGetChangeClientIDTest_from_standalone
+com/sun/ts/tests/signaturetest/jms/JMSSigTest.java#signatureTest_from_standalone
+
+# not supported by broker yet
+com/sun/ts/tests/jms/core20/jmsproducerqueuetests/Client.java#deliveryDelayTest_from_standalone
+com/sun/ts/tests/jms/core20/jmsproducerqueuetests/Client.java#msgHdrJMSDeliveryTimeTest_from_standalone
+com/sun/ts/tests/jms/core20/jmsproducertopictests/Client.java#deliveryDelayTest_from_standalone
+com/sun/ts/tests/jms/core20/jmsproducertopictests/Client.java#msgHdrJMSDeliveryTimeTest_from_standalone
+com/sun/ts/tests/jms/core20/messageproducertests/Client.java#queueDeliveryDelayTest_from_standalone
+com/sun/ts/tests/jms/core20/messageproducertests/Client.java#topicDeliveryDelayTest_from_standalone
+
+# buggy tests
+com/sun/ts/tests/jms/core20/connectiontests/Client.java#createQueueSessionTest_from_standalone
+com/sun/ts/tests/jms/core20/connectiontests/Client.java#createSessionTest2_from_standalone
+com/sun/ts/tests/jms/core20/connectiontests/Client.java#createSessionTest3_from_standalone
+com/sun/ts/tests/jms/core20/connectiontests/Client.java#createTopicSessionTest_from_standalone
+
+# QPID-7634: Broker fails to respond on flow with drain=true when queue is empty and prefetch=0 (on client side)
+com/sun/ts/tests/jms/core20/jmsconsumertests/Client.java#queueReceiveTests_from_standalone
+com/sun/ts/tests/jms/core20/jmsconsumertests/Client.java#topicReceiveTests_from_standalone
+
+# QPID-7635: Broker rejects messages published with anonymous producer
+# when queue binding filter does not accept the message
+com/sun/ts/tests/jms/core20/jmscontexttopictests/Client.java#createSharedConsumerTest2_from_standalone
+com/sun/ts/tests/jms/core20/jmscontexttopictests/Client.java#createSharedDurableConsumerTest2_from_standalone
+
+
+
+
+

Modified: qpid/java/trunk/tck/src/test/resources/resources.json
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/resources.json?rev=1780155&r1=1780154&r2=1780155&view=diff
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/resources.json (original)
+++ qpid/java/trunk/tck/src/test/resources/resources.json Wed Jan 25 09:28:20 2017
@@ -60,5 +60,33 @@
     "arguments": {
       "type": "fanout"
     }
+  },
+  {
+    "name": "myTopic2",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
+  },
+  {
+    "name": "testT0",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
+  },
+  {
+    "name": "testT1",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
+  },
+  {
+    "name": "testT2",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
   }
 ]
\ No newline at end of file

Modified: qpid/java/trunk/tck/src/test/resources/ts.jte
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/ts.jte?rev=1780155&r1=1780154&r2=1780155&view=diff
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/ts.jte (original)
+++ qpid/java/trunk/tck/src/test/resources/ts.jte Wed Jan 25 09:28:20 2017
@@ -22,7 +22,7 @@
 
 env.ts_unix.testsuite=com.sun.ts.lib.harness.TS
 env.ts_unix.command.testExecute=com.sun.ts.lib.harness.ExecTSTestCmd \
-        CLASSPATH=${TS_HOME}/classes:${LOCAL_CLASSES} \
+        CLASSPATH=${TS_HOME}/classes${path.separator}${LOCAL_CLASSES} \
         ${JAVA_HOME}/bin/java \
 		-Ddeliverable.class=${deliverable.class} \
 		-Djava.naming.factory.initial=${java.naming.factory.initial} \
@@ -38,3 +38,7 @@ porting.ts.jmsObjects.class.1=${tck.jmso
 jms_timeout=5000
 user=${tck.management-username}
 password=${tck.management-password}
+
+# properties required for JMS 2.0 TCK
+platform.mode=standalone
+harness.socket.retry.count=10



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org