You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2010/03/10 00:34:27 UTC
[jira] Commented: (ZOOKEEPER-694) Add unit tester for Zookeeper
[ https://issues.apache.org/jira/browse/ZOOKEEPER-694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843358#action_12843358 ]
Patrick Hunt commented on ZOOKEEPER-694:
----------------------------------------
Consider using mockito, other parts of Hadoop have moved to this and I think we should too (3.4.0 would be good).
ps I tried moving ZooKeeper to being an interface a long time back but was outvoted. :-(
> Add unit tester for Zookeeper
> -----------------------------
>
> Key: ZOOKEEPER-694
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-694
> Project: Zookeeper
> Issue Type: Improvement
> Components: c client, tests
> Reporter: David Rosenstrauch
> Priority: Minor
> Fix For: 3.4.0
>
>
> It would be nice to have a mock/fake version of org.apache.zookeeper.Zookeeper that could be used for unit testing. i.e., a single instance Zookeeper that operates completely in memory, with no network or disk I/O.
> This would make it possible to pass one of the memory-only fake Zookeeper's into unit tests, while using a real Zookeeper in production code.
> i.e., maybe something like this:
> public interface ZooKeeperService {
> ...
> }
> public class ZooKeeperTester implements ZooKeeperService {
> ...
> (stand-alone, in-memory, test implementation)
> ...
> }
> public class ZooKeeper implements ZooKeeperService {
> ...
> ("real" implementation)
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.