[
https://issues.apache.org/jira/browse/QPID-3812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200538#comment-13200538
]
Keith Wall commented on QPID-3812:
----------------------------------
This is a race condition. The Broker is sending the ConnectionOpenOk back to
the client before it has updated its ConnectionRegistry. This leaves open the
possibility that the ExceptionListenerTest can shut the broker down before the
client's connection is registered internally, meaning that the Broker won't
close the connection and the client won't get to report the exception to the
client app.
{code}
BROKER: IoReceiver - /127.0.0.1:36012 2012-02-03 17:48:38,871 DEBUG
[apache.qpid.transport.Connection] SEND: [conn:621e4cf0] ch=0
ConnectionOpenOk(knownHosts=[])
CLIENT: IoReceiver - localhost/127.0.0.1:15672 2012-02-03 17:48:38,871 DEBUG
[apache.qpid.transport.Connection] RECV: [conn:3e0245c] ch=0
ConnectionOpenOk(knownHosts=null)
CLIENT: main 2012-02-03 17:48:38,871 DEBUG [qpid.test.utils.QpidBrokerTestCase]
%%%%%%%%%%%%%%%% Stopping Broker %%%%%%%%%%%%%%%%%%%%%
CLIENT: main 2012-02-03 17:48:38,871 INFO [qpid.test.utils.QpidBrokerTestCase]
stopping broker on port : 15672
..
BROKER: main 2012-02-03 17:48:38,872 DEBUG
[qpid.server.connection.ConnectionRegistry] Closing connection registry :0
connections.
..
BROKER: IoReceiver - /127.0.0.1:36012 2012-02-03 17:48:38,872 INFO
[qpid.message.connection.open] [con:726(clientid@/127.0.0.1:36012/test)]
CON-1001 : Open : Client ID : clientid : Protocol Version : 0-10
{code}
It looks to me like problem is with ServerConnectionDelegate.java, line 172.
The Broker should be updating its internal state before sending the
ConnectionOpenOk.
> [Java] ExceptionListenerTest sporadically fails on java-mms-0.10
> ----------------------------------------------------------------
>
> Key: QPID-3812
> URL: https://issues.apache.org/jira/browse/QPID-3812
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: 0.15
> Environment: Linux ubuntu 2.6.35-32-server #64-Ubuntu SMP Tue Jan 3
> 02:11:24 UTC 2012 x86_64 GNU/Linux
> Reporter: Keith Wall
>
> Profile: java-mms.0-10
> Test: testBrokerDeath
> Class:
> org.apache.qpid.test.unit.client.connection.ExceptionListenerTest
>
> {code}
> junit.framework.AssertionFailedError: exception listener was not fired
> at
> org.apache.qpid.test.unit.client.connection.ExceptionListenerTest.testBrokerDeath(ExceptionListenerTest.java:58)
>
> at org.apache.qpid.test.utils.QpidTestCase.runBare(QpidTestCase.java:186)
> at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:220)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]