[
https://issues.apache.org/jira/browse/ZOOKEEPER-1730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13717921#comment-13717921
]
Thawan Kooburat commented on ZOOKEEPER-1730:
--------------------------------------------
Sorry, I just tested your patch manually. Here is what i see
In this case, when you caused the SendThread to exit, it will be the same as
trigger connection loss. On exit, SendThread will queue connection loss event
if the state.isAlive() is true (but it isn't in the current patch)
So if you call sendThread.join() before queuing session expire event and modify
the SendThread exit path a bit we should get disconnect event and then
followed by session expire.
So this is why I think it is a just a bit more effort to add
injectDiscconnect() into this patch.
> Make ZooKeeper easier to test - support simulating a session expiration
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-1730
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1730
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: java client
> Reporter: Jordan Zimmerman
> Assignee: Jordan Zimmerman
> Fix For: 3.5.0
>
> Attachments: gitdiff, ZOOKEEPER-1730-2.patch, ZOOKEEPER-1730-3.patch
>
>
> As part of making ZooKeeper clients more test friendly, it would be useful to
> easily simulate a session loss event
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira