[
https://issues.apache.org/jira/browse/QPID-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620214#action_12620214
]
Rafael H. Schloming commented on QPID-1220:
-------------------------------------------
I believe there is an inherent race condition in the test. It looks like the
main thread is actually fast enough that it is doing the write caused by
sessionAttach before IoReceiver gets around to actually closing IoSender. I
think this race condition has always been there, but the likelyhood has
probably been increased by the recent performance work.
I can think of two fixes. We could add a sleep prior to the sessionAttach. This
would test that the I/OReceiver is properly cleaning up the thread. Another fix
would be to explicitly close the session in the closed listener prior to doing
closed.set(). This would test something a bit different since the session would
be guaranteed to be closed when we issue the sessionAttach. It might actually
be worth doing both variants as they test slightly different things.
> ConnectionTest testClosedNotificationAndWriteToClosed fails intermittently
> --------------------------------------------------------------------------
>
> Key: QPID-1220
> URL: https://issues.apache.org/jira/browse/QPID-1220
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: M3
> Reporter: Aidan Skinner
> Assignee: Aidan Skinner
> Fix For: M3
>
>
> junit.framework.AssertionFailedError: writing to a closed socket succeeded
> at
> org.apache.qpid.transport.ConnectionTest.testClosedNotificationAndWriteToClosed(ConnectionTest.java:110)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.