summaryrefslogtreecommitdiff
path: root/qpid/java/systests/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/systests/src')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java8
1 files changed, 7 insertions, 1 deletions
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());
}