Author: clebert.suconic(a)jboss.com
Date: 2010-12-17 14:09:02 -0500 (Fri, 17 Dec 2010)
New Revision: 10055
Modified:
trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java
Log:
Fixing tests
Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2010-12-17 19:07:26 UTC
(rev 10054)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2010-12-17 19:09:02 UTC
(rev 10055)
@@ -659,7 +659,14 @@
synchronized (this)
{
- return messageReferences.size() + getScheduledCount() + getDeliveringCount() +
pageSubscription.getCounter().getValue();
+ if (pageSubscription != null)
+ {
+ return messageReferences.size() + getScheduledCount() + getDeliveringCount()
+ pageSubscription.getCounter().getValue();
+ }
+ else
+ {
+ return messageReferences.size() + getScheduledCount() +
getDeliveringCount();
+ }
}
}
Modified:
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java 2010-12-17
19:07:26 UTC (rev 10054)
+++
trunk/tests/src/org/hornetq/tests/integration/management/QueueControlUsingCoreTest.java 2010-12-17
19:09:02 UTC (rev 10055)
@@ -71,7 +71,7 @@
public long countMessages(final String filter) throws Exception
{
- return (Long)proxy.invokeOperation("countMessages", filter);
+ return ((Number)proxy.invokeOperation("countMessages",
filter)).longValue();
}
public boolean expireMessage(final long messageID) throws Exception
@@ -116,7 +116,7 @@
public long getMessageCount()
{
- return (Long)proxy.retrieveAttributeValue("messageCount");
+ return
((Number)proxy.retrieveAttributeValue("messageCount")).longValue();
}
public long getMessagesAdded()
Show replies by date