You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/12 15:26:06 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3293: HDDS-6565. EC: Unify replication-related CLI params

adoroszlai commented on code in PR #3293:
URL: https://github.com/apache/ozone/pull/3293#discussion_r848571151


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneShellHA.java:
##########
@@ -141,9 +141,6 @@ public static void init() throws Exception {
     testFile.getParentFile().mkdirs();
     testFile.createNewFile();
 

Review Comment:
   I've found option values are not cleared when `@Option` annotation is present on setter method instead of field.  I need to set it on method to be able to override behavior in specific subclass `FreonReplicationOptions`/`ShellReplicationOptions`.  So creating a new instance of `ozoneShell` for each test is necessary to avoid leaking the parameters.  Otherwise test methods that do not set all replication params would fail.
   
   BTW, this more closely reflects real-world usage of CLI commands (new instance for each invocation).



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org