summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index e92817f713..25439aba94 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -658,6 +658,8 @@ public class AMQProtocolHandler extends IoHandlerAdapter
}
_frameListeners.add(listener);
+ //FIXME: At this point here we should check or before add we should check _stateManager is in an open
+ // state so as we don't check we are likely just to time out here as I believe is being seen in QPID-1255
}
_protocolSession.writeFrame(frame);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
index db29b2d5f9..a85faa230f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
@@ -290,7 +290,9 @@ public class SimpleACLTest extends TestCase implements ConnectionListener
// Test the connection with a valid consumer
// This may fail as the session may be closed before the queue or the consumer created.
- session.createConsumer(session.createTemporaryQueue()).close();
+ Queue temp = session.createTemporaryQueue();
+
+ session.createConsumer(temp).close();
//Connection should now be closed and will throw the exception caused by the above send
conn.close();
@@ -300,6 +302,10 @@ public class SimpleACLTest extends TestCase implements ConnectionListener
catch (JMSException e)
{
Throwable cause = e.getLinkedException();
+ if (!(cause instanceof AMQAuthenticationException))
+ {
+ e.printStackTrace();
+ }
assertEquals("Incorrect exception", AMQAuthenticationException.class, cause.getClass());
assertEquals("Incorrect error code thrown", 403, ((AMQAuthenticationException) cause).getErrorCode().getCode());
}