zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] anmolnar commented on issue #1056: ZOOKEEPER-3495: fix SnapshotDigestTest to work with JDK12+
Date Fri, 16 Aug 2019 13:25:04 GMT
anmolnar commented on issue #1056: ZOOKEEPER-3495: fix SnapshotDigestTest to work with JDK12+
URL: https://github.com/apache/zookeeper/pull/1056#issuecomment-522007704
 
 
   I think this code is not perfectly organised:
   1. `DigestCalculator` is a dependency of `DataTree`, so it should be moved to the same
package and all members can be package-private which makes them unaccessible from outside,
   2. We can introduce a public interface making interface members public and letting unit
tests mocking without reflection.
   3. `DataTree` constructor can be overloaded with one which will get `DigestCalculator`
interface as a dependency, so the entire static approach can be removed. Tests can use the
new constructor to inject the mocked version of the Calculator this way.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message