Author: ritchiem
Date: Thu Aug 21 02:32:02 2008
New Revision: 687664

URL: http://svn.apache.org/viewvc?rev=687664&view=rev
Log:
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.

Modified:
    
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java

Modified: 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?rev=687664&r1=687663&r2=687664&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
 Thu Aug 21 02:32:02 2008
@@ -658,6 +658,8 @@
                 }
 
                 _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);
 

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java?rev=687664&r1=687663&r2=687664&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/SimpleACLTest.java
 Thu Aug 21 02:32:02 2008
@@ -290,7 +290,9 @@
 
             // 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 @@
         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());
         }


Reply via email to