You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2010/02/09 18:19:49 UTC
svn commit: r908121 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
Author: gtully
Date: Tue Feb 9 17:19:49 2010
New Revision: 908121
URL: http://svn.apache.org/viewvc?rev=908121&view=rev
Log:
browser snapshot of paged in messages is only guaranteed to be > pageSize, test should assert that only
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java?rev=908121&r1=908120&r2=908121&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java Tue Feb 9 17:19:49 2010
@@ -29,6 +29,7 @@
import javax.jms.TextMessage;
import org.apache.activemq.broker.StubConnection;
+import org.apache.activemq.broker.region.BaseDestination;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ConnectionInfo;
@@ -177,7 +178,11 @@
assertNotNull("m2 is null for index: " + i, m2);
assertEquals(m1.getJMSMessageID(), m2.getJMSMessageID());
}
- assertEquals("got all: ", numMessages, i);
+
+ // currently browse max page size is ignored for a queue browser consumer
+ // only guarantee is a page size - but a snapshot of pagedinpending is
+ // used so it is most likely more
+ assertTrue("got at least our expected minimum in the browser: ", i > BaseDestination.MAX_PAGE_SIZE);
assertFalse("nothing left in the browser", browserView.hasMoreElements());
assertNull("consumer finished", consumer.receiveNoWait());