ArvinDevel commented on a change in pull request #925: Issue611: restrict max 
ensemble change numbers
URL: https://github.com/apache/bookkeeper/pull/925#discussion_r163131441
 
 

 ##########
 File path: 
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockBookKeeperTestCase.java
 ##########
 @@ -118,9 +136,14 @@ public void setup() throws Exception {
         ledgerIdGenerator = mock(LedgerIdGenerator.class);
 
         bk = mock(BookKeeper.class);
+        Whitebox.setInternalState(bk, "bookieWatcher", bookieWatcher);
+        Whitebox.setInternalState(bk, "disableEnsembleChangeFeature", 
mock(Feature.class));
 
 Review comment:
   oh, got it. But the tricky thing is that `LedgerHandle` use bk's direct 
access to its field, see 
https://github.com/apache/bookkeeper/blob/f5b7e08d8ba35b7173c6c9fed4221d086cd38fdb/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L1555.
 So we change the way to getting `disableEnsembleChangeFeature` in bk or using 
`whiteBox` hacky way? @sijie @eolivelli 

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


With regards,
Apache Git Services

Reply via email to