summaryrefslogtreecommitdiff
path: root/java/client/src
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-02-09 14:31:19 +0000
committerKeith Wall <kwall@apache.org>2012-02-09 14:31:19 +0000
commit496a662b96aeecc58791f4a63ff6e82393f6443a (patch)
treeeb41a9c5755454acab5f0794f629d587437e84e7 /java/client/src
parent8088e90d4992b66de3afc1f24c5bbed6e5e5921b (diff)
downloadqpid-python-496a662b96aeecc58791f4a63ff6e82393f6443a.tar.gz
QPID-3819: ExhaustiveACLTests seen to timeout
Backout changes to AMQStateManager made by QPID-3512 as these changes were causing the client to hang for 30 seconds after the Broker closed connection due to ACL violation. Refactored ConnectionCloseTest (now called BrokerClosesClientConnectionTest) to avoid the sporadic failure by verifying that the closed connection is reported correctly to the client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1242338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java25
1 files changed, 1 insertions, 24 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
index 81902699ab..08ee7c3705 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
@@ -71,30 +71,7 @@ public class AMQConnectionDelegate_8_0 implements AMQConnectionDelegate
public void closeConnection(long timeout) throws JMSException, AMQException
{
- final AMQStateManager stateManager = _conn.getProtocolHandler().getStateManager();
- final AMQState currentState = stateManager.getCurrentState();
-
- if (currentState.equals(AMQState.CONNECTION_CLOSED))
- {
- _logger.debug("Connection already closed.");
- }
- else if (currentState.equals(AMQState.CONNECTION_CLOSING))
- {
- _logger.debug("Connection already closing, awaiting closed state.");
- final StateWaiter closeWaiter = new StateWaiter(stateManager, currentState, EnumSet.of(AMQState.CONNECTION_CLOSED));
- try
- {
- closeWaiter.await(timeout);
- }
- catch (AMQTimeoutException te)
- {
- throw new AMQTimeoutException("Close did not complete in timely fashion", te);
- }
- }
- else
- {
- _conn.getProtocolHandler().closeConnection(timeout);
- }
+ _conn.getProtocolHandler().closeConnection(timeout);
}
public AMQConnectionDelegate_8_0(AMQConnection conn)