[
https://issues.apache.org/jira/browse/ZOOKEEPER-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13702264#comment-13702264
]
Thawan Kooburat commented on ZOOKEEPER-1722:
--------------------------------------------
I initially thought that we can do this by add a few hooks into client library,
so we can easily provide testing for all languages. However, this route won't
provide full test coverage.
My only concern with mock server is the effort of maintaining it to make its
behavior match the actual server-side. I don't have strong objection about
this, see if others have any suggestions.
> Make ZooKeeper clients more test friendly
> -----------------------------------------
>
> Key: ZOOKEEPER-1722
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1722
> Project: ZooKeeper
> Issue Type: Improvement
> Components: c client, java client
> Reporter: Thawan Kooburat
>
> We should be able to expose a few more API calls that allow user write unit
> tests that cover various failure scenarios (similar to the TestableZookeer in
> zookeeper test). This should also minimize the effort on setting the test
> framework for application developer
> Here is some example calls that we should provide.
> 1. zookeeper_close() that don't actually send close request to the server:
> This can be used to simulate a client crash without actually crashing the
> test program.
> 2. Allow client to trigger CONNECTION_LOSS or SESSSION_EXPIRE event: This
> will allow the user to test their watchers and callback (and possible race
> condition)
--
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