diff options
Diffstat (limited to 'qpid')
-rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java | 12 |
1 files changed, 10 insertions, 2 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 5d0e7f9186..4db11e7db8 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 @@ -619,8 +619,16 @@ public class SimpleACLTest extends QpidTestCase implements ConnectionListener { Throwable cause = e.getLinkedException(); - assertEquals("Incorrect exception", AMQAuthenticationException.class, cause.getClass()); - assertEquals("Incorrect error code thrown", 403, ((AMQAuthenticationException) cause).getErrorCode().getCode()); + if (!(cause instanceof AMQAuthenticationException)) + { + assertEquals("Incorrect exception", IllegalStateException.class, cause.getClass()); + System.out.println("QPID-1204 : Session became closed and we got that error rather than the authentication error."); + } + else + { + assertEquals("Incorrect exception", AMQAuthenticationException.class, cause.getClass()); + assertEquals("Incorrect error code thrown", 403, ((AMQAuthenticationException) cause).getErrorCode().getCode()); + } } } |