[
https://issues.apache.org/jira/browse/QPID-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750397#action_12750397
]
Martin Ritchie commented on QPID-1809:
--------------------------------------
The race condition is highlighted by this test but the cause of the majority of
client Timeout Exceptions can be traced to this is problem:
Two threads exist in this scenario (there may be more but that isn't important).
Thread 1)The main client thread starts to perform a synchronous network
operations.
Thread 2)The IO layer recevies a connection close error from the broker which
it then starts to propogate through the client.
Most of the time Thread 1 will get to register its frameListener before Thread
2 propogates the error but in the cases where it does not Thread 1 will
timeout.
This can be resolved by notifiying the StateManager as early as possible of the
error state. The StateManager then needs to set the State CLOSED or at least
CLOSING.
This change then allows Thread 1 to be notified by Thread 2 if its
frameListener registration happends before the propagation. If the registration
is attempted after the notification then the StateManager will be set to CLOSED
or CLOSING and will have the error that caused the state change to rethrown.
> SimpleACLTest..testServerPublishInvalidQueueSuccess fails due to incorrect
> exception
> ------------------------------------------------------------------------------------
>
> Key: QPID-1809
> URL: https://issues.apache.org/jira/browse/QPID-1809
> Project: Qpid
> Issue Type: Bug
> Components: Java Tests
> Reporter: Martin Ritchie
> Assignee: Martin Ritchie
> Fix For: 0.5
>
>
> Summary:
> Test fails fairly regularly with the following error:
> SimpleACLTest..testServerPublishInvalidQueueSuccess
> junit.framework.AssertionFailedError: Incorrect exception expected:<class
> javax.jms.IllegalStateException> but was:<class javax.jms.JMSException>
> at
> org.apache.qpid.server.security.acl.SimpleACLTest.testServerPublishInvalidQueueSuccess(SimpleACLTest.java:624)
> at org.apache.qpid.test.utils.QpidTestCase.runBare(QpidTestCase.java:188)
> at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:222)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]