You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/11/23 17:43:42 UTC

[41/48] activemq-artemis git commit: Fix InterceptorTest

Fix InterceptorTest


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

Branch: refs/heads/ARTEMIS-780
Commit: 9012c9c089b35038f980bde692116515f674a73f
Parents: ef88482
Author: jbertram <jb...@apache.com>
Authored: Mon Nov 21 22:02:44 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Wed Nov 23 09:04:36 2016 -0600

----------------------------------------------------------------------
 .../tests/integration/interceptors/InterceptorTest.java      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9012c9c0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
index 362c8a1..f6ad723 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
@@ -64,8 +64,6 @@ public class InterceptorTest extends ActiveMQTestBase {
 
    private final SimpleString QUEUE = new SimpleString("InterceptorTestQueue");
 
-   private final SimpleString JMS_QUEUE = SimpleString.toSimpleString(QUEUE.toString());
-
    private ServerLocator locator;
 
    @Override
@@ -103,12 +101,12 @@ public class InterceptorTest extends ActiveMQTestBase {
 
       @Override
       public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException {
-         if (packet.getType() == PacketImpl.CREATE_QUEUE) {
+         if (packet.getType() == PacketImpl.CREATE_QUEUE || packet.getType() == PacketImpl.CREATE_QUEUE_V2) {
             String userName = getUsername(packet, connection);
             CreateQueueMessage createQueue = (CreateQueueMessage) packet;
             createQueue.setFilterString(new SimpleString("userName='" + userName + "'"));
 
-            System.out.println("userName = " + userName);
+            System.out.println("userName on createQueue = " + userName);
          } else if (packet.getType() == PacketImpl.SESS_SEND) {
             String userName = getUsername(packet, connection);
             MessagePacket msgPacket = (MessagePacket) packet;
@@ -1054,7 +1052,7 @@ public class InterceptorTest extends ActiveMQTestBase {
    public void testInterceptorOnURI() throws Exception {
       locator.close();
 
-      server.createQueue(JMS_QUEUE, JMS_QUEUE, null, true, false);
+      server.createQueue(QUEUE, QUEUE, null, true, false);
 
       String uri = "tcp://localhost:61616?incomingInterceptorList=" + Incoming.class.getCanonicalName() + "&outgoingInterceptorList=" + Outgoing.class.getName();