[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628352#action_12628352
 ] 

Benjamin Reed commented on ZOOKEEPER-112:
-----------------------------------------

+1 I do have some nits: I don't really like the name ZooKeeperStub, since stub 
usually refers to a non functional implementation. ZooKeeperStub is fully 
functional but also allows disconnection. Perhaps DisconnectableZooKeeper 
maybe? You trade having disconnect on ZooKeeper with making ClientCnxn public, 
which also pollutes the public API. Perhaps ZooKeeperStub should go into 
src/java/test/org/apache/zookeeper/ZooKeeperStub. That way you get package 
visibility for ClientCnxn, but you still keep ZooKeeperStub out of the main 
tree.

Both are just nits, and I support committing the change if you don't want to 
fix it.

> src/java/main ZooKeeper.java has test code embedded into it.
> ------------------------------------------------------------
>
>                 Key: ZOOKEEPER-112
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-112
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: tests
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-112.patch, ZOOKEEPER-112.patch
>
>
> src/java/main ZooKeeper.java has a method "public void disconnect()" that is 
> not part of the public api but put there for testing purposes (to test 
> disconnection of the client from the server w/o actually shutting down the 
> session)
> This method needs to be moved out of the public api. preferably we should 
> have a subclass in the test code itself that provides this method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to