diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2008-08-21 09:32:02 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2008-08-21 09:32:02 +0000 |
| commit | 2a22818dc416bffd7178ccbe1283db14749e156c (patch) | |
| tree | b3a09472462b9a4b05af79fcc6646bd0a9f778db /qpid/java | |
| parent | 45de30b9ac58303ca2a675baa9c06e32bd9be178 (diff) | |
| download | qpid-python-2a22818dc416bffd7178ccbe1283db14749e156c.tar.gz | |
QPID-1225 : Temporary commit to allow CI systems to help diagnose cause of race condition. My guess is that the session is open but closes right after the isClosed call is done. So the client the goes on and does a waitForFrame that never arrives causing the timeout exceptions. As commented in AMQPH if we add our frame listener such that it will receive any existing and subsequent exceptions, such as connection closing whilst we add them to the framelisteners then I think this will resolve the issue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@687664 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java | 2 | ||||
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java | 8 |
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()); } |
