Author: ritchiem
Date: Tue Jan 19 20:25:00 2010
New Revision: 900943
URL: http://svn.apache.org/viewvc?rev=900943&view=rev
Log:
QPID-2262 : Removed SALCT from from exclude list and added required null check.
Updated references to QPID-1204 to QPID-2345 which talks more to the issue of
setting exception cause when the connection is closed by the broker.
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
qpid/trunk/qpid/java/test-profiles/Excludes
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java?rev=900943&r1=900942&r2=900943&view=diff
==============================================================================
---
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
(original)
+++
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
Tue Jan 19 20:25:00 2010
@@ -438,17 +438,34 @@
catch (JMSException e)
{
Throwable cause = e.getLinkedException();
- if (!(cause instanceof AMQAuthenticationException))
+
+ if (cause == null)
{
- e.printStackTrace();
+ e.printStackTrace(System.out);
+ if (e instanceof IllegalStateException)
+ {
+ System.out.println("QPID-2345: Session became closed and
we got that error rather than the authentication error.");
+ }
+ else
+ {
+ fail("JMS Exception of did not have cause.:" +
e.getMessage());
+ }
}
- assertEquals("Incorrect exception",
AMQAuthenticationException.class, cause.getClass());
- assertEquals("Incorrect error code thrown", 403,
((AMQAuthenticationException) cause).getErrorCode().getCode());
-
- //use the latch to ensure the control thread waits long enough for
the exception thread
- //to have done enough to mark the connection closed before
teardown commences
- assertTrue("Timed out waiting for conneciton to report close",
- exceptionReceived.await(2, TimeUnit.SECONDS));
+ else
+ {
+ if (!(cause instanceof AMQAuthenticationException))
+ {
+ e.printStackTrace();
+ }
+ assertEquals("Incorrect exception",
AMQAuthenticationException.class, cause.getClass());
+ assertEquals("Incorrect error code thrown", 403,
((AMQAuthenticationException) cause).getErrorCode().getCode());
+
+ //use the latch to ensure the control thread waits long enough
for the exception thread
+ //to have done enough to mark the connection closed before
teardown commences
+ assertTrue("Timed out waiting for connection to report close",
+ exceptionReceived.await(2, TimeUnit.SECONDS));
+ }
+
}
}
@@ -876,13 +893,20 @@
if (cause == null)
{
e.printStackTrace(System.out);
- fail("JMS Exception did not have cause");
+ if (e instanceof IllegalStateException)
+ {
+ System.out.println("QPID-2345: Session became closed and
we got that error rather than the authentication error.");
+ }
+ else
+ {
+ fail("JMS Exception of did not have cause.:" +
e.getMessage());
+ }
}
else if (!(cause instanceof AMQAuthenticationException))
{
cause.printStackTrace(System.out);
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.");
+ System.out.println("QPID-2345: Session became closed and we
got that error rather than the authentication error.");
}
else
{
Modified: qpid/trunk/qpid/java/test-profiles/Excludes
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/Excludes?rev=900943&r1=900942&r2=900943&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/Excludes (original)
+++ qpid/trunk/qpid/java/test-profiles/Excludes Tue Jan 19 20:25:00 2010
@@ -34,5 +34,3 @@
org.apache.qpid.transport.network.mina.MINANetworkDriverTest#*
// QPID-2225 Random Test failures against the in-vm broker.
org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecover#*
-// QPID-2262 Random test failures - The test needs to be fixed.
-org.apache.qpid.server.security.acl.SimpleACLTest#testClientPublishInvalidQueueSuccess
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]