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

svn commit: r1762234 - in /qpid/java/trunk: ./ tck/ tck/src/ tck/src/main/ tck/src/main/java/ tck/src/main/java/org/ tck/src/main/java/org/apache/ tck/src/main/java/org/apache/qpid/ tck/src/main/java/org/apache/qpid/tck/ tck/src/test/ tck/src/test/reso...

Author: kwall
Date: Sun Sep 25 21:05:38 2016
New Revision: 1762234

URL: http://svn.apache.org/viewvc?rev=1762234&view=rev
Log:
QPID-7433: [TCK Config] Add maven module with config capble of running the JMS TCK, Version 1.1 against the Java Broker using either the Qpid JMS client or Legacy Qpid Java Client (AMQP 0-x).

User must pass tck.directory system property pointing at the root of an exploded TCK distribution.

For AMQP 1.0, the module takes care of the creation/deletion of the JMS objects needed for the run.

Added:
    qpid/java/trunk/tck/
    qpid/java/trunk/tck/pom.xml
    qpid/java/trunk/tck/src/
    qpid/java/trunk/tck/src/main/
    qpid/java/trunk/tck/src/main/java/
    qpid/java/trunk/tck/src/main/java/org/
    qpid/java/trunk/tck/src/main/java/org/apache/
    qpid/java/trunk/tck/src/main/java/org/apache/qpid/
    qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/
    qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java
    qpid/java/trunk/tck/src/test/
    qpid/java/trunk/tck/src/test/resources/
    qpid/java/trunk/tck/src/test/resources/jms-client/
    qpid/java/trunk/tck/src/test/resources/jms-client/jndi.properties
    qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx   (with props)
    qpid/java/trunk/tck/src/test/resources/qpid-jms-client/
    qpid/java/trunk/tck/src/test/resources/qpid-jms-client/jndi.properties
    qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx   (with props)
    qpid/java/trunk/tck/src/test/resources/resources.json
    qpid/java/trunk/tck/src/test/resources/ts.jte   (with props)
Modified:
    qpid/java/trunk/pom.xml

Modified: qpid/java/trunk/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/pom.xml?rev=1762234&r1=1762233&r2=1762234&view=diff
==============================================================================
--- qpid/java/trunk/pom.xml (original)
+++ qpid/java/trunk/pom.xml Sun Sep 25 21:05:38 2016
@@ -203,6 +203,7 @@
     <module>bdbstore/systests</module>
 
     <module>joramtests</module>
+    <module>tck</module>
 
     <module>doc</module>
   </modules>

