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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]