Author: clebert.suconic(a)jboss.com
Date: 2011-01-30 00:21:37 -0500 (Sun, 30 Jan 2011)
New Revision: 10163
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java
Log:
tweak on counters
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-01-30
04:39:41 UTC (rev 10162)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-01-30
05:21:37 UTC (rev 10163)
@@ -821,7 +821,7 @@
{
if (pageSubscription != null)
{
- return messagesAdded + pageSubscription.getCounter().getValue();
+ return messagesAdded + pageSubscription.getCounter().getValue() -
pagedReferences.get();
}
else
{
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java 2011-01-30
04:39:41 UTC (rev 10162)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/PagingOrderTest.java 2011-01-30
05:21:37 UTC (rev 10163)
@@ -156,7 +156,7 @@
ClientSession session = sf.createSession(false, false, false);
- session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);
+ Queue queue = server.createQueue(ADDRESS, ADDRESS, null, true, false);
ClientProducer producer = session.createProducer(PagingTest.ADDRESS);
@@ -215,6 +215,12 @@
{
sessionServer.close(true);
}
+
+
+ OperationContextImpl.getContext().waitCompletion();
+
+ assertEquals(numberOfMessages - 100, queue.getMessageCount());
+ assertEquals(numberOfMessages, queue.getMessagesAdded());
OperationContextImpl.getContext().waitCompletion();
Show replies by date