activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1503727 - /activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
Date Tue, 16 Jul 2013 14:15:38 GMT
Author: tabish
Date: Tue Jul 16 14:15:37 2013
New Revision: 1503727

URL: http://svn.apache.org/r1503727
Log:
Test updates, use a proper MessageId and add some logging so the level DB test errors are
more obvious.

Modified:
    activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java

Modified: activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java?rev=1503727&r1=1503726&r2=1503727&view=diff
==============================================================================
--- activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
(original)
+++ activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorNoDuplicateTest.java
Tue Jul 16 14:15:37 2013
@@ -31,6 +31,7 @@ import org.apache.activemq.command.Messa
 import org.apache.activemq.store.MessageStore;
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.usage.SystemUsage;
+import org.mortbay.log.Log;
 
 /**
  * @author gtully
@@ -41,12 +42,13 @@ public class StoreQueueCursorNoDuplicate
             + StoreQueueCursorNoDuplicateTest.class.getSimpleName());
     BrokerService brokerService;
 
-    final static String mesageIdRoot = "11111:22222:";
+    final static String mesageIdRoot = "11111:22222:0:";
     final int messageBytesSize = 1024;
     final String text = new String(new byte[messageBytesSize]);
 
     protected int count = 6;
 
+    @Override
     public void setUp() throws Exception {
         brokerService = createBroker();
         brokerService.setUseJmx(false);
@@ -58,6 +60,7 @@ public class StoreQueueCursorNoDuplicate
         return new BrokerService();
     }
 
+    @Override
     public void tearDown() throws Exception {
         brokerService.stop();
     }
@@ -103,8 +106,9 @@ public class StoreQueueCursorNoDuplicate
             MessageReference ref = underTest.next();
             ref.decrementReferenceCount();
             underTest.remove();
-            assertEquals(dequeueCount++, ref.getMessageId()
-                    .getProducerSequenceId());
+            Log.info("Received message: {} with body: {}",
+                     ref.getMessageId(), ((ActiveMQTextMessage)ref.getMessage()).getText());
+            assertEquals(dequeueCount++, ref.getMessageId().getProducerSequenceId());
         }
         underTest.release();
         assertEquals(count, dequeueCount);



Mime
View raw message