activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [3/5] activemq-artemis git commit: ARTEMIS-789 fix AMQP SendingAndReceivingTest
Date Thu, 15 Dec 2016 02:10:37 GMT
ARTEMIS-789 fix AMQP SendingAndReceivingTest


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

Branch: refs/heads/master
Commit: 4424117d6534d452f9a883c428e1f5d911979724
Parents: 29edd44
Author: jbertram <jbertram@apache.org>
Authored: Wed Dec 14 15:09:14 2016 -0600
Committer: jbertram <jbertram@apache.org>
Committed: Wed Dec 14 15:13:23 2016 -0600

----------------------------------------------------------------------
 .../integration/amqp/SendingAndReceivingTest.java    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4424117d/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
index f424ea2..46e3b95 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
@@ -24,11 +24,10 @@ import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import java.util.Random;
+import java.util.Set;
 
-import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
-import org.apache.activemq.artemis.core.server.RoutingType;
-import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.qpid.jms.JmsConnectionFactory;
 import org.junit.After;
@@ -45,7 +44,13 @@ public class SendingAndReceivingTest extends ActiveMQTestBase {
    public void setUp() throws Exception {
       super.setUp();
       server = createServer(true, true);
-      server.createAddressInfo(new AddressInfo(SimpleString.toSimpleString("exampleQueue"),
RoutingType.ANYCAST));
+      Set<TransportConfiguration> acceptors = server.getConfiguration().getAcceptorConfigurations();
+      for (TransportConfiguration tc : acceptors) {
+         if (tc.getName().equals("netty")) {
+            tc.getExtraParams().put("anycastPrefix", "anycast://");
+            tc.getExtraParams().put("multicastPrefix", "multicast://");
+         }
+      }
       server.start();
    }
 
@@ -68,7 +73,7 @@ public class SendingAndReceivingTest extends ActiveMQTestBase {
       try {
          connection = connectionFactory.createConnection();
          Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-         Queue queue = session.createQueue("exampleQueue");
+         Queue queue = session.createQueue("anycast://exampleQueue");
          MessageProducer sender = session.createProducer(queue);
 
          String body = createMessage(10240);


Mime
View raw message