activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1009 Fixing Management test
Date Fri, 10 Mar 2017 00:15:21 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0b1e48a7f -> ed1d4c094


ARTEMIS-1009 Fixing Management test


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

Branch: refs/heads/master
Commit: ed1d4c09484edc47f2b1661121d24d63daa5c1dc
Parents: 0b1e48a
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Thu Mar 9 19:14:59 2017 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu Mar 9 19:14:59 2017 -0500

----------------------------------------------------------------------
 .../impl/openmbean/OpenTypeSupport.java         |  5 ----
 .../management/QueueControlTest.java            | 29 ++------------------
 2 files changed, 2 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ed1d4c09/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
index 098c61c..e7df48b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/openmbean/OpenTypeSupport.java
@@ -145,11 +145,6 @@ public final class OpenTypeSupport {
          rc.put(CompositeDataConstants.PRIORITY, m.getPriority());
          rc.put(CompositeDataConstants.REDELIVERED, ref.getDeliveryCount() > 1);
 
-         ActiveMQBuffer bodyCopy = m.getReadOnlyBodyBuffer();
-         byte[] bytes = new byte[bodyCopy.readableBytes()];
-         bodyCopy.readBytes(bytes);
-         rc.put(CompositeDataConstants.BODY, bytes);
-
          Map<String, Object> propertyMap = m.toPropertyMap();
 
          rc.put(CompositeDataConstants.PROPERTIES, "" + propertyMap);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ed1d4c09/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
index d7539a4..212aa37 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
@@ -2109,7 +2109,7 @@ public class QueueControlTest extends ManagementTestBase {
 
       QueueControl queueControl = createManagementControl(address, queue);
 
-      queueControl.sendMessage(new HashMap<String, String>(), Message.TEXT_TYPE, Base64.encodeBytes("theBody".getBytes()),
true, "myUser", "myPassword");
+      queueControl.sendMessage(new HashMap<String, String>(), Message.BYTES_TYPE, Base64.encodeBytes("theBody".getBytes()),
true, "myUser", "myPassword");
 
       Assert.assertEquals(1, getMessageCount(queueControl));
 
@@ -2118,38 +2118,13 @@ public class QueueControlTest extends ManagementTestBase {
 
       Assert.assertEquals(1, browse.length);
 
-      byte[] body = (byte[]) browse[0].get("body");
+      byte[] body = (byte[]) browse[0].get("BodyPreview");
 
       Assert.assertNotNull(body);
 
       Assert.assertEquals(new String(body), "theBody");
    }
 
-   @Test
-   public void testSendNullMessage() throws Exception {
-      SimpleString address = RandomUtil.randomSimpleString();
-      SimpleString queue = RandomUtil.randomSimpleString();
-
-      session.createQueue(address, queue, null, false);
-
-      QueueControl queueControl = createManagementControl(address, queue);
-
-      queueControl.sendMessage(new HashMap<String, String>(), Message.TEXT_TYPE, null,
true, "myUser", "myPassword");
-
-      Assert.assertEquals(1, getMessageCount(queueControl));
-
-      // the message IDs are set on the server
-      CompositeData[] browse = queueControl.browse(null);
-
-      Assert.assertEquals(1, browse.length);
-
-      byte[] body = (byte[]) browse[0].get("body");
-
-      Assert.assertNotNull(body);
-
-      Assert.assertEquals(new String(body), "");
-   }
-
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------


Mime
View raw message