Author: clebert.suconic(a)jboss.com
Date: 2010-11-16 10:27:14 -0500 (Tue, 16 Nov 2010)
New Revision: 9893
Modified:
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
Fixing tests
Modified:
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
---
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2010-11-16
03:57:19 UTC (rev 9892)
+++
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2010-11-16
15:27:14 UTC (rev 9893)
@@ -323,8 +323,12 @@
{
if (isBrowseOnly())
{
- log.warn("receive timeout is not effective on browsing, ignoring
timeout");
- return receive(0, true);
+ ClientMessage msg = receive(timeout, false);
+ if (msg == null)
+ {
+ msg = receive(0, true);
+ }
+ return msg;
}
else
{
Modified:
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
---
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/server/impl/QueueImpl.java 2010-11-16
03:57:19 UTC (rev 9892)
+++
branches/Branch_New_Paging_preMerge/src/main/org/hornetq/core/server/impl/QueueImpl.java 2010-11-16
15:27:14 UTC (rev 9893)
@@ -1255,7 +1255,7 @@
}
}
- if (messageReferences.size() == 0 && pageIterator.hasNext())
+ if (pageIterator != null && messageReferences.size() == 0 &&
pageIterator.hasNext())
{
scheduleDepage();
}
Show replies by date