[
https://issues.apache.org/jira/browse/ZOOKEEPER-1202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172535#comment-13172535
]
Matthias Spycher commented on ZOOKEEPER-1202:
---------------------------------------------
ClientCloseTest.testExpiration() is failing here, but I'm unable to reproduce
this on my system (Windows 7).
Patrick, can you take a look and let me know if there's a better way to ensure
the server expires the client's session in the testExpiration() method.
>From the logs it appears the SessionExpiredException wasn't thrown on the
>client-side (which happens every time on my system).
Thanks.
> Prevent certain state transitions in Java client on close(); improve
> exception handling and enhance client testability
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1202
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1202
> Project: ZooKeeper
> Issue Type: Improvement
> Components: java client
> Affects Versions: 3.4.0
> Reporter: Matthias Spycher
> Assignee: Matthias Spycher
> Attachments: ZOOKEEPER-1202.patch
>
>
> ZooKeeper.close() doesn't force the client into a CLOSED state. While the
> closing flag ensures that the client will close, its state may end up in
> CLOSED, CONNECTING or CONNECTED.
> I developed a patch and in the process cleaned up a few other things
> primarily to enable testing of state transitions.
> - ClientCnxnState is new and enforces certain state transitions
> - ZooKeeper.isExpired() is new
> - ClientCnxn no longer refers to ZooKeeper, WatchManager is externalized, and
> ClientWatchManager includes 3 new methods
> - The SendThread terminates the EventThread on a call to close() via the
> event-of-death
> - Polymorphism is used to handle internal exceptions (SendIOExceptions)
> - The patch incorporates ZOOKEEPER-126.patch and prevents close() from
> blocking
--
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