You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Rakesh R (JIRA)" <ji...@apache.org> on 2016/02/04 19:13:39 UTC

[jira] [Assigned] (ZOOKEEPER-2361) Revisit 'VisibleForTesting' phrase used to indicate a member or method visible for testing

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rakesh R reassigned ZOOKEEPER-2361:
-----------------------------------

    Assignee: Rakesh R

> Revisit 'VisibleForTesting' phrase used to indicate a member or method visible for testing
> ------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2361
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2361
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>            Priority: Minor
>
> ZooKeeper uses {{// VisibleForTesting}} comment to indicate a member or method which is visible for unit testing. The idea of this jira is to discuss better ways to convey the message more clear and implement the same. One idea could use annotations, needs to introduce {{@VisibleForTesting}}
> For example, 
> [ContainerManager.java#L134|https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/ContainerManager.java#L134], [PurgeTxnLog.java#L78|https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/PurgeTxnLog.java#L78], [ZooKeeper.java#L1011|https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/ZooKeeper.java#L1011] etc.
> {code}
> ZooKeeper.java
>     // VisibleForTesting
>     public Testable getTestable() {
>         return new ZooKeeperTestable(this, cnxn);
>     }
> {code}
> {code}
> PurgeTxnLog.java
>     // VisibleForTesting
>     static void retainNRecentSnapshots(FileTxnSnapLog txnLog, List<File> snaps) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)