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 2008/08/06 23:02:44 UTC

[jira] Created: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into 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


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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Attachment: ZOOKEEPER-112.patch

Moved disconnect() into ZooKeeperStub class which I added to test package. Also removed the "describeCNXN()" method from ZooKeeper since this seems like a test method rather than a public api method (we should have include it as part of zk.toString() if it's interesting for debugging purposes).

> 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
>
>
> 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Fix Version/s: 3.0.0

Moving to 3.0.0

> 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
>
>
> 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Status: Patch Available  (was: Open)

> 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Attachment: ZOOKEEPER-112.patch

This is the same as the last patch + it has a change to remove the processWatchEvent(event) from the public api of ZooKeeper.java client class.

Basically I have a (private) nested class that implements the
Watcher.process(event) method and I provide an instance of that class to the client cnxn.

ZooKeeper client public intf is very clean at this point.


> 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.


[jira] Commented: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628954#action_12628954 ] 

Hudson commented on ZOOKEEPER-112:
----------------------------------

Integrated in ZooKeeper-trunk #76 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/76/])

> 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, 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Status: Patch Available  (was: Open)

> 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
>
>
> 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.


[jira] Commented: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-112:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed revision 692534.

> 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, 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Attachment: ZOOKEEPER-112.patch

renamed zkstub per ben's suggestion

> 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, 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.


[jira] Updated: (ZOOKEEPER-112) src/java/main ZooKeeper.java has test code embedded into it.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-112:
-----------------------------------

    Status: Open  (was: Patch Available)

canceling pending some changes I have in mind to remove processwatchevent from public exposure in the zk client api

> 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
>
>
> 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.