You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/07/25 17:11:45 UTC

svn commit: r1365614 - in /activemq/activemq-apollo/trunk: ./ apollo-itests/ apollo-itests/src/test/java/org/apache/activemq/apollo/ apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ apollo-itests/src/test/resources/

Author: chirino
Date: Wed Jul 25 15:11:44 2012
New Revision: 1365614

URL: http://svn.apache.org/viewvc?rev=1365614&view=rev
Log:
Also test against the Joram JMS conformance tests.

Added:
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ApolloAdmin.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireApolloAdmin.java
      - copied, changed from r1365048, activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireJoramJmsTest.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompApolloAdmin.java
      - copied, changed from r1365048, activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompJoramJmsTest.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/openwire-provider.properties
    activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/stomp-provider.properties
    activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/test.properties
Modified:
    activemq/activemq-apollo/trunk/apollo-itests/pom.xml
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
    activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
    activemq/activemq-apollo/trunk/pom.xml

Modified: activemq/activemq-apollo/trunk/apollo-itests/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/pom.xml?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/pom.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/pom.xml Wed Jul 25 15:11:44 2012
@@ -105,6 +105,13 @@
       <version>${project.version}</version>
       <scope>test</scope>
     </dependency>
+    
+    <dependency>
+      <groupId>org.fusesource.joram-jms-tests</groupId>
+      <artifactId>joram-jms-tests</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
 
     <!-- Test framework support files -->
     <dependency>
@@ -158,12 +165,12 @@
         <configuration>
           <!-- we must turn off the use of system class loader so our tests can find stuff - otherwise ScalaSupport compiler can't find stuff -->
           <useSystemClassLoader>false</useSystemClassLoader>
-          <!--forkMode>pertest</forkMode-->
+          <forkMode>pertest</forkMode>
           <childDelegation>false</childDelegation>
           <useFile>true</useFile>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <failIfNoTests>false</failIfNoTests>
-
+          
           <excludes>
             <!--
             <exclude>**/JmsTopicTransactionTest.*</exclude>

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/BrokerProtocol.java Wed Jul 25 15:11:44 2012
@@ -18,7 +18,6 @@ package org.apache.activemq.apollo;
 
 import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.apollo.broker.BrokerFactory;
-import org.apache.activemq.apollo.broker.BrokerFunSuiteSupport;
 import org.apache.activemq.apollo.broker.BrokerTestSupport;
 import org.apache.activemq.apollo.dto.DestMetricsDTO;
 import org.apache.activemq.apollo.dto.QueueStatusDTO;
@@ -29,6 +28,8 @@ import org.slf4j.LoggerFactory;
 
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
+import javax.jms.Queue;
+import javax.jms.Topic;
 import java.net.InetSocketAddress;
 
 /**
@@ -57,7 +58,7 @@ abstract public class BrokerProtocol {
         return address.getPort();
     }
 
-    private DestMetricsDTO getMetrics(Broker broker, Destination destination) {
+    public DestMetricsDTO getMetrics(Broker broker, Destination destination) {
         DestMetricsDTO metrics = null;
         switch (DestinationType.of(destination)) {
             case QUEUE_TYPE:
@@ -105,7 +106,9 @@ abstract public class BrokerProtocol {
 //        return (DestinationViewMBean)broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class, true);
 //    }
 
-    abstract ConnectionFactory getConnectionFactory(Object broker);
-    protected abstract String name(Destination destination);
+    public abstract ConnectionFactory getConnectionFactory(Object broker);
+    public abstract String name(Destination destination);
 
+    public abstract Queue createQueue(String name);
+    public abstract Topic createTopic(String name);
 }

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/JmsTestBase.java Wed Jul 25 15:11:44 2012
@@ -50,7 +50,7 @@ public class JmsTestBase extends Combina
 
     public String brokerConfig = "xml:classpath:apollo.xml";
 
-    protected Object broker;
+    public Object broker;
     protected ConnectionFactory factory;
     protected Connection connection;
     protected List<Connection> connections = Collections.synchronizedList(new ArrayList<Connection>());
@@ -58,16 +58,20 @@ public class JmsTestBase extends Combina
     @Override
     protected void setUp() throws Exception {
         super.setUp();
+        startBroker();
+        factory = protocol.getConnectionFactory(broker);
+
+        connection = factory.createConnection(userName, password);
+        connections.add(connection);
+    }
+
+    public void startBroker() {
         if (System.getProperty("basedir") == null) {
             File file = new File(".");
             System.setProperty("basedir", file.getAbsolutePath());
         }
         broker = protocol.create(brokerConfig);
         protocol.start(broker);
-        factory = protocol.getConnectionFactory(broker);
-
-        connection = factory.createConnection(userName, password);
-        connections.add(connection);
     }
 
     @Override
@@ -82,11 +86,15 @@ public class JmsTestBase extends Combina
         }
 
         connection = null;
+        stopBroker();
+        super.tearDown();
+    }
+
+    public void stopBroker() {
         if(broker!=null) {
             protocol.stop(broker);
             broker = null;
         }
-        super.tearDown();
     }
 
     public ConnectionFactory getConnectionFactory() throws Exception {

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/OpenwireBrokerProtocol.java Wed Jul 25 15:11:44 2012
@@ -18,11 +18,15 @@ package org.apache.activemq.apollo;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
 
 import static java.lang.String.*;
 
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
+import javax.jms.Queue;
+import javax.jms.Topic;
 
 /**
  * <p>
@@ -33,7 +37,7 @@ import javax.jms.Destination;
 public class OpenwireBrokerProtocol extends BrokerProtocol {
     
     @Override
-    ConnectionFactory getConnectionFactory(Object broker) {
+    public ConnectionFactory getConnectionFactory(Object broker) {
         ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
         factory.setBrokerURL(format("tcp://localhost:%s", port(broker)));
         return factory;
@@ -45,7 +49,17 @@ public class OpenwireBrokerProtocol exte
     }
 
     @Override
-    protected String name(Destination destination) {
+    public String name(Destination destination) {
         return ((ActiveMQDestination)destination).getPhysicalName();
     }
+
+    @Override
+    public Queue createQueue(String name) {
+        return new ActiveMQQueue(name);
+    }
+
+    @Override
+    public Topic createTopic(String name) {
+        return new ActiveMQTopic(name);
+    }
 }

Modified: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java Wed Jul 25 15:11:44 2012
@@ -18,9 +18,13 @@ package org.apache.activemq.apollo;
 
 import org.fusesource.stomp.jms.StompJmsConnectionFactory;
 import org.fusesource.stomp.jms.StompJmsDestination;
+import org.fusesource.stomp.jms.StompJmsQueue;
+import org.fusesource.stomp.jms.StompJmsTopic;
 
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
+import javax.jms.Queue;
+import javax.jms.Topic;
 
 import static java.lang.String.format;
 
@@ -33,7 +37,7 @@ import static java.lang.String.format;
 public class StompBrokerProtocol extends BrokerProtocol {
 
     @Override
-    ConnectionFactory getConnectionFactory(Object broker) {
+    public ConnectionFactory getConnectionFactory(Object broker) {
         StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
         factory.setBrokerURI(format("tcp://localhost:%s", port(broker)));
         return factory;
@@ -45,7 +49,17 @@ public class StompBrokerProtocol extends
     }
 
     @Override
-    protected String name(Destination destination) {
+    public String name(Destination destination) {
         return ((StompJmsDestination)destination).getPhysicalName();
     }
+
+    @Override
+    public Queue createQueue(String name) {
+        return new StompJmsQueue("/queue/", name);
+    }
+
+    @Override
+    public Topic createTopic(String name) {
+        return new StompJmsTopic("/topic/", name);
+    }
 }

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ApolloAdmin.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ApolloAdmin.java?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ApolloAdmin.java (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/ApolloAdmin.java Wed Jul 25 15:11:44 2012
@@ -0,0 +1,135 @@
+/**
+ * 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.activemq.apollo.joramtests;
+
+import org.apache.activemq.apollo.BrokerProtocol;
+import org.apache.activemq.apollo.JmsTestBase;
+import org.apache.activemq.apollo.broker.Broker;
+import org.apache.activemq.apollo.broker.BrokerTestSupport;
+import org.objectweb.jtests.jms.admin.Admin;
+
+import javax.jms.ConnectionFactory;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.Hashtable;
+
+/**
+ *
+ */
+abstract public class ApolloAdmin implements Admin {
+
+    static protected JmsTestBase base = new JmsTestBase();
+
+    Context context;
+    {
+        try {
+            context = new InitialContext(new Hashtable<String, String>());
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    protected abstract BrokerProtocol createProtocol();
+
+    public String getName() {
+        return getClass().getName();
+    }
+
+    public void startServer() throws Exception {
+        base.protocol = createProtocol();
+        base.startBroker();
+    }
+
+    public void stopServer() throws Exception {
+        base.stopBroker();
+    }
+
+    public void start() throws Exception {
+    }
+
+    public void stop() throws Exception {
+    }
+
+    public Context createContext() throws NamingException {
+        return context;
+    }
+
+    public void createQueue(String name) {
+        try {
+            context.bind(name, base.protocol.createQueue(name));
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void createTopic(String name) {
+        try {
+            context.bind(name, base.protocol.createTopic(name));
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void deleteQueue(String name) {
+        BrokerTestSupport.delete_queue((Broker)base.broker, name);
+        try {
+            context.unbind(name);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void deleteTopic(String name) {
+        try {
+            context.unbind(name);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void createConnectionFactory(String name) {
+        try {
+            final ConnectionFactory factory = base.protocol.getConnectionFactory(base.broker);
+            context.bind(name, factory);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void deleteConnectionFactory(String name) {
+        try {
+            context.unbind(name);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void createQueueConnectionFactory(String name) {
+        createConnectionFactory(name);
+    }
+    public void createTopicConnectionFactory(String name) {
+        createConnectionFactory(name);
+    }
+    public void deleteQueueConnectionFactory(String name) {
+        deleteConnectionFactory(name);
+    }
+    public void deleteTopicConnectionFactory(String name) {
+        deleteConnectionFactory(name);
+    }
+
+}

Copied: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireApolloAdmin.java (from r1365048, activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java)
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireApolloAdmin.java?p2=activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireApolloAdmin.java&p1=activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java&r1=1365048&r2=1365614&rev=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireApolloAdmin.java Wed Jul 25 15:11:44 2012
@@ -14,38 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.apollo;
+package org.apache.activemq.apollo.joramtests;
 
-import org.fusesource.stomp.jms.StompJmsConnectionFactory;
-import org.fusesource.stomp.jms.StompJmsDestination;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-
-import static java.lang.String.format;
+import org.apache.activemq.apollo.BrokerProtocol;
+import org.apache.activemq.apollo.OpenwireBrokerProtocol;
 
 /**
- * <p>
- * </p>
- *
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
-public class StompBrokerProtocol extends BrokerProtocol {
+public class OpenwireApolloAdmin extends ApolloAdmin {
 
     @Override
-    ConnectionFactory getConnectionFactory(Object broker) {
-        StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
-        factory.setBrokerURI(format("tcp://localhost:%s", port(broker)));
-        return factory;
+    protected BrokerProtocol createProtocol() {
+        return new OpenwireBrokerProtocol();
     }
 
-    @Override
-    public String toString() {
-        return "STOMP";
-    }
-
-    @Override
-    protected String name(Destination destination) {
-        return ((StompJmsDestination)destination).getPhysicalName();
-    }
 }

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireJoramJmsTest.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireJoramJmsTest.java?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireJoramJmsTest.java (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/OpenwireJoramJmsTest.java Wed Jul 25 15:11:44 2012
@@ -0,0 +1,65 @@
+package org.apache.activemq.apollo.joramtests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
+import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
+import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
+import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
+import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
+import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
+import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
+import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
+import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorTest;
+import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
+import org.objectweb.jtests.jms.conform.session.SessionTest;
+import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
+import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
+import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
+
+/**
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
+public class OpenwireJoramJmsTest extends TestCase {
+
+    public void testSetup() {
+        // This first test that run just configures the rest of the
+        // test cases to use the openwire client...
+        System.setProperty("joram.jms.test.file", "openwire-provider.properties");
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+        suite.addTestSuite(OpenwireJoramJmsTest.class);
+        suite.addTestSuite(ConnectionTest.class);
+        suite.addTestSuite(TopicConnectionTest.class);
+        suite.addTestSuite(MessageHeaderTest.class);
+        suite.addTestSuite(MessageBodyTest.class);
+        suite.addTestSuite(MessageDefaultTest.class);
+        suite.addTestSuite(MessageTypeTest.class);
+        suite.addTestSuite(JMSXPropertyTest.class);
+        suite.addTestSuite(MessagePropertyConversionTest.class);
+        suite.addTestSuite(TemporaryQueueTest.class);
+        suite.addTestSuite(SelectorSyntaxTest.class);
+        suite.addTestSuite(QueueSessionTest.class);
+        suite.addTestSuite(SessionTest.class);
+// TODO: figure out why the following tests are failing..
+//        suite.addTestSuite(MessagePropertyTest.class);
+//        suite.addTestSuite(QueueBrowserTest.class);
+//        suite.addTestSuite(SelectorTest.class);
+//        suite.addTestSuite(TopicSessionTest.class);
+//        suite.addTestSuite(UnifiedSessionTest.class);
+//        suite.addTestSuite(TemporaryTopicTest.class);
+        return suite;
+    }
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
+}

Copied: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompApolloAdmin.java (from r1365048, activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java)
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompApolloAdmin.java?p2=activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompApolloAdmin.java&p1=activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java&r1=1365048&r2=1365614&rev=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/StompBrokerProtocol.java (original)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompApolloAdmin.java Wed Jul 25 15:11:44 2012
@@ -14,38 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.activemq.apollo;
+package org.apache.activemq.apollo.joramtests;
 
-import org.fusesource.stomp.jms.StompJmsConnectionFactory;
-import org.fusesource.stomp.jms.StompJmsDestination;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-
-import static java.lang.String.format;
+import org.apache.activemq.apollo.BrokerProtocol;
+import org.apache.activemq.apollo.StompBrokerProtocol;
 
 /**
- * <p>
- * </p>
- *
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
-public class StompBrokerProtocol extends BrokerProtocol {
+public class StompApolloAdmin extends ApolloAdmin {
 
     @Override
-    ConnectionFactory getConnectionFactory(Object broker) {
-        StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
-        factory.setBrokerURI(format("tcp://localhost:%s", port(broker)));
-        return factory;
+    protected BrokerProtocol createProtocol() {
+        return new StompBrokerProtocol();
     }
 
-    @Override
-    public String toString() {
-        return "STOMP";
-    }
-
-    @Override
-    protected String name(Destination destination) {
-        return ((StompJmsDestination)destination).getPhysicalName();
-    }
 }

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompJoramJmsTest.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompJoramJmsTest.java?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompJoramJmsTest.java (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/java/org/apache/activemq/apollo/joramtests/StompJoramJmsTest.java Wed Jul 25 15:11:44 2012
@@ -0,0 +1,66 @@
+package org.apache.activemq.apollo.joramtests;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.objectweb.jtests.jms.conform.connection.ConnectionTest;
+import org.objectweb.jtests.jms.conform.connection.TopicConnectionTest;
+import org.objectweb.jtests.jms.conform.message.MessageBodyTest;
+import org.objectweb.jtests.jms.conform.message.MessageDefaultTest;
+import org.objectweb.jtests.jms.conform.message.MessageTypeTest;
+import org.objectweb.jtests.jms.conform.message.headers.MessageHeaderTest;
+import org.objectweb.jtests.jms.conform.message.properties.JMSXPropertyTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyConversionTest;
+import org.objectweb.jtests.jms.conform.message.properties.MessagePropertyTest;
+import org.objectweb.jtests.jms.conform.queue.QueueBrowserTest;
+import org.objectweb.jtests.jms.conform.queue.TemporaryQueueTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
+import org.objectweb.jtests.jms.conform.selector.SelectorTest;
+import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
+import org.objectweb.jtests.jms.conform.session.SessionTest;
+import org.objectweb.jtests.jms.conform.session.TopicSessionTest;
+import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
+import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
+
+/**
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
+public class StompJoramJmsTest extends TestCase {
+
+    public void testSetup() {
+        // This first test that run just configures the rest of the
+        // test cases to use the stompjms client...
+        System.setProperty("joram.jms.test.file", "stomp-provider.properties");
+    }
+
+    public static Test suite() {
+        TestSuite suite = new TestSuite();
+        suite.addTestSuite(StompJoramJmsTest.class);
+//        suite.addTestSuite(ConnectionTest.class);
+//        suite.addTestSuite(TopicConnectionTest.class);
+//        suite.addTestSuite(MessageHeaderTest.class);
+        suite.addTestSuite(MessageBodyTest.class);
+//        suite.addTestSuite(MessageDefaultTest.class);
+//        suite.addTestSuite(MessageTypeTest.class);
+//        suite.addTestSuite(JMSXPropertyTest.class);
+//        suite.addTestSuite(MessagePropertyConversionTest.class);
+//        suite.addTestSuite(TemporaryQueueTest.class);
+//        suite.addTestSuite(SelectorSyntaxTest.class);
+//        suite.addTestSuite(QueueSessionTest.class);
+//        suite.addTestSuite(SessionTest.class);
+//        suite.addTestSuite(MessagePropertyTest.class);
+//        suite.addTestSuite(QueueBrowserTest.class);
+//        suite.addTestSuite(SelectorTest.class);
+//        suite.addTestSuite(TopicSessionTest.class);
+//        suite.addTestSuite(UnifiedSessionTest.class);
+//        suite.addTestSuite(TemporaryTopicTest.class);
+        return suite;
+    }
+
+
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(suite());
+    }
+
+}

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/openwire-provider.properties
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/openwire-provider.properties?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/openwire-provider.properties (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/openwire-provider.properties Wed Jul 25 15:11:44 2012
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# This config file is used by the joram jms tests.
+#
+jms.provider.admin.class= org.apache.activemq.apollo.joramtests.OpenwireApolloAdmin

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/stomp-provider.properties
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/stomp-provider.properties?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/stomp-provider.properties (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/stomp-provider.properties Wed Jul 25 15:11:44 2012
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# This config file is used by the joram jms tests.
+#
+jms.provider.admin.class= org.apache.activemq.apollo.joramtests.StompApolloAdmin

Added: activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/test.properties
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/test.properties?rev=1365614&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/test.properties (added)
+++ activemq/activemq-apollo/trunk/apollo-itests/src/test/resources/test.properties Wed Jul 25 15:11:44 2012
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# This config file is used by the joram jms tests.
+#
+timeout=30000
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/pom.xml?rev=1365614&r1=1365613&r2=1365614&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/pom.xml (original)
+++ activemq/activemq-apollo/trunk/pom.xml Wed Jul 25 15:11:44 2012
@@ -98,7 +98,7 @@
 
     <hawtdispatch-version>1.11</hawtdispatch-version>
     <hawtbuf-version>1.9</hawtbuf-version>
-    <stompjms-version>1.11</stompjms-version>
+    <stompjms-version>1.12-SNAPSHOT</stompjms-version>
     
     <bdb-version>5.0.34</bdb-version>