Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
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, PurgeTxnLog.java#L78, ZooKeeper.java#L1011 etc.
ZooKeeper.java // VisibleForTesting public Testable getTestable() { return new ZooKeeperTestable(this, cnxn); }
PurgeTxnLog.java // VisibleForTesting static void retainNRecentSnapshots(FileTxnSnapLog txnLog, List<File> snaps) {