activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject activemq-artemis git commit: more fixes after JMX JMS removal
Date Thu, 10 Nov 2016 09:38:36 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/ARTEMIS-780 a6f1167d7 -> d96185281


more fixes after JMX JMS removal


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

Branch: refs/heads/ARTEMIS-780
Commit: d961852815ad65bab03dfbb10f50e787097b3aa6
Parents: a6f1167
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Thu Nov 10 09:36:16 2016 +0000
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Thu Nov 10 09:38:15 2016 +0000

----------------------------------------------------------------------
 .../cli/commands/tools/XmlDataImporter.java        |  2 +-
 .../artemis/api/core/management/ResourceNames.java |  4 ++--
 .../core/management/impl/AddressControlImpl.java   |  2 +-
 .../core/postoffice/impl/PostOfficeImpl.java       |  2 +-
 .../artemis/core/server/impl/ScaleDownHandler.java |  2 +-
 .../core/server/management/ManagementService.java  |  2 +-
 .../management/impl/ManagementServiceImpl.java     | 10 +++++-----
 .../server/group/impl/ClusteredResetMockTest.java  |  2 +-
 .../tests/extras/jms/bridge/BridgeTestBase.java    |  2 +-
 .../client/AutoCreateJmsDestinationTest.java       |  4 ++--
 .../integration/client/JMSMessageCounterTest.java  |  4 ++--
 .../integration/client/MultipleProducersTest.java  |  2 +-
 .../cluster/bridge/BridgeReconnectTest.java        |  2 +-
 .../distribution/ClusteredMessageCounterTest.java  |  4 ++--
 .../management/ManagementWithPagingServerTest.java | 17 ++++++++++++++++-
 .../management/ManagementWithStompTest.java        |  4 ++--
 .../management/QueueControlUsingCoreTest.java      |  2 +-
 .../jms/tests/tools/container/LocalTestServer.java |  2 +-
 18 files changed, 42 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
index 74a35b5..225b14c 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
@@ -328,7 +328,7 @@ public final class XmlDataImporter extends ActionAbstract {
             // address may need the message
             try (ClientRequestor requestor = new ClientRequestor(managementSession, "activemq.management"))
{
                ClientMessage managementMessage = managementSession.createMessage(false);
-               ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
+               ManagementHelper.putAttribute(managementMessage, ResourceNames.QUEUE + queue,
"ID");
                managementSession.start();
                if (logger.isDebugEnabled()) {
                   logger.debug("Requesting ID for: " + queue);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
index 6c6ef55..574cada 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
@@ -20,12 +20,12 @@ package org.apache.activemq.artemis.api.core.management;
  * Helper class used to build resource names used by management messages.
  * <br>
  * Resource's name is build by appending its <em>name</em> to its corresponding
type.
- * For example, the resource name of the "foo" queue is {@code CORE_QUEUE + "foo"}.
+ * For example, the resource name of the "foo" queue is {@code QUEUE + "foo"}.
  */
 public final class ResourceNames {
    public static final String BROKER = "broker";
 
-   public static final String CORE_QUEUE = "queue.";
+   public static final String QUEUE = "queue.";
 
    public static final String ADDRESS = "address.";
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
index 1c53433..5808bd3 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java
@@ -310,7 +310,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
          List<QueueControl> matchingQueues = new ArrayList<>();
          String[] queues = getQueueNames();
          for (String queue : queues) {
-            QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE
+ queue);
+            QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.QUEUE
+ queue);
 
             // Ignore the "special" subscription
             if (coreQueueControl != null && !coreQueueControl.getName().equals(getAddress()))
{

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 1b6dc42..1dba309 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -512,7 +512,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
       if (binding.getType() == BindingType.LOCAL_QUEUE) {
          managementService.unregisterQueue(uniqueName, binding.getAddress());
       } else if (binding.getType() == BindingType.DIVERT) {
-         managementService.unregisterDivert(uniqueName);
+         managementService.unregisterDivert(uniqueName, binding.getAddress());
       }
 
       if (binding.getType() != BindingType.DIVERT) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
index 23cdcae..a5f96b1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScaleDownHandler.java
@@ -442,7 +442,7 @@ public class ScaleDownHandler {
       Object result;
       try (ClientRequestor requestor = new ClientRequestor(session, "activemq.management"))
{
          ClientMessage managementMessage = session.createMessage(false);
-         ManagementHelper.putAttribute(managementMessage, "core.queue." + queueName, "ID");
+         ManagementHelper.putAttribute(managementMessage, ResourceNames.QUEUE + queueName,
"ID");
          session.start();
          logger.debug("Requesting ID for: " + queueName);
          ClientMessage reply = requestor.request(managementMessage);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementService.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementService.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementService.java
index 7da756c..58d91a4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementService.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/ManagementService.java
@@ -104,7 +104,7 @@ public interface ManagementService extends NotificationService, ActiveMQComponen
 
    void registerDivert(Divert divert, DivertConfiguration config) throws Exception;
 
-   void unregisterDivert(SimpleString name) throws Exception;
+   void unregisterDivert(SimpleString name, SimpleString address) throws Exception;
 
    void registerBroadcastGroup(BroadcastGroup broadcastGroup,
                                BroadcastGroupConfiguration configuration) throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
index a68d65b..636aa82 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
@@ -243,7 +243,7 @@ public class ManagementServiceImpl implements ManagementService {
       }
       ObjectName objectName = objectNameBuilder.getQueueObjectName(address, queue.getName());
       registerInJMX(objectName, queueControl);
-      registerInRegistry(ResourceNames.CORE_QUEUE + queue.getName(), queueControl);
+      registerInRegistry(ResourceNames.QUEUE + queue.getName(), queueControl);
 
       if (logger.isDebugEnabled()) {
          logger.debug("registered queue " + objectName);
@@ -254,7 +254,7 @@ public class ManagementServiceImpl implements ManagementService {
    public synchronized void unregisterQueue(final SimpleString name, final SimpleString address)
throws Exception {
       ObjectName objectName = objectNameBuilder.getQueueObjectName(address, name);
       unregisterFromJMX(objectName);
-      unregisterFromRegistry(ResourceNames.CORE_QUEUE + name);
+      unregisterFromRegistry(ResourceNames.QUEUE + name);
       messageCounterManager.unregisterMessageCounter(name.toString());
    }
 
@@ -271,8 +271,8 @@ public class ManagementServiceImpl implements ManagementService {
    }
 
    @Override
-   public synchronized void unregisterDivert(final SimpleString name) throws Exception {
-      ObjectName objectName = objectNameBuilder.getDivertObjectName(name.toString(), null);
+   public synchronized void unregisterDivert(final SimpleString name, final SimpleString
address) throws Exception {
+      ObjectName objectName = objectNameBuilder.getDivertObjectName(name.toString(), address.toString());
       unregisterFromJMX(objectName);
       unregisterFromRegistry(ResourceNames.DIVERT + name);
    }
@@ -535,7 +535,7 @@ public class ManagementServiceImpl implements ManagementService {
             List<String> unexpectedResourceNames = new ArrayList<>();
             for (String name : resourceNames) {
                // only addresses, queues, and diverts should still be registered
-               if (!(name.startsWith(ResourceNames.ADDRESS) || name.startsWith(ResourceNames.CORE_QUEUE)
|| name.startsWith(ResourceNames.DIVERT))) {
+               if (!(name.startsWith(ResourceNames.ADDRESS) || name.startsWith(ResourceNames.QUEUE)
|| name.startsWith(ResourceNames.DIVERT))) {
                   unexpectedResourceNames.add(name);
                }
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
index e79a3c7..3736c05 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java
@@ -281,7 +281,7 @@ public class ClusteredResetMockTest extends ActiveMQTestBase {
       }
 
       @Override
-      public void unregisterDivert(SimpleString name) throws Exception {
+      public void unregisterDivert(SimpleString name, SimpleString address) throws Exception
{
 
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java
----------------------------------------------------------------------
diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java
b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java
index 51306c1..5e0345f 100644
--- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java
+++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java
@@ -486,7 +486,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase {
       if (index == 1) {
          managementService = server1.getManagementService();
       }
-      QueueControl queueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE
+ queue.getQueueName());
+      QueueControl queueControl = (QueueControl) managementService.getResource(ResourceNames.QUEUE
+ queue.getQueueName());
 
       //server may be closed
       if (queueControl != null) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java
index 6bceb7d..5094eba 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsDestinationTest.java
@@ -40,7 +40,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 import static org.apache.activemq.artemis.api.core.management.ResourceNames.ADDRESS;
-import static org.apache.activemq.artemis.api.core.management.ResourceNames.CORE_QUEUE;
+import static org.apache.activemq.artemis.api.core.management.ResourceNames.QUEUE;
 
 public class AutoCreateJmsDestinationTest extends JMSTestBase {
 
@@ -74,7 +74,7 @@ public class AutoCreateJmsDestinationTest extends JMSTestBase {
 
       // make sure the JMX control was created for the address and queue
       assertNotNull(server.getManagementService().getResource(ADDRESS + QUEUE_NAME));
-      assertNotNull(server.getManagementService().getResource(CORE_QUEUE + QUEUE_NAME));
+      assertNotNull(server.getManagementService().getResource(QUEUE + QUEUE_NAME));
 
       connection.close();
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSMessageCounterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSMessageCounterTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSMessageCounterTest.java
index 2f138b6..48080fe 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSMessageCounterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JMSMessageCounterTest.java
@@ -54,7 +54,7 @@ public class JMSMessageCounterTest extends JMSTestBase {
 
       conn.close();
 
-      QueueControl control = (QueueControl) server.getManagementService().getResource(ResourceNames.CORE_QUEUE
+ queue.getQueueName());
+      QueueControl control = (QueueControl) server.getManagementService().getResource(ResourceNames.QUEUE
+ queue.getQueueName());
       assertNotNull(control);
 
       System.out.println(control.listMessageCounterAsHTML());
@@ -63,7 +63,7 @@ public class JMSMessageCounterTest extends JMSTestBase {
 
       restartServer();
 
-      control = (QueueControl) server.getManagementService().getResource(ResourceNames.CORE_QUEUE
+ queue.getQueueName());
+      control = (QueueControl) server.getManagementService().getResource(ResourceNames.QUEUE
+ queue.getQueueName());
       assertNotNull(control);
 
       System.out.println(control.listMessageCounterAsHTML());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java
index 0a35939..147e819 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleProducersTest.java
@@ -127,7 +127,7 @@ public class MultipleProducersTest extends JMSTestBase {
       // after draining queueOne send 5 message to queueOne
       queueTwoMsgCount = server.locateQueue(queueTwoName).getMessageCount();
 
-      control = (QueueControl) server.getManagementService().getResource(ResourceNames.CORE_QUEUE
+ queueOne.getQueueName());
+      control = (QueueControl) server.getManagementService().getResource(ResourceNames.QUEUE
+ queueOne.getQueueName());
 
       control.removeMessages(null);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
index e8da058..4c18488 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeReconnectTest.java
@@ -374,7 +374,7 @@ public class BridgeReconnectTest extends BridgeTestBase {
       forwardingConnection.fail(new ActiveMQNotConnectedException());
 
       final ManagementService managementService = server0.getManagementService();
-      QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE
+ queueName);
+      QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.QUEUE
+ queueName);
       assertEquals(0, coreQueueControl.getDeliveringCount());
 
       final int numMessages = NUM_MESSAGES;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java
index c12bad0..6540559 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredMessageCounterTest.java
@@ -132,7 +132,7 @@ public class ClusteredMessageCounterTest extends ClusterTestBase {
 
          verifyReceiveAllOnSingleConsumer(true, numMsg, 1);
 
-         QueueControl control = (QueueControl) servers[1].getManagementService().getResource(ResourceNames.CORE_QUEUE
+ "queue0");
+         QueueControl control = (QueueControl) servers[1].getManagementService().getResource(ResourceNames.QUEUE
+ "queue0");
 
          //wait up to 30sec to allow the counter get updated
          long timeout = 30000;
@@ -173,7 +173,7 @@ public class ClusteredMessageCounterTest extends ClusterTestBase {
             }
          });
 
-         QueueControl control = (QueueControl) servers[1].getManagementService().getResource(ResourceNames.CORE_QUEUE
+ "queue0");
+         QueueControl control = (QueueControl) servers[1].getManagementService().getResource(ResourceNames.QUEUE
+ "queue0");
          ActiveMQServerControl serverControl = (ActiveMQServerControl) servers[1].getManagementService().getResource(ResourceNames.BROKER);
          serverControl.setMessageCounterSamplePeriod(300);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java
index 7e10297..e7b95bb 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithPagingServerTest.java
@@ -17,7 +17,11 @@
 package org.apache.activemq.artemis.tests.integration.management;
 
 import javax.json.JsonArray;
+import javax.json.JsonObject;
+import javax.json.JsonValue;
 import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.JsonUtil;
@@ -35,6 +39,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.core.settings.impl.AddressFullMessagePolicy;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.utils.RandomUtil;
+import org.apache.johnzon.core.JsonLongImpl;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -79,7 +84,16 @@ public class ManagementWithPagingServerTest extends ManagementTestBase
{
       String result = queueControl.listMessagesAsJSON(null);
 
       JsonArray array = JsonUtil.readJsonArray(result);
-
+      List<Long> longs = new ArrayList<>();
+      for (JsonValue jsonValue : array) {
+         JsonValue val = ((JsonObject) jsonValue).get("messageID");
+         Long l = ((JsonLongImpl) val).longValue();
+         if (longs.contains(l)) {
+            System.out.println("ManagementWithPagingServerTest.testListMessagesAsJSON");
+         }
+         longs.add(l);
+         System.out.println("jsonValue = " + jsonValue);
+      }
       assertEquals(num, array.size());
 
       //kick off receiver
@@ -235,6 +249,7 @@ public class ManagementWithPagingServerTest extends ManagementTestBase
{
 
             for (int i = 0; i < num; i++) {
                ClientMessage message = session1.createMessage(true);
+               message.setPriority((byte) 1);
                ActiveMQBuffer buffer = message.getBodyBuffer();
                buffer.writeBytes(body);
                producer.send(message);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
index 035d4ca..5c94f1d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
@@ -87,7 +87,7 @@ public class ManagementWithStompTest extends ManagementTestBase {
       // retrieve the address of the queue
       frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress()
+ "\n" +
          "reply-to:" + address + "\n" +
-         "_AMQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
+         "_AMQ_ResourceName:" + ResourceNames.QUEUE + queue + "\n" +
          "_AMQ_Attribute: Address\n\n" +
          Stomp.NULL;
       sendFrame(frame);
@@ -129,7 +129,7 @@ public class ManagementWithStompTest extends ManagementTestBase {
       // count number of message with filter "color = 'blue'"
       frame = "\nSEND\n" + "destination:" + ActiveMQDefaultConfiguration.getDefaultManagementAddress()
+ "\n" +
          "reply-to:" + address + "\n" +
-         "_AMQ_ResourceName:" + ResourceNames.CORE_QUEUE + queue + "\n" +
+         "_AMQ_ResourceName:" + ResourceNames.QUEUE + queue + "\n" +
          "_AMQ_OperationName: countMessages\n\n" +
          "[\"color = 'blue'\"]" +
          Stomp.NULL;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
index 4dd418b..250289a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java
@@ -30,7 +30,7 @@ public class QueueControlUsingCoreTest extends QueueControlTest {
    protected QueueControl createManagementControl(final SimpleString address,
                                                   final SimpleString queue) throws Exception
{
       return new QueueControl() {
-         private final CoreMessagingProxy proxy = new CoreMessagingProxy(addServerLocator(createInVMNonHALocator()),
ResourceNames.CORE_QUEUE + queue);
+         private final CoreMessagingProxy proxy = new CoreMessagingProxy(addServerLocator(createInVMNonHALocator()),
ResourceNames.QUEUE + queue);
 
          @Override
          public void flushExecutor() {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d9618528/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java
index d2bdd19..64f6626 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java
@@ -341,7 +341,7 @@ public class LocalTestServer implements Server, Runnable {
 
    @Override
    public void removeAllMessages(final String queueName) throws Exception {
-      QueueControl queue = (QueueControl) getActiveMQServer().getManagementService().getResource(ResourceNames.CORE_QUEUE
+ queueName);
+      QueueControl queue = (QueueControl) getActiveMQServer().getManagementService().getResource(ResourceNames.QUEUE
+ queueName);
       queue.removeMessages(null);
    }
 


Mime
View raw message