Added: qpid/java/trunk/tck/pom.xml
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/pom.xml?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/pom.xml (added)
+++ qpid/java/trunk/tck/pom.xml Sun Sep 25 21:05:38 2016
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~
+  ~ 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/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>qpid-java-build</artifactId>
+        <groupId>org.apache.qpid</groupId>
+        <version>6.1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>tck</artifactId>
+    <name>Apache Qpid JMX TCK Configuration</name>
+    <description>Configuration for Oracle JMS TCK</description>
+
+    <properties>
+        <tck.directory>/Users/keith/jmstck/</tck.directory>
+        <tck.broker-hostport>localhost:5672</tck.broker-hostport>
+        <tck.broker-virtualhostnode>default</tck.broker-virtualhostnode>
+        <tck.broker-virtualhost>default</tck.broker-virtualhost>
+
+        <tck.manangement-url>http://localhost:8080</tck.manangement-url>
+        <tck.manangement-username>guest</tck.manangement-username>
+        <tck.manangement-password>guest</tck.manangement-password>
+        <tck.manangement-api-queue>/api/latest/queue/%s/%s/%s</tck.manangement-api-queue>
+        <tck.manangement-api-topic>/api/latest/exchange/%s/%s/%s</tck.manangement-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.test>com/</tck.test>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jms_1.1_spec</artifactId>
+            <version>${geronimo-jms-1-1-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>${httpclient-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>${fasterxml-jackson-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>${fasterxml-jackson-version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>output-test-properties</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target>
+                                <echo>
+                                    TCK: To run all TCK tests, set system property -Dtck to a name of a JMS client e.g. qpid-jms-client
+                                    and set -Dtck.directory to the location of the exploded TCK distribution.
+                                    To run tests from a single, use the system property -Dtck.test to specify the test source:
+                                    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#SubscriberTests_from_standalone
+                                </echo>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <configuration>
+                    <delimiters>
+                        <delimiter>${*}</delimiter>
+                    </delimiters>
+                    <useDefaultDelimiters>false</useDefaultDelimiters>
+                </configuration>
+            </plugin>
+        </plugins>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </testResource>
+        </testResources>
+    </build>
+    <profiles>
+        <profile>
+            <id>selective-test-mode</id>
+            <activation>
+                <property>
+                    <name>test</name>
+                </property>
+            </activation>
+            <properties>
+                <tck.selective.test.arg>-tests</tck.selective.test.arg>
+                <tck.selective.test.value>${test}</tck.selective.test.value>
+            </properties>
+        </profile>
+        <profile>
+            <id>tck</id>
+            <activation>
+                <property>
+                    <name>tck</name>
+                </property>
+            </activation>
+
+            <dependencies>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>tsharness</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/tsharness.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>javatest</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/javatest.jar</systemPath>
+                </dependency>
+                <dependency>
+                    <groupId>oracle-jms-tck</groupId>
+                    <artifactId>jmstck</artifactId>
+                    <version>0</version>
+                    <scope>system</scope>
+                    <systemPath>${tck.directory}/lib/jmstck.jar</systemPath>
+                </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>
+                    <systemPath>${tck.directory}/lib/apiCheck.jar</systemPath>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-enforcer-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>enforce-property</id>
+                                <goals>
+                                    <goal>enforce</goal>
+                                </goals>
+                                <configuration>
+                                    <rules>
+                                        <requireProperty>
+                                            <property>tck</property>
+                                            <regex>^(qpid-jms-client)|(jms-client-0-9)|(jms-client-0-10)$</regex>
+                                        </requireProperty>
+                                    </rules>
+                                    <fail>true</fail>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>make-directories</id>
+                                <phase>integration-test</phase>
+                                <configuration>
+                                    <tasks>
+                                        <delete dir="${tck.work.directory}"/>
+                                        <mkdir dir="${tck.work.directory}"/>
+                                    </tasks>
+                                </configuration>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>build-classpath</goal>
+                                </goals>
+                                <configuration>
+                                    <outputProperty>tck.full.classpath</outputProperty>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>run-tck</id>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <phase>integration-test</phase>
+                                <configuration>
+                                    <classpathScope>system</classpathScope>
+                                    <executable>java</executable>
+                                    <arguments>
+                                        <argument>-classpath</argument>
+                                        <classpath/>
+                                        <argument>-Dcts.harness.debug=false</argument>
+                                        <argument>-Dcts.jtroutput=true</argument>
+                                        <argument>-Dbuild.level=1</argument>
+                                        <argument>-DTS_HOME=${tck.directory}</argument>
+                                        <argument>-Djavatest.security.allowPropertiesAccess=true</argument>
+                                        <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>-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>-workDirectory</argument><argument>${tck.work.directory}</argument>
+                                        <argument>-envFiles</argument><argument>${tck.ts.jte}</argument>
+                                        <argument>-env</argument><argument>ts_unix</argument>
+                                        <argument>-excludeList</argument><argument>${tck.ts.jtx}</argument>
+                                        <argument>-tests</argument> <argument>${tck.test}</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+
+        </profile>
+
+        <profile>
+            <!-- Profile used to execute TCK against the Qpid JMS client -->
+            <id>qpid-jms-client</id>
+            <activation>
+                <property>
+                    <name>tck</name>
+                    <value>qpid-jms-client</value>
+                </property>
+            </activation>
+            <properties>
+                <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>
+                <tck.test.options></tck.test.options>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>create-jms-resources</id>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <phase>pre-integration-test</phase>
+                                <configuration>
+                                    <classpathScope>test</classpathScope>
+                                    <mainClass>org.apache.qpid.tck.ManageQpidJMSResources</mainClass>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>delete-jms-resources</id>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <phase>post-integration-test</phase>
+                                <configuration>
+                                    <classpathScope>test</classpathScope>
+                                    <mainClass>org.apache.qpid.tck.ManageQpidJMSResources</mainClass>
+                                    <arguments><argument>--delete</argument></arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.qpid</groupId>
+                    <artifactId>qpid-jms-client</artifactId>
+                    <version>${qpid-jms-client-version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <!-- Profile used to execute TCK against the Old JMS client for 0-8..0-91 -->
+            <id>jms-client-0-9</id>
+            <activation>
+                <property>
+                    <name>tck</name>
+                    <value>jms-client-0-9</value>
+                </property>
+            </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>
+                <tck.test.options>-Dqpid.amqp.version=0-9 -Dqpid.dest_syntax=BURL</tck.test.options>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.qpid</groupId>
+                    <artifactId>qpid-client</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <!-- Profile used to execute TCK against the Old JMS client for 0-10-->
+            <id>jms-client-0-10</id>
+            <activation>
+                <property>
+                    <name>tck</name>
+                    <value>jms-client-0-10</value>
+                </property>
+            </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>
+                <tck.test.options>-Dqpid.amqp.version=0-10 -Dqpid.dest_syntax=BURL</tck.test.options>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.qpid</groupId>
+                    <artifactId>qpid-client</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+</project>

Added: qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java (added)
+++ qpid/java/trunk/tck/src/main/java/org/apache/qpid/tck/ManageQpidJMSResources.java Sun Sep 25 21:05:38 2016
@@ -0,0 +1,254 @@
+/*
+ *
+ * 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.tck;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.impl.client.HttpClients;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Used pre/post-integration-test to create/delete JMS resources required for the TCK run.
+ */
+public class ManageQpidJMSResources
+{
+    private static final Logger LOGGER = LoggerFactory.getLogger(ManageQpidJMSResources.class);
+
+    private static final TypeReference<List<Map<String, Object>>> VALUE_TYPE_REF =
+            new TypeReference<List<Map<String, Object>>>()
+            {
+            };
+    private static final String RESOURCES_JSON = "/resources.json";
+
+    private final String _managementUser;
+    private final String _managementPassword;
+    private final String _virtualhostnode;
+    private final String _virtualhost;
+    private final HttpHost _management;
+    private final String _queueApiUrl;
+    private final String _queueApiClearQueueUrl;
+    private final String _topicApiUrl;
+    private final ObjectMapper _objectMapper;
+
+    private enum NodeType
+    {
+        QUEUE, EXCHANGE
+    }
+
+    public static void main(String[] argv) throws Exception
+    {
+        final ManageQpidJMSResources manageQpidJMSResources = new ManageQpidJMSResources();
+
+        if (argv.length > 0 && "--delete".equals(argv[0]))
+        {
+            manageQpidJMSResources.deleteResources();
+        }
+        else
+        {
+            manageQpidJMSResources.createResources();
+
+        }
+    }
+
+    public ManageQpidJMSResources()
+    {
+        _objectMapper = new ObjectMapper();
+        _objectMapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
+
+        _managementUser = System.getProperty("tck.manangement-user", "guest");
+        _managementPassword = System.getProperty("tck.manangement-password", "guest");
+
+        _virtualhostnode = System.getProperty("tck.broker-virtualhostnode", "default");
+        _virtualhost = System.getProperty("tck.broker-virtualhost", "default");
+
+        _management = HttpHost.create(System.getProperty("tck.manangement-url", "http://localhost:8080"));
+        _queueApiUrl = System.getProperty("tck.manangement-api-queue", "/api/latest/queue/%s/%s/%s");
+        _queueApiClearQueueUrl = System.getProperty("tck.manangement-api-queue-clear", "/api/latest/queue/%s/%s/%s/clearQueue");
+        _topicApiUrl = System.getProperty("tck.manangement-api-topic", "/api/latest/exchange/%s/%s/%s");
+
+    }
+
+    private void createResources() throws IOException
+    {
+
+        try (InputStream resourceStream = getClass().getResourceAsStream(RESOURCES_JSON))
+        {
+            if (resourceStream == null)
+            {
+                throw new IOException(String.format("Cannot find '%s' on the classpath", RESOURCES_JSON));
+            }
+
+            List<Map<String, Object>> resourceDefs = _objectMapper.readValue(resourceStream, VALUE_TYPE_REF);
+
+            for (Map<String, Object> resourceDef : resourceDefs)
+            {
+                String name = (String) resourceDef.get("name");
+                NodeType type = NodeType.valueOf(String.valueOf(resourceDef.get("nodeType")));
+                Map<String, Object> arguments =
+                        resourceDef.containsKey("arguments") ? (Map<String, Object>) resourceDef.get("arguments")
+                                : Collections.<String, Object>emptyMap();
+                LOGGER.info("Creating {} type {}", name, type);
+                switch (type)
+                {
+                    case QUEUE:
+                        managementCreateQueue(name, arguments);
+                        // Clear queue just in case it existed already
+                        managementClearQueue(name);
+                        break;
+                    case EXCHANGE:
+                        managementCreateExchange(name, arguments);
+                        break;
+                    default:
+                        throw new RuntimeException(String.format("Unexpected type : %s", type));
+                }
+            }
+        }
+    }
+
+    private void deleteResources() throws IOException
+    {
+
+        try (InputStream resourceStream = getClass().getResourceAsStream(RESOURCES_JSON))
+        {
+            if (resourceStream == null)
+            {
+                throw new IOException(String.format("Cannot find '%s' on the classpath", RESOURCES_JSON));
+            }
+
+            List<Map<String, Object>> resourceDefs = _objectMapper.readValue(resourceStream, VALUE_TYPE_REF);
+
+            for (Map<String, Object> resourceDef : resourceDefs)
+            {
+                String name = (String) resourceDef.get("name");
+                NodeType type = NodeType.valueOf(String.valueOf(resourceDef.get("nodeType")));
+                LOGGER.info("Deleting {} type {}", name, type);
+                switch (type)
+                {
+                    case QUEUE:
+                        managementDeleteQueue(name);
+                        break;
+                    case EXCHANGE:
+                        managementDeleteExchange(name);
+                        break;
+                    default:
+                        throw new RuntimeException(String.format("Unexpected type : %s", type));
+                }
+            }
+        }
+    }
+
+    private void managementCreateQueue(final String name, final Map<String, Object> arguments) throws IOException
+    {
+        HttpPut put = new HttpPut(String.format(_queueApiUrl, _virtualhostnode, _virtualhost, name));
+
+        management(put, arguments);
+    }
+
+    private void managementClearQueue(final String name) throws IOException
+    {
+        HttpPost post = new HttpPost(String.format(_queueApiClearQueueUrl, _virtualhostnode, _virtualhost, name));
+
+        management(post, Collections.emptyMap());
+    }
+
+    private void managementCreateExchange(final String name, final Map<String, Object> arguments) throws IOException
+    {
+        HttpPut put = new HttpPut(String.format(_topicApiUrl, _virtualhostnode, _virtualhost, name));
+
+        management(put, arguments);
+    }
+    private void managementDeleteQueue(final String name)
+    {
+        HttpDelete delete = new HttpDelete(String.format(_queueApiUrl, _virtualhostnode, _virtualhost, name));
+        executeManagement(delete);
+    }
+
+    private void managementDeleteExchange(final String name)
+    {
+        HttpDelete delete = new HttpDelete(String.format(_topicApiUrl, _virtualhostnode, _virtualhost, name));
+        executeManagement(delete);
+    }
+
+    private void management(final HttpEntityEnclosingRequestBase request, final Object obj) throws IOException
+    {
+        StringEntity input = createStringEntity(_objectMapper.writeValueAsString(obj));
+        input.setContentType("application/json");
+        request.setEntity(input);
+
+        int statusCode = executeManagement(request);
+        if (statusCode != 200 && statusCode != 201)
+        {
+            throw new RuntimeException(String.format("Failed : HTTP error code : %d", statusCode));
+        }
+    }
+
+    private StringEntity createStringEntity(final String string)
+    {
+        try
+        {
+            return new StringEntity(string);
+        }
+        catch (UnsupportedEncodingException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private int executeManagement(final HttpRequest httpRequest)
+    {
+        try
+        {
+            UsernamePasswordCredentials
+                    credentials = new UsernamePasswordCredentials(_managementUser, _managementPassword);
+
+            final HttpClient httpClient = HttpClients.createDefault();
+
+            httpRequest.addHeader(new BasicScheme().authenticate(credentials, httpRequest));
+            final HttpResponse response = httpClient.execute(_management, httpRequest);
+
+            return response.getStatusLine().getStatusCode();
+        }
+        catch (IOException | org.apache.http.auth.AuthenticationException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+}

Added: qpid/java/trunk/tck/src/test/resources/jms-client/jndi.properties
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/jms-client/jndi.properties?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/jms-client/jndi.properties (added)
+++ qpid/java/trunk/tck/src/test/resources/jms-client/jndi.properties Sun Sep 25 21:05:38 2016
@@ -0,0 +1,40 @@
+#
+#
+# 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.jndi.PropertiesFileInitialContextFactory
+
+connectionfactory.QueueConnectionFactory = amqp://:@clientid/?brokerlist='tcp://${tck.broker-hostport}'
+connectionfactory.TopicConnectionFactory = amqp://:@clientid/?brokerlist='tcp://${tck.broker-hostport}'
+connectionfactory.jms/DURABLE_SUB_CONNECTION_FACTORY = amqp://:@clientid/?brokerlist='tcp://${tck.broker-hostport}'
+connectionfactory.jms/TopicConnectionFactory = amqp://:@clientid/?brokerlist='tcp://${tck.broker-hostport}'
+connectionfactory.jms/MyTopicConnectionFactory = amqp://:@clientid/?brokerlist='tcp://${tck.broker-hostport}'
+
+queue.MY_QUEUE = myQueue
+queue.MY_QUEUE2 = myQueue2
+queue.testQ0 = testQ0
+queue.testQ1 = testQ1
+queue.testQ2 = testQ2
+queue.testQueue2 = testQueue2
+queue.Q2 = q2
+topic.MY_TOPIC = myTopic
+topic.MY_TOPIC1 = myTopic1
+
+

Added: qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx (added)
+++ qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx Sun Sep 25 21:05:38 2016
@@ -0,0 +1,22 @@
+#
+#
+# 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.
+#
+#
+
+

Propchange: qpid/java/trunk/tck/src/test/resources/jms-client/ts.jtx
------------------------------------------------------------------------------
    svn:executable = *

Added: qpid/java/trunk/tck/src/test/resources/qpid-jms-client/jndi.properties
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/qpid-jms-client/jndi.properties?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/qpid-jms-client/jndi.properties (added)
+++ qpid/java/trunk/tck/src/test/resources/qpid-jms-client/jndi.properties Sun Sep 25 21:05:38 2016
@@ -0,0 +1,41 @@
+#
+#
+# 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
+
+connectionfactory.QueueConnectionFactory = amqp://${tck.broker-hostport}
+connectionfactory.TopicConnectionFactory = amqp://${tck.broker-hostport}
+connectionfactory.jms/DURABLE_SUB_CONNECTION_FACTORY = amqp://${tck.broker-hostport}
+connectionfactory.jms/TopicConnectionFactory = amqp://${tck.broker-hostport}
+connectionfactory.jms/MyTopicConnectionFactory = amqp://${tck.broker-hostport}
+
+queue.MY_QUEUE = myQueue
+queue.MY_QUEUE2 = myQueue2
+queue.testQ0 = testQ0
+queue.testQ1 = testQ1
+queue.testQ2 = testQ2
+queue.testQueue2 = testQueue2
+queue.Q2 = q2
+topic.MY_TOPIC = myTopic
+topic.MY_TOPIC1 = myTopic1
+
+
+

Added: qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx
URL: http://svn.apache.org/viewvc/qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx?rev=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx (added)
+++ qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx Sun Sep 25 21:05:38 2016
@@ -0,0 +1,37 @@
+#
+#
+# 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.
+#
+#
+
+com/sun/ts/tests/jms/ee/all/sessiontests/SessionTests.java#SubscriberTests_from_standalone
+com/sun/ts/tests/jms/ee/all/sessiontests/SessionTests.java#InvalidSelectorTests_from_standalone
+
+com/sun/ts/tests/jms/ee/all/topicproperty/TopicPropertyTests.java#msgJMSXPropertiesTopicTest_from_standalone
+
+com/sun/ts/tests/jms/ee/all/topictests/TopicTests.java#simpleDurableSubscriberTopicTest_from_standalone
+com/sun/ts/tests/jms/ee/all/topictests/TopicTests.java#inactiveDurableSubscriberTopicRecTest_from_standalone
+com/sun/ts/tests/jms/ee/all/topictests/TopicTests.java#durableSubscriberTopicNoLocalTest_from_standalone
+com/sun/ts/tests/jms/ee/all/topictests/TopicTests.java#durableSubscriberChangeSelectorTest_from_standalone
+com/sun/ts/tests/jms/ee/all/topictests/TopicTests.java#durableSubscriberNewTopicTest_from_standalone
+
+com/sun/ts/tests/jms/ee/appclient/txtopictests/TxTopicTests.java#commitAckMsgTopicTest_from_standalone
+com/sun/ts/tests/jms/ee/appclient/txtopictests/TxTopicTests.java#transactionRollbackOnSessionCloseReceiveTopicTest_from_standalone
+com/sun/ts/tests/jms/ee/appclient/txtopictests/TxTopicTests.java#transactionRollbackOnPublishTopicTest_from_standalone
+com/sun/ts/tests/jms/ee/appclient/txtopictests/TxTopicTests.java#txRollbackOnConnectionCloseReceiveTopicTest_from_standalone
+

Propchange: qpid/java/trunk/tck/src/test/resources/qpid-jms-client/ts.jtx
------------------------------------------------------------------------------
    svn:executable = *

Added: 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=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/resources.json (added)
+++ qpid/java/trunk/tck/src/test/resources/resources.json Sun Sep 25 21:05:38 2016
@@ -0,0 +1,64 @@
+/*
+ *
+ * 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.
+ *
+ */
+[
+  {
+    "name": "myQueue",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "myQueue2",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "testQ0",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "testQ1",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "testQ2",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "testQueue2",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "q2",
+    "nodeType": "QUEUE"
+  },
+  {
+    "name": "myTopic",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
+  },
+  {
+    "name": "myTopic1",
+    "nodeType": "EXCHANGE",
+    "arguments": {
+      "type": "fanout"
+    }
+  }
+]
\ No newline at end of file

Added: 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=1762234&view=auto
==============================================================================
--- qpid/java/trunk/tck/src/test/resources/ts.jte (added)
+++ qpid/java/trunk/tck/src/test/resources/ts.jte Sun Sep 25 21:05:38 2016
@@ -0,0 +1,40 @@
+#
+#
+# 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.
+#
+#
+
+
+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} \
+        ${JAVA_HOME}/bin/java \
+		-Ddeliverable.class=${deliverable.class} \
+		-Djava.naming.factory.initial=${java.naming.factory.initial} \
+		-Djava.naming.provider.url=${java.naming.provider.url} \
+	    ${JAVA_OPTIONS} $testExecuteClass $testExecuteArgs
+
+ts_home=${TS_HOME}
+harness.log.port=2001
+harness.log.traceflag=true
+harness.log.delayseconds=0
+porting.ts.jmsObjects.class.1=${tck.jmsobjects.class}
+
+jms_timeout=5000
+user=${tck.manangement-username}
+password=${tck.manangement-password}

Propchange: qpid/java/trunk/tck/src/test/resources/ts.jte
------------------------------------------------------------------------------
    svn:executable = *




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