activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-1212 add a jms.queue. workaround to HornetQProtocolManagerTest
Date Wed, 14 Jun 2017 16:36:55 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 203e75047 -> c02373561


ARTEMIS-1212 add a jms.queue. workaround to HornetQProtocolManagerTest


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9ad8b712
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9ad8b712
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9ad8b712

Branch: refs/heads/master
Commit: 9ad8b71273d8b6d86a39e500176b03d6ef7ce18a
Parents: 203e750
Author: Jiri Danek <jdanek@redhat.com>
Authored: Wed Jun 14 11:50:15 2017 +0200
Committer: Justin Bertram <jbertram@apache.org>
Committed: Wed Jun 14 11:35:50 2017 -0500

----------------------------------------------------------------------
 .../extras/protocols/hornetq/HornetQProtocolManagerTest.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9ad8b712/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java
index 29542c9..4c0c545 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java
@@ -33,6 +33,7 @@ import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.jms.client.ActiveMQQueue;
 import org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration;
 import org.apache.activemq.artemis.jms.server.config.JMSConfiguration;
 import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
@@ -46,6 +47,9 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
+/**
+ * These tests attempt to mimic a legacy client without actually using a legacy versions
of the client libraries.
+ */
 public class HornetQProtocolManagerTest extends ActiveMQTestBase {
 
    ActiveMQServer server;
@@ -108,7 +112,9 @@ public class HornetQProtocolManagerTest extends ActiveMQTestBase {
       configuration.setProtocolManagerFactoryStr(HornetQClientProtocolManagerFactory.class.getName());
       embeddedJMS.getJMSServerManager().createConnectionFactory(false, configuration, "legacy");
 
-      Queue queue = (Queue) embeddedJMS.lookup("testQueue");
+      // WORKAROUND: the 2.0.0 broker introduced addressing change and the 2.2.0 broker added
compatibility for old
+      // client libraries relying on the legacy prefixes. The new client being used in this
test needs prefix explicitly.
+      Queue queue = new ActiveMQQueue("jms.queue.testQueue");
 
       ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) embeddedJMS.lookup("legacy");
       Connection connection = connectionFactory.createConnection();


Mime
View raw message