activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [activemq-artemis] branch main updated: ARTEMIS-3346 test for typo fix
Date Mon, 14 Jun 2021 15:26:11 GMT
This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new a7089d0  ARTEMIS-3346 test for typo fix
a7089d0 is described below

commit a7089d005001ff9c08d6635fa6fa6109d7acb70f
Author: Justin Bertram <jbertram@apache.org>
AuthorDate: Mon Jun 14 10:25:33 2021 -0500

    ARTEMIS-3346 test for typo fix
---
 .../org/apache/activemq/artemis/jms/client/ConversionTest.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java
b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java
index 541e0cc..b169172 100644
--- a/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java
+++ b/artemis-jms-client/src/test/java/org/apache/activemq/artemis/jms/client/ConversionTest.java
@@ -18,12 +18,15 @@ package org.apache.activemq.artemis.jms.client;
 
 import org.apache.activemq.artemis.api.core.ICoreMessage;
 import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl;
+import org.apache.activemq.artemis.utils.UUID;
+import org.apache.activemq.artemis.utils.UUIDGenerator;
 import org.junit.Test;
 
 import java.util.Map;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Test conversion from Core message to JMS message.
@@ -32,15 +35,19 @@ public class ConversionTest {
 
    @Test
    public void testCoreToJMSConversion() {
+      UUID uuid = UUIDGenerator.getInstance().generateUUID();
       ICoreMessage clientMessage = new ClientMessageImpl();
       clientMessage.setDurable(true)
               .setPriority((byte) 9)
-              .setExpiration(123456);
+              .setExpiration(123456)
+              .setUserID(uuid);
       Map<String, Object> messageMap = clientMessage.toMap();
       Map<String, Object> jmsMap = ActiveMQMessage.coreMaptoJMSMap(messageMap);
 
       Object priority = jmsMap.get("JMSPriority");
       assertTrue(priority instanceof Integer);
       assertEquals(9, priority);
+      assertNotNull(jmsMap.get("JMSMessageID"));
+      assertEquals("ID:" + uuid, jmsMap.get("JMSMessageID"));
    }
 }

Mime
View raw message