Author: timfox
Date: 2009-10-01 05:09:08 -0400 (Thu, 01 Oct 2009)
New Revision: 8022
Modified:
trunk/src/main/org/hornetq/core/remoting/impl/ChannelImpl.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
Log:
fixed hanging test
Modified: trunk/src/main/org/hornetq/core/remoting/impl/ChannelImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/remoting/impl/ChannelImpl.java 2009-10-01 08:27:04 UTC
(rev 8021)
+++ trunk/src/main/org/hornetq/core/remoting/impl/ChannelImpl.java 2009-10-01 09:09:08 UTC
(rev 8022)
@@ -347,7 +347,7 @@
if (sendSemaphore != null)
{
//Any threads blocking on the send semaphore should be allowed to return
- sendSemaphore.release(Integer.MAX_VALUE);
+ sendSemaphore.release(Integer.MAX_VALUE - sendSemaphore.availablePermits());
}
if (!connection.isDestroyed() && !connection.removeChannel(id))
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2009-10-01
08:27:04 UTC (rev 8021)
+++
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/ReattachTest.java 2009-10-01
09:09:08 UTC (rev 8022)
@@ -416,6 +416,8 @@
t.start();
+ log.info("Failing connection");
+
conn.fail(new HornetQException(HornetQException.NOT_CONNECTED));
session.start();
Show replies by date