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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneTenantShell.java:
##########
@@ -102,10 +102,8 @@ public class TestOzoneTenantShell {
   private static OzoneShell ozoneSh = null;
   private static TenantShell tenantShell = null;
 
-  private final ByteArrayOutputStream out = new ByteArrayOutputStream();
-  private final ByteArrayOutputStream err = new ByteArrayOutputStream();
-  private static final PrintStream OLD_OUT = System.out;
-  private static final PrintStream OLD_ERR = System.err;
+  private static final StringWriter OUT = new StringWriter();
+  private static final StringWriter ERR = new StringWriter();

Review Comment:
   We can significantly reduce change in this class by keeping these 
non-`static`:
   
   ```java
     private final StringWriter out = new StringWriter();
     private final StringWriter err = new StringWriter();
   ```
   
   If assignment is moved to `setup()`, then `reset()` can even be removed.



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

Reply via email to