activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r742377 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
Date Mon, 09 Feb 2009 10:26:20 GMT
Author: gtully
Date: Mon Feb  9 10:26:19 2009
New Revision: 742377

URL: http://svn.apache.org/viewvc?rev=742377&view=rev
Log:
add extra assert to consumer advisory test

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java?rev=742377&r1=742376&r2=742377&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
Mon Feb  9 10:26:19 2009
@@ -35,6 +35,7 @@
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.command.ActiveMQMessage;
 
 /**
  * @version $Revision: 1.3 $
@@ -121,11 +122,17 @@
         BytesMessage m = s.createBytesMessage();
         m.writeBytes(new byte[1024]);
         producer.send(m);
+        String id = m.getJMSMessageID();
         Message msg = consumer.receive(1000);
         assertNotNull(msg);
         
         msg = advisoryConsumer.receive(1000);
         assertNotNull(msg);
+        
+        ActiveMQMessage message = (ActiveMQMessage) msg;
+        ActiveMQMessage payload = (ActiveMQMessage) message.getDataStructure();
+        String originalId = payload.getJMSMessageID();
+        assertEquals(originalId, id);
     }
     
     public void testMessageExpiredAdvisory() throws Exception {



Mime
View raw message