diff options
Diffstat (limited to 'java')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java b/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java index 8ed3605723..a643230bc2 100644 --- a/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java +++ b/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java @@ -31,6 +31,7 @@ import org.apache.qpid.jms.ConnectionListener; import org.apache.qpid.url.URLSyntaxException; import javax.jms.*; +import javax.jms.IllegalStateException; import java.io.File; @@ -288,6 +289,7 @@ public class SimpleACLTest extends TestCase implements ConnectionListener DeliveryMode.NON_PERSISTENT, 0, 0L, false, false, true); // 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(); //Connection should now be closed and will throw the exception caused by the above send @@ -295,6 +297,11 @@ public class SimpleACLTest extends TestCase implements ConnectionListener fail("Close is not expected to succeed."); } + catch (IllegalStateException ise) + { + System.err.println("QPID-826 : WARNING : Unable to determine cause of failure due to closure as we don't " + + "record it for reporting after connection closed asynchronously"); + } catch (JMSException e) { Throwable cause = e.getLinkedException(); @@ -540,6 +547,9 @@ public class SimpleACLTest extends TestCase implements ConnectionListener DeliveryMode.NON_PERSISTENT, 0, 0L, false, false, true); // Test the connection with a valid consumer + // This may not work as the session may be closed before the queue or consumer creation can occur. + // The correct JMSexception with linked error will only occur when the close method is recevied whilst in + // the failover safe block session.createConsumer(session.createQueue("example.RequestQueue")).close(); //Connection should now be closed and will throw the exception caused by the above send @@ -547,6 +557,11 @@ public class SimpleACLTest extends TestCase implements ConnectionListener fail("Close is not expected to succeed."); } + catch (IllegalStateException ise) + { + System.err.println("QPID-826 : WARNING : Unable to determine cause of failure due to closure as we don't " + + "record it for reporting after connection closed asynchronously"); + } catch (JMSException e) { Throwable cause = e.getLinkedException(); |
