massakam commented on code in PR #3356:
URL: https://github.com/apache/bookkeeper/pull/3356#discussion_r930663755


##########
tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTest.java:
##########
@@ -62,17 +64,23 @@ public void setup() throws Exception {
 
         this.cmd = mock(DiscoveryCommand.class, CALLS_REAL_METHODS);
 
-        this.serverConf = new ServerConfiguration();
-        
this.serverConf.setMetadataServiceUri("zk://127.0.0.1/path/to/ledgers");
+        this.clientConf = new ClientConfiguration();

Review Comment:
   @StevenLuMT The `bookieAddressResolverEnabled` added this time is a 
client-side setting, so it cannot be set for `ServerConfiguration`. I replaced 
`ServerConfiguration` with `ClientConfiguration` because I want to test the 
behavior of `bookieAddressResolverEnabled` when it is true and when it is false.
   
   Also, I think that `ClientConfiguration` is more appropriate than 
`ServerConfiguration` to pass as the first argument of 
`DiscoveryCommand#apply()`.
   
https://github.com/apache/bookkeeper/blob/62cfc0ec8670cb66ce4bf2b0d707f42cba5e3354/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommand.java#L49
   
   Even if `ServerConfiguration` is passed, it will be converted to 
`ClientConfiguration` internally.
   
https://github.com/apache/bookkeeper/blob/62cfc0ec8670cb66ce4bf2b0d707f42cba5e3354/bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommand.java#L57-L61



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to