From 9ea403d9d1f8ce1b01dfe0cc6e7a4e76a27b38c4 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Thu, 9 Feb 2012 14:31:19 +0000 Subject: 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 --- .../qpid/client/AMQConnectionDelegate_8_0.java | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'java/client/src') 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) -- cgit v1.2.